/* PACK OPTIONS STYLES */
#pack-options {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 20px 0;
}

.pack-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 12px;
  border: 2px solid var(--primary-text-color);
  border-radius: 10px;
  background-color: #fff;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
  width: 200px;
  flex-grow: 1;
  cursor: pointer;
  position: relative;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);

  &:hover {
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
  }

  #most-popular {
    position: absolute;
    top: 0px;
    left: 50%;
    font-size: 10px;

    transform: translate3d(-50%, -50%, 0);

    background-color: #fff;

    background-color: var(--primary-text-color);
    color: #fff;

    padding: 4px 8px;
    border-radius: 6px;
  }

  .pack-duration {
    font-size: 12px;
    color: #75788cff;
  }

  .pack-prices {
    display: flex;
    align-items: center;
    gap: 10px;

    p {
      font-size: 16px;
      color: #1d1d2e;

      &:first-child {
        text-decoration: line-through;

        color: #75788cff;
      }
    }
  }

  .pack-discount {
    background-color: var(--primary-text-color);
    color: #fff;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 12px;
  }

  &.selected {
    background-color: var(--primary-text-color);

    h4,
    .pack-prices p:not(:first-child) {
      color: #fff;
    }

    .pack-discount {
      background-color: #fff;
      color: var(--primary-text-color);
    }

    #most-popular {
      background-color: #fff;
      color: var(--primary-text-color);
    }
  }
}

/* SECTION STYLES */
section {
  display: flex;
  padding: 60px var(--horizontal-padding-desktop);
  gap: 40px;

  @media (max-width: 875px) {
    padding: 30px var(--horizontal-padding-mobile);
    flex-direction: column-reverse;
  }

  > div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 10px;
  }

  > div > h2 {
    font-size: 36px;
    margin-top: 3%;
  }

  p {
    color: #1d1d2e;
  }

  &#buy {
    padding-top: calc(
      84px + 20px
    ); /* Adjusted for header height and some extra padding */

    display: flex;
    align-items: center;
    column-gap: 40px;
    row-gap: 6px;

    background: url("/assets/images/colorful-background.jpg") no-repeat center
      center;
    background-size: cover;
    background-position: center;

    h1 {
      font-size: 2.5rem;
      margin-bottom: 10px;

      @media (max-width: 875px) {
        text-align: center;
      }
    }

    p {
      max-width: 380px;
      text-wrap: balance;
      font-size: 14px;

      @media (max-width: 875px) {
        max-width: none;
      }
    }

    #main-claims {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      gap: 10px;
      padding: 20px 0;
    }

    #main-claims,
    #choose-pack {
      @media (max-width: 875px) {
        align-items: center;
        width: 100%;

        > p,
        > h3 {
          min-width: 100%;
          text-align: center;
          max-width: 420px;
        }
      }
    }

    .buy-image-container {
      max-width: 500px;
      display: flex;
      justify-content: center;
      align-items: center;

      @media (max-width: 875px) {
        max-width: 300px;
      }
    }

    #delivery-features {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      row-gap: 10px;
      column-gap: 30px;
      flex-wrap: wrap;
      padding: 10px 0;
    }
  }

  &#info-section {
    background-color: #eeedeb;
    background-color: #1a1923;
    flex-direction: row-reverse;
    padding: 60px var(--horizontal-padding-desktop);

    display: flex;
    flex-direction: column;
    gap: 30px;

    .info-item {
      display: flex;
      gap: 6px;

      &:not(:first-child) {
        padding-top: 20px;
        border-top: 1px solid silver;
      }

      .title {
        font-weight: 600;
        color: #fff;
      }

      .explanation {
        color: #fff;
        font-size: 14px;
      }
    }

    #choose-your-pack-button {
      text-decoration: underline;
      color: #fff;
    }
  }
}

/* MODAL STYLES */
.modal {
  &:not(.open) {
    display: none;
  }

  opacity: 1;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  .modal-overlay {
    background-color: rgba(0, 0, 0, 0.7);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  .modal-content {
    background-color: white;
    padding: 30px 30px 20px;
    margin: 0 20px;
    border-radius: 10px;
    border: 4px solid var(--primary-text-color);
    position: relative;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 20px;

    .close-modal {
      position: absolute;
      top: 12px;
      right: 12px;
      cursor: pointer;
      font-size: 20px;
      line-height: 20px;
      color: var(--primary-text-color);

      &:hover {
        color: #8f56f1ff;
      }
    }

    input {
      width: 100%;
      padding: 10px;
      border: 1px solid var(--primary-text-color);
      border-radius: 5px;
      margin-bottom: 10px;

      &.error {
        border-color: red;
      }
    }

    .modal-buttons {
      display: flex;
      justify-content: flex-end;
      align-items: flex-end;
      gap: 15px;

      button {
        padding: 10px 30px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-weight: 600;

        &.confirm {
          background-color: #8f56f1ff;
          color: #fff;

          &:hover {
            background-color: #7a3ed0ff;
          }
        }

        &.cancel {
          background-color: #fff;
          color: var(--primary-text-color);

          &:hover {
            background-color: #e3e6f0;
          }
        }
      }
    }
  }
}

#buy-button {
  background-color: #8f56f1ff;
  color: #fff;
  font-weight: 600;
  text-align: center;
  border-width: 2px;
  width: 100%;
  min-width: max-content;
}
