/* Let Update Rx dialogs size to their content while using the configured width and viewport
   height as limits. This accommodates both compact sphere forms and taller GP forms. */
body.fluid {
  /* Let the overlay inset determine its height so the dialog remains visually centered. */
  .simplebox-overlay:has(.update-rx) {
    height: auto;
    padding: 2px 16px;
  }
  .simplebox-box{
    @media only screen and (max-width: 863px) {
        min-width:0!important;

    }
  }

  /* Keep large product assets from determining the dialog's intrinsic width. */
  .fancybox-content.update-rx {
    #product-image img {
      height: auto;
      max-width: 260px;
      width: auto;
    }

    /* Allow the form and image to shrink before the dialog needs to scroll. */
    form {
      min-height: 0;
    }

    .product-display {
      min-height: 0;
    }

    #product-image {
      height: 100%;

      img {
        max-height: 100%;
      }
    }

    /* Restore the full-width layout normally supplied by the Fancybox wrapper. */
    #prescription {
      width: 100%;

      /* Let the option columns participate in the dialog's intrinsic width. */
      .products .lens-variations tbody {
        width: auto;
      }
    }

    /* Keep the main and additional-parameter grids aligned for GP prescriptions. */
    &.has-additional-params {
      #prescription .products .lens-variations thead {
        min-width: 100px;
      }
    }

    /* Preserve row alignment when a lens type hides an optional GP parameter. */
    #gas-permeable .lens-variations tbody td {
      min-height: 50px;
    }
  }

  /* Use collapsible vertical gutters while retaining the 20px horizontal inset. */
  .simplebox-content.update-rx {
    display: flex;
    flex-direction: column;
    padding: 0 20px;

    /* Pass the available height through the view's wrapper to the form. */
    > .update-rx {
      display: flex;
      flex-direction: column;
      min-height: 0;
    }

    /* Collapse gutters to 4px before reducing the form and image height. */
    &::before,
    &::after {
      content: "";
      display: block;
      flex: 0 1000 20px;
      min-height: 4px;
    }
  }
}

.simplebox-content {
  /* Replace the Fancybox chrome spacing that is absent from SimpleBox. */
  #body.moneyback {
    max-width: 800px;
    overflow-x: hidden;
    padding: 30px;
    text-align: left;
    width: 100%;

    h1 {
      margin: 0;
    }

    h2 {
      color: #333;
      font-size: 13px;
      margin: 0 0 0 76px;

      @media only screen and (max-width: 863px) {
        line-height: 16px;
        margin: 0 0 20px;
      }
    }

    p {
      font-size: 12px;
      line-height: 20px;
      margin-bottom: 10px;
      padding: 0;

      &.tiny {
        font-size: 9px;
        margin: 0;
        padding: 10px 10px 0;
      }
    }

    .bluebox {
      margin: 10px;
    }
  }

  .autoship_conflict_banner {
    padding: 30px;
  }

  .autoship_conflict_banner_header {
    h2 {
      color: var(--bright_blue);
      font-size: 28px;
      margin: 0 0 5px;
      text-align: center;

      @media only screen and (max-width: 863px) {
        font-size: 25px;
      }

      @media only screen and (max-width: 480px) {
        font-size: 22px;
      }
    }

    p {
      font-size: 16px;
      margin: 0 0 15px;
      text-align: center;
    }
  }

  .autoship_conflict_banner_body {
    border: 1px solid var(--grey8);
    border-radius: 4px;
    margin: 0 0 20px;
    min-width: 450px;

    @media only screen and (max-width: 863px) {
      min-width: 0;
    }
  }

  .autoship_conflict_banner_check {
    padding: 7px;
    text-align: left;

    &:first-of-type {
      border-bottom: 1px solid var(--grey8);
    }

    .text {
      font-size: 16px;

      @media only screen and (max-width: 480px) {
        line-height: 24px;
      }
    }

    &.checked {
      background: var(--light_blue);

      .autoship_conflict_banner_checkmark::after {
        color: var(--green);
        content: "\f00c";
        display: inline-block;
        font-family: "Font Awesome 6 Pro";
        font-size: 18px;
        font-style: normal;
        font-variant: normal;
        font-weight: 400;
        line-height: 20px;
        text-rendering: auto;
      }
    }
  }

  .autoship_conflict_banner_checkmark {
    background: var(--white);
    border: 1px solid var(--grey8);
    border-radius: 4px;
    display: inline-block;
    height: 22px;
    margin: 0 7px 0 0;
    text-align: center;
    vertical-align: text-bottom;
    width: 22px;
  }

  .autoship_conflict_banner_actions {
    align-items: center;
    display: flex;
    flex-direction: column;
    row-gap: 10px;

    .btn {
      width: 275px;
    }
  }

  .autoship_conflict_banner_dismiss {
    font-size: 16px;
  }
}

