/* LabBrilliance - Try at Home popup (same as the homepage). Loaded by asset/js/lb-try-home.js */
    /* Try at Home modal: fixed reference layout, no popup scrolling */
    #tryHomeOverlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 99999;
      background: rgba(22, 21, 20, .72);
      backdrop-filter: blur(5px);
      align-items: center;
      justify-content: center;
      padding: 16px;
      overflow: hidden
    }

    #tryHomeOverlay.th-visible {
      display: flex
    }

    #tryHomeOverlay * {
      box-sizing: border-box
    }

    .th-modal {
      position: relative;
      width: min(1082px, calc(100vw - 32px));
      height: min(858px, calc(100vh - 32px));
      max-height: none;
      overflow: hidden;
      background: #fffdfa;
      border: 1px solid rgba(255, 255, 255, .75);
      border-radius: 14px;
      display: grid;
      grid-template-columns: 38.8% 61.2%;
      box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
      color: #211b16
    }

    .th-intro {
      position: relative;
      min-width: 0;
      min-height: 0;
      overflow: hidden;
      padding: 0;
      background: #f7ecdf url("../img/try-at-home-bg.jpg") center/100% 100% no-repeat
    }

    .th-intro-copy,
    .th-benefits {
      display: none !important
    }

    .th-form-area {
      min-width: 0;
      min-height: 0;
      overflow: hidden;
      padding: 34px 32px 26px;
      background: #fffdfa;
      display: flex;
      flex-direction: column
    }

    .th-close {
      position: absolute;
      top: 13px;
      right: 13px;
      z-index: 3;
      width: 38px;
      height: 38px;
      border: 0;
      border-radius: 50%;
      background: #f2efeb;
      color: #171411;
      font-size: 25px;
      line-height: 1;
      display: grid;
      place-items: center;
      cursor: pointer
    }

    .th-title {
      font: normal 36px/1.2 Georgia, serif;
      margin: 0 38px 8px 0;
      color: #171411;
      letter-spacing: -.025em
    }

    .th-subtitle {
      font-size: 18px;
      line-height: 1.5;
      color: #777067;
      margin: 0 0 24px;
      max-width: 500px
    }

    .th-fields {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 15px 16px
    }

    .th-field {
      min-width: 0
    }

    .th-field.th-full {
      grid-column: 1/-1
    }

    .th-field label {
      display: block;
      font-size: 16px;
      font-weight: 400;
      margin-bottom: 7px;
      color: #292521
    }

    .th-required {
      color: #a65f49;
      font-weight: 600
    }

    .th-input-wrap {
      position: relative;
      min-width: 0
    }

    .th-input-icon {
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      width: 19px;
      height: 19px;
      stroke: #786e65;
      fill: none;
      stroke-width: 1.5;
      stroke-linecap: round;
      stroke-linejoin: round;
      pointer-events: none
    }

    .th-input-wrap textarea~.th-input-icon {
      top: 18px;
      transform: none
    }

    .th-field input,
    .th-field select,
    .th-field textarea {
      display: block;
      width: 100%;
      min-width: 0;
      padding: 13px 14px 13px 54px;
      border: 1px solid #ded9d4;
      border-radius: 10px;
      background: rgba(255, 255, 255, .72);
      color: #342a24;
      font-family: Arial, Helvetica, sans-serif;
      font-size: 16px;
      outline: none;
      transition: border-color .2s, box-shadow .2s;
      box-shadow: 0 1px 2px rgba(0, 0, 0, .015)
    }

    .th-field input,
    .th-field select {
      height: 54px;
      min-height: 54px
    }

    .th-field textarea {
      height: 91px;
      min-height: 91px;
      resize: none;
      padding-top: 14px
    }

    .th-field input::placeholder,
    .th-field textarea::placeholder {
      color: #96918d;
      opacity: 1
    }

    .th-field input:focus,
    .th-field select:focus,
    .th-field textarea:focus {
      border-color: #b58b58;
      box-shadow: 0 0 0 3px rgba(167, 131, 82, .12)
    }

    .th-field select {
      appearance: none;
      padding-right: 35px
    }

    .th-select-wrap:after {
      content: "";
      position: absolute;
      right: 19px;
      top: 20px;
      width: 9px;
      height: 9px;
      border-right: 1.5px solid #292521;
      border-bottom: 1.5px solid #292521;
      transform: rotate(45deg);
      pointer-events: none
    }

    .th-submit {
      flex: 0 0 auto;
      width: 100%;
      margin-top: auto;
      min-height: 60px;
      padding: 15px 18px;
      border: 0;
      border-radius: 32px;
      background: linear-gradient(100deg, #b97962, #a96753);
      color: #fff;
      font-size: 18px;
      font-weight: 500;
      cursor: pointer;
      transition: filter .2s, transform .2s
    }

    .th-submit:hover {
      filter: brightness(.94);
      transform: translateY(-1px)
    }

    .th-note {
      font-size: 10px;
      line-height: 1.4;
      text-align: center;
      color: #8b8179;
      margin: 7px 0 0
    }

    @media(max-height:820px) and (min-width:651px) {
      .th-form-area {
        padding: 23px 28px 18px
      }

      .th-title {
        font-size: 30px;
        margin-bottom: 6px
      }

      .th-subtitle {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 14px
      }

      .th-fields {
        gap: 10px 13px
      }

      .th-field label {
        font-size: 13px;
        margin-bottom: 5px
      }

      .th-field input,
      .th-field select {
        height: 43px;
        min-height: 43px;
        font-size: 13px
      }

      .th-field textarea {
        height: 67px;
        min-height: 67px;
        font-size: 13px
      }

      .th-input-icon {
        width: 17px;
        height: 17px;
        left: 14px
      }

      .th-field input,
      .th-field select,
      .th-field textarea {
        padding-left: 44px
      }

      .th-select-wrap:after {
        top: 16px
      }

      .th-submit {
        min-height: 48px;
        font-size: 15px;
        margin-top: auto
      }
    }

    @media(max-width:650px) {
      #tryHomeOverlay {
        padding: 8px
      }

      .th-modal {
        width: calc(100vw - 16px);
        height: calc(100dvh - 16px);
        max-width: 520px;
        grid-template-columns: 1fr;
        grid-template-rows: 145px minmax(0, 1fr);
        border-radius: 11px
      }

      .th-intro {
        background-position: center 48%;
        background-size: 100% 100%
      }

      .th-form-area {
        padding: 19px 17px 14px
      }

      .th-title {
        font-size: 25px;
        margin-right: 35px
      }

      .th-subtitle {
        font-size: 13px;
        line-height: 1.4;
        margin-bottom: 12px
      }

      .th-fields {
        gap: 10px 10px
      }

      .th-field label {
        font-size: 12px;
        margin-bottom: 5px
      }

      .th-field input,
      .th-field select {
        height: 40px;
        min-height: 40px;
        font-size: 13px;
        padding-left: 40px
      }

      .th-field textarea {
        height: 57px;
        min-height: 57px;
        font-size: 13px;
        padding-left: 40px
      }

      .th-input-icon {
        left: 12px;
        width: 16px;
        height: 16px
      }

      .th-input-wrap textarea~.th-input-icon {
        top: 13px
      }

      .th-select-wrap:after {
        top: 14px
      }

      .th-submit {
        min-height: 44px;
        font-size: 14px;
        margin-top: auto
      }

      .th-close {
        top: 8px;
        right: 8px;
        width: 31px;
        height: 31px
      }
    }

    @media(max-width:430px) {
      .th-modal {
        grid-template-rows: 112px minmax(0, 1fr)
      }

      .th-form-area {
        padding: 14px 13px 11px
      }

      .th-title {
        font-size: 22px
      }

      .th-subtitle {
        font-size: 12px;
        margin-bottom: 9px
      }

      .th-fields {
        grid-template-columns: 1fr 1fr;
        gap: 8px
      }

      .th-field.th-full {
        grid-column: 1/-1
      }

      .th-field label {
        font-size: 11px
      }

      .th-field input,
      .th-field select {
        height: 36px;
        min-height: 36px;
        font-size: 12px;
        padding-left: 35px
      }

      .th-field textarea {
        height: 46px;
        min-height: 46px;
        font-size: 12px;
        padding-left: 35px
      }

      .th-input-icon {
        left: 10px;
        width: 14px;
        height: 14px
      }

      .th-input-wrap textarea~.th-input-icon {
        top: 10px
      }

      .th-select-wrap:after {
        top: 12px;
        right: 13px;
        width: 7px;
        height: 7px
      }

      .th-submit {
        min-height: 40px;
        font-size: 13px
      }

      .th-note {
        font-size: 9px
      }
    }
  