.simplebox-content .productreplacement {
  box-sizing: border-box;
  padding: 20px;
  text-align: center;

  @media only screen and (max-width: 600px) {
    padding: 18px 12px;
  }

  h1 {
    color: var(--blue);
    font-size: 24px;
    line-height: 30px;
    margin: 0 24px 8px;

    @media only screen and (max-width: 600px) {
      font-size: 22px;
      line-height: 27px;
      margin: 0 22px 8px;
    }
  }

  > p {
    font-size: 16px;
    line-height: 22px;
    margin: 18px 0;
  }

  .toptext {
    font-size: 14px;
    line-height: 20px;
    margin: 0 0 18px;

    p {
      margin: 0;
    }
  }

  .oasys-pack-options {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    @media only screen and (max-width: 600px) {
      grid-template-columns: minmax(0, 1fr);
    }
  }

  .product {
    min-width: 0;
    position: relative;

    .inner {
      box-sizing: border-box;
      height: 100%;
      padding: 16px;
    }

    &.pk24 .inner {
      border: 1px solid var(--grey);
    }

    h2 {
      font-size: 19px;
      line-height: 24px;
      margin: 0 0 8px;

      span {
        display: block;
        font-size: 12px;
        line-height: 16px;
      }
    }

    .best {
      background: var(--blue);
      color: var(--white);
      font-size: 13px;
      font-weight: bold;
      left: 50%;
      line-height: 24px;
      padding: 0 12px;
      position: absolute;
      top: -12px;
      transform: translateX(-50%);
      white-space: nowrap;
    }

    .savings {
      font-size: 13px;
      font-weight: bold;
      line-height: 18px;
      margin: 0 0 6px;
    }

    .prodimg {
      align-items: center;
      display: flex;
      height: 145px;
      justify-content: center;
      margin: 4px 0 10px;

      img {
        display: block;
        max-height: 145px;
        max-width: 100%;
        width: auto;
      }
    }

    .info {
      font-size: 13px;
      line-height: 18px;
      margin: 0 0 10px;

      > span {
        display: block;
      }

      .price {
        display: inline;
        font-weight: bold;
      }
    }

    form {
      margin: 0;
    }

    .btn {
      min-width: 185px;
    }
  }

  .oasys-go-back {
    margin: 14px 0 0;
  }
}

.simplebox-content #rebate-detail {
  max-width: 350px;
  padding: 30px;
  text-align: left;
  width: 100%;

  #info {
    .top_bar {
      background: var(--grey-3);
      color: var(--grey2);
      font-size: 14px;
      font-weight: bold;
      line-height: 40px;
      margin: -30px -30px 20px;
      text-align: center;
    }

    .heading {
      margin: 0 0 15px;
      text-align: center;

      h3 {
        color: var(--black);
        font-size: 20px;
        line-height: 30px;
        margin: 0 0 10px;
      }

      h4 {
        color: var(--grey2);
        font-size: 14px;
        font-weight: normal;
        margin: 0 0 10px;
        text-align: center;
      }
    }

    .rebate_card {
      height: auto;
      margin: 0 auto 25px;
      width: 200px;

      svg {
        display: block;
        height: auto;
        width: 100%;
      }
    }

    .divider {
      border-top: 1px solid var(--grey);
      margin: 0 0 30px;
      position: relative;
      text-align: center;

      .text {
        background: var(--white);
        color: var(--grey2);
        display: inline-block;
        height: 30px;
        left: 50%;
        line-height: 30px;
        margin: 0 0 0 -45px;
        padding: 0 5px;
        position: absolute;
        top: -15px;
        width: 90px;
      }
    }

    ol {
      list-style: none;
      margin: 0;

      li {
        font-size: 14px;
        line-height: 20px;
        margin: 0 0 15px;
        min-height: 40px;
        padding: 0 0 0 75px;
        position: relative;

        .icon {
          height: 40px;
          left: 0;
          position: absolute;
          top: 0;
          width: 40px;

          .number {
            color: var(--grey);
            font-size: 42px;
            font-weight: bold;
            line-height: 40px;
          }

          i.fas {
            color: var(--bright_blue);
            font-size: 32px;
            left: 30px;
            line-height: 40px;
            position: absolute;
            top: 0;
          }
        }
      }
    }
  }
}

.simplebox-content #autoship-detail {
  background-color: var(--grey-3);
  box-sizing: border-box;
  max-width: 460px;
  padding: 0 0 30px;
  text-align: left;
  width: 100%;

  @media only screen and (max-width: 863px) {
    width: auto;
  }

  #info {
    .heading {
      align-items: center;
      background: #e8f6ff;
      display: flex;
      flex-direction: column;
      padding: 30px;
      text-align: center;

      .title {
        align-items: center;
        column-gap: 10px;
        display: flex;
        justify-content: center;
        margin: 0 0 10px;

        .icon {
          height: 70px;
          margin: 0;
          min-width: 70px;
          width: 70px;

          @media only screen and (max-width: 863px) {
            height: 50px;
            min-width: 50px;
            width: 50px;
          }
        }
      }

      h1 {
        color: var(--black);
        font-family: "Futura PT", sans-serif;
        font-size: 44px;
        font-weight: bold;
        letter-spacing: 0;
        line-height: 44px;
        margin: 0;

        @media only screen and (max-width: 863px) {
          font-size: 35px;
          line-height: 35px;
        }
      }

      h4 {
        color: var(--black);
        font-size: 14px;
        font-weight: normal;
        line-height: 16px;
        margin: 0;
        text-align: center;

        @media only screen and (max-width: 863px) {
          font-size: 12px;
          line-height: 14px;
        }
      }
    }

    .divider {
      border-top: 1px solid var(--grey);
      margin: 30px auto;
      position: relative;
      text-align: center;
      width: 200px;

      .text {
        background-color: var(--grey-3);
        box-sizing: border-box;
        color: #696969;
        font-weight: bold;
        height: 30px;
        left: 50%;
        line-height: 30px;
        margin: 0 0 0 -51px;
        padding: 0 5px;
        position: absolute;
        top: -16px;
        width: 100px;
      }
    }

    ol {
      list-style: none;
      margin: 0 auto;
      max-width: 330px;
      padding: 0 30px;

      li {
        color: #696969;
        font-size: 14px;
        line-height: 20px;
        margin: 0 0 25px;
        min-height: 50px;
        padding: 0 0 0 70px;
        position: relative;

        .icon {
          height: 50px;
          left: 0;
          position: absolute;
          top: 0;
          width: 50px;

          .number {
            align-items: center;
            background: var(--bright_blue);
            border-radius: 50%;
            color: var(--white);
            display: flex;
            font-size: 42px;
            font-weight: bold;
            height: 50px;
            justify-content: center;
            line-height: 50px;
            width: 50px;
          }
        }
      }
    }
  }

  #autoship_logo {
    height: 70px;
    margin: 0;
    min-width: 70px;
    width: 70px;

    @media only screen and (max-width: 863px) {
      height: 50px;
      min-width: 50px;
      width: 50px;
    }
  }

  .autoship-title-prefix {
    color: var(--bright_blue);
    display: inline;
    position: relative;

    &::after {
      border-bottom: 2px solid var(--yellow);
      bottom: -3px;
      content: "";
      left: 50%;
      position: absolute;
      transform: translateX(-50%);
      width: 75px;

      @media only screen and (max-width: 863px) {
        width: 50px;
      }
    }
  }

  .autoship-title-suffix {
    color: var(--black);
    display: inline;
  }
}