/* Try at Home popup responsive fixes */
#tryHomeOverlay {
  padding: 12px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
#tryHomeOverlay .th-modal {
  min-height: 0;
}
#tryHomeOverlay .th-form-area {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
#tryHomeOverlay .th-form-area form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
#tryHomeOverlay .th-fields {
  flex: 0 0 auto;
}
#tryHomeOverlay .th-submit {
  flex: 0 0 auto;
  margin-top: 4px;
}
@media (max-width: 650px) {
  #tryHomeOverlay {
    align-items: flex-start;
    padding: 8px;
  }
  #tryHomeOverlay .th-modal {
    width: min(100%, 520px);
    height: auto;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 112px minmax(0, 1fr);
    margin: auto;
  }
  #tryHomeOverlay .th-form-area {
    min-height: 0;
    max-height: calc(100vh - 136px);
    max-height: calc(100dvh - 136px);
    overflow-y: auto;
    padding: 16px 15px 14px;
  }
  #tryHomeOverlay .th-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 11px;
  }
  #tryHomeOverlay .th-field.th-full {
    grid-column: auto;
  }
  #tryHomeOverlay .th-field input,
  #tryHomeOverlay .th-field select {
    height: 44px;
    min-height: 44px;
    font-size: 14px;
  }
  #tryHomeOverlay .th-field textarea {
    height: 76px;
    min-height: 76px;
    font-size: 14px;
  }
  #tryHomeOverlay .th-field label {
    font-size: 12px;
  }
  #tryHomeOverlay .th-title {
    font-size: clamp(21px, 6vw, 26px);
  }
  #tryHomeOverlay .th-subtitle {
    font-size: 13px;
    line-height: 1.45;
  }
  #tryHomeOverlay .th-submit {
    min-height: 48px;
    font-size: 14px;
    margin-top: 2px;
  }
}
@media (max-width: 380px) {
  #tryHomeOverlay .th-modal {
    grid-template-rows: 92px minmax(0, 1fr);
  }
  #tryHomeOverlay .th-form-area {
    max-height: calc(100vh - 108px);
    max-height: calc(100dvh - 108px);
    padding: 13px 12px 12px;
  }
  #tryHomeOverlay .th-intro {
    background-position: center;
  }
}
@media (max-height: 560px) {
  #tryHomeOverlay {
    align-items: flex-start;
  }
  #tryHomeOverlay .th-modal {
    height: auto;
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    margin: auto;
  }
  #tryHomeOverlay .th-form-area {
    overflow-y: auto;
  }
}

/* Popup image responsiveness */
#tryHomeOverlay .th-intro {
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}
@media (max-width: 650px) {
  #tryHomeOverlay .th-intro {
    min-height: 118px;
    background-size: cover !important;
    background-position: center 45% !important;
  }
}
@media (max-width: 430px) {
  #tryHomeOverlay .th-intro {
    min-height: 100px;
    background-size: cover !important;
    background-position: center 45% !important;
  }
}
