/**
 * Demetz - Prescription info panel
 *
 * @author    JFO
 * @copyright 2026 Opal
 * @license   Proprietary - All rights reserved
 */

/*
 * Product page: "Need prescription lenses?" button (displayProductExtraButton) + side panel (appended to <body>).
 * The optional features (V2) have their own stylesheets (demetzrxinfo-<feature>.css), loaded only when enabled.
 *
 * Only loaded for the visitors who get the panel (online, or preview), so it may hide the former stn button.
 * px units only: the theme changes the root font size between breakpoints (52 % < 992px, 62.5 % above).
 * The theme has generic rules on a/p/ul/h*, button and img: every element rendered here is reset explicitly.
 * z-index: header sticky 2000 < creativepopup 9999999 < panel 2147481500 < YesCookie (2147482999) / Axeptio.
 */

/* ==========================================================================
   Former button of stnaddattributegroup (same hook): replaced by .drx-button.
   The FittingBox "virtual try-on" button shares the class, but has an id and lives in the gallery column.
   ========================================================================== */
.block_information .product-custom-actions > .stn-product-custom-extra-link:not(#fittingBoxOpen) {
  display: none !important;
}

/* ==========================================================================
   Button (reproduces the black stn button: theme _product_detail.scss .product-custom-actions)
   ========================================================================== */
a.drx-button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 12px 50px 12px 30px;
  border: 0;
  border-radius: 0;
  background-color: #000;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.5px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Next to the wishlist heart (48px + 12px gap), like the former button */
.product-custom-actions > a.drx-button {
  flex: 0 0 calc(100% - 60px);
  max-width: calc(100% - 60px);
}

a.drx-button:hover,
a.drx-button:focus,
a.drx-button:active,
a.drx-button:visited {
  background-color: #000;
  color: #fff;
  text-decoration: none;
}

a.drx-button:hover {
  background-color: #262626;
}

a.drx-button:focus {
  outline: none;
}

a.drx-button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.drx-button .drx-button__label,
.drx-button .drx-button__sub {
  display: block;
  max-width: 100%;
  margin: 0;
  padding: 0;
  color: inherit;
  font-size: inherit;
  line-height: 20px;
  overflow-wrap: break-word;
}

.drx-button .drx-button__sub {
  margin-top: 3px;
  color: #d6d6d6;
  font-size: 13px;
  line-height: 17px;
  letter-spacing: 0.2px;
  text-transform: none;
}

.drx-button .drx-button__arrow {
  position: absolute;
  top: 50%;
  right: 15px;
  display: block;
  width: 21px;
  height: 21px;
  margin: -10.5px 0 0;
  color: #fff;
  pointer-events: none;
}

/* Preview only: the badge sits inside the button (above, it covered the line over the button) */
a.drx-button.drx-button--preview {
  padding-top: 26px;
}

.drx-button .drx-button__badge {
  position: absolute;
  top: 5px;
  left: 8px;
  display: block;
  margin: 0;
  padding: 2px 6px;
  border-radius: 2px;
  background: #ffd400;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  pointer-events: none;
}

/* Narrow info column (col-lg-4): the label may wrap on 2 lines */
@media (min-width: 992px) and (max-width: 1199.98px) {
  a.drx-button {
    padding: 10px 44px 10px 18px;
    font-size: 15px;
  }

  .drx-button .drx-button__arrow {
    right: 12px;
  }
}

@media (max-width: 767.98px) {
  a.drx-button {
    padding: 12px 46px 12px 20px;
  }
}

/* ==========================================================================
   Page lock while the panel is open (classes set on <html> by the script)
   ========================================================================== */
html.drx-open,
html.drx-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

@supports (scrollbar-gutter: stable) {
  html.drx-open--gutter {
    scrollbar-gutter: stable;
  }
}

@supports not (scrollbar-gutter: stable) {
  html.drx-open--gutter body {
    padding-right: var(--drx-sbw, 0px);
  }
}

/* ==========================================================================
   Panel root (cloned from <template id="drx-template"> under <body>)
   ========================================================================== */
.drx-root {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147481500;
  display: block;
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  text-align: left;
  text-shadow: none;
  text-transform: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.drx-root[hidden],
.drx-root [hidden] {
  display: none !important;
}

.drx-root *,
.drx-root *::before,
.drx-root *::after {
  box-sizing: border-box;
}

.drx-root p,
.drx-root ul,
.drx-root ol,
.drx-root li,
.drx-root h2,
.drx-root h3,
.drx-root h4,
.drx-root dl,
.drx-root dt,
.drx-root dd,
.drx-root table,
.drx-root caption,
.drx-root th,
.drx-root td,
.drx-root details,
.drx-root summary,
.drx-root label {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  font-style: normal;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: left;
  text-transform: none;
}

.drx-root ul,
.drx-root ol,
.drx-root li {
  list-style: none;
}

.drx-root span {
  line-height: inherit;
}

.drx-root li::before,
.drx-root li::after,
.drx-root dt::before,
.drx-root dt::after,
.drx-root dd::before,
.drx-root dd::after,
.drx-root h2::before,
.drx-root h2::after,
.drx-root h3::before,
.drx-root h3::after,
.drx-root h4::before,
.drx-root h4::after {
  content: none;
}

.drx-root a {
  color: #000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.drx-root a:hover,
.drx-root a:focus {
  color: #000;
  text-decoration: none;
}

.drx-root :focus {
  outline: none;
}

.drx-root :focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.drx-root img {
  display: block;
  max-width: none;
  border: 0;
}

/* The theme strokes every svg (vinova_salehub theme.css: svg {stroke: #000}): the icons and the QR code are fills */
.drx-root svg,
a.drx-button svg {
  stroke: none;
}

.drx-root .drx-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Blurred page behind the panel (same veil as the opalshorts player) */
.drx-root .drx-backdrop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  cursor: pointer;
  touch-action: none;
  transition: opacity 0.25s ease;
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .drx-root .drx-backdrop {
    background: rgba(0, 0, 0, 0.86);
  }
}

/* ==========================================================================
   Drawer
   ========================================================================== */
.drx-root .drx-panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: 532px;
  max-width: 100%;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  background: #fff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
  transform: translate3d(100%, 0, 0);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.drx-root.is-visible .drx-backdrop {
  opacity: 1;
}

.drx-root.is-visible .drx-panel {
  transform: translate3d(0, 0, 0);
}

/* -- Head: product photo + title + close ------------------------------------------- */
.drx-root .drx-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 12px 16px 12px 24px;
  border-bottom: 1px solid #e6e6e6;
  background: #fff;
}

.drx-root .drx-head__media {
  display: block;
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 4px;
  background: #f5f5f5;
}

.drx-root .drx-head__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.drx-root .drx-head__text {
  flex: 1 1 auto;
  min-width: 0;
}

.drx-root .drx-head__title {
  color: #000;
  font-family: AktivGroteskCd, sans-serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  overflow-wrap: break-word;
}

.drx-root .drx-badge {
  display: inline-block;
  margin: 0 0 4px;
  padding: 2px 6px;
  border-radius: 2px;
  background: #ffd400;
  color: #000;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.drx-root .drx-close {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  width: 48px;
  height: 48px;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f5f5f5;
  color: #000;
  font: inherit;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.drx-root .drx-close:hover {
  background: #e6e6e6;
}

.drx-root .drx-close__icon {
  display: block;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

/* -- Scrolling body ---------------------------------------------------------------- */
.drx-root .drx-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 24px 32px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.drx-root .drx-intro__text + .drx-intro__text {
  margin-top: 8px;
}

.drx-root .drx-note {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 3px solid #000;
  background: #f5f5f5;
  font-size: 14px;
  line-height: 1.45;
}

.drx-root .drx-section {
  margin-top: 28px;
}

.drx-root .drx-intro + .drx-section {
  margin-top: 24px;
}

.drx-root .drx-section__title {
  margin: 0 0 14px;
  color: #000;
  font-family: AktivGroteskCd, sans-serif;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* -- Solution cards ---------------------------------------------------------------- */
.drx-root .drx-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drx-root .drx-card {
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  background: #fff;
  scroll-margin-top: 16px;
  transition: box-shadow 0.3s ease;
}

.drx-root .drx-card.is-target {
  border-color: #000;
  box-shadow: 0 0 0 1px #000;
}

.drx-root .drx-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f2f2f2;
}

.drx-root .drx-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@supports not (aspect-ratio: 4 / 3) {
  .drx-root .drx-card__media {
    height: 0;
    padding-top: 75%;
  }

  .drx-root .drx-card__img {
    position: absolute;
    top: 0;
    left: 0;
  }
}

.drx-root .drx-card__body {
  padding: 16px 16px 18px;
}

.drx-root .drx-card__body > * + * {
  margin-top: 12px;
}

.drx-root .drx-card__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: #000;
  font-family: AktivGroteskCd, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.2px;
}

.drx-root .drx-card__title {
  line-height: 1.2;
}

.drx-root .drx-card__range {
  display: inline-block;
  flex: 0 0 auto;
  margin: 0;
  padding: 2px 6px;
  border: 1px solid #000;
  border-radius: 2px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
}

.drx-root .drx-card__body > .drx-card__variant {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 2px;
  background: #eef1f6;
  color: #1f2f4a;
  font-size: 13px;
  line-height: 18px;
}

.drx-root .drx-card__concept {
  font-size: 15px;
  line-height: 1.5;
}

.drx-root .drx-card__label {
  margin: 0 0 2px;
  color: #555;
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.drx-root .drx-card__text {
  font-size: 14px;
  line-height: 1.45;
}

.drx-root .drx-card__benefit {
  position: relative;
  padding-left: 28px;
  font-size: 14px;
  line-height: 20px;
}

.drx-root .drx-card__benefit + .drx-card__benefit {
  margin-top: 6px;
}

.drx-root .drx-card__block--good {
  padding: 10px 14px;
  border-left: 3px solid #000;
  background: #f5f5f5;
}

.drx-root .drx-card__tip {
  position: relative;
  padding-left: 28px;
  font-size: 14px;
  line-height: 20px;
}

.drx-root .drx-card__icon {
  position: absolute;
  top: 1px;
  left: 0;
  display: block;
  width: 18px;
  height: 18px;
  color: #000;
}

.drx-root .drx-card__tip .drx-card__icon {
  top: 0;
  width: 20px;
  height: 20px;
}

.drx-root a.drx-card__more {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

/* -- Steps ------------------------------------------------------------------------- */
.drx-root .drx-step {
  position: relative;
  min-height: 30px;
  padding: 0 0 18px 44px;
}

.drx-root .drx-step:last-child {
  padding-bottom: 0;
}

.drx-root .drx-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  bottom: 4px;
  left: 14px;
  width: 2px;
  background: #e0e0e0;
}

.drx-root .drx-step__num {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-family: AktivGroteskCd, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}

.drx-root .drx-step__title {
  padding-top: 4px;
  color: #000;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.drx-root .drx-step__text {
  margin-top: 2px;
  color: #444;
  font-size: 14px;
  line-height: 1.45;
}

/* -- Fixed foot: store locator ----------------------------------------------------- */
.drx-root .drx-foot {
  flex: 0 0 auto;
  padding: 16px 24px 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e6e6e6;
  background: #fff;
  box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.06);
}

.drx-root a.drx-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  background: #000;
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.6px;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.15s ease;
}

.drx-root a.drx-cta:hover,
.drx-root a.drx-cta:focus {
  color: #fff;
  text-decoration: none;
}

.drx-root a.drx-cta:hover {
  background: #262626;
}

.drx-root .drx-cta__label {
  min-width: 0;
  line-height: 20px;
}

.drx-root .drx-cta__arrow {
  display: block;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  pointer-events: none;
}

.drx-root .drx-foot__hint {
  margin-top: 10px;
  color: #333;
  font-size: 13px;
  line-height: 1.4;
}

.drx-root .drx-foot__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 20px;
}

/* Touch target of 44px without changing the layout (the padding is taken back by the negative margins) */
.drx-root .drx-foot__links .drx-foot__link {
  display: inline-block;
  margin: -12px 0;
  padding: 12px 0;
}

.drx-root .drx-foot__legal {
  margin-top: 8px;
  color: #666;
  font-size: 11px;
  line-height: 1.4;
}

/* ==========================================================================
   Small screens: a strip of the page stays visible on the left (tap = close)
   ========================================================================== */
@media (max-width: 579.98px) {
  .drx-root .drx-panel {
    width: calc(100vw - 48px);
  }

  .drx-root .drx-head {
    gap: 12px;
    min-height: 68px;
    padding: 10px 10px 10px 16px;
  }

  .drx-root .drx-head__media {
    width: 48px;
    height: 48px;
  }

  .drx-root .drx-head__title {
    font-size: 20px;
  }

  .drx-root .drx-close {
    margin-top: 0;
  }

  .drx-root .drx-body {
    padding: 16px 16px 28px;
  }

  .drx-root .drx-card__body {
    padding: 14px 14px 16px;
  }

  .drx-root .drx-foot {
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  .drx-root a.drx-cta {
    gap: 10px;
    padding: 12px;
    font-size: 14px;
    letter-spacing: 0.4px;
  }
}

/*
 * Short viewports (phones with the browser bars, landscape phones): the whole drawer scrolls, head and foot
 * included; a fixed foot (button, instruction, links, legal notice: about 220px) would hide most of the cards.
 */
@media (max-height: 699.98px) {
  .drx-root .drx-panel {
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .drx-root .drx-head,
  .drx-root .drx-body,
  .drx-root .drx-foot {
    flex: 0 0 auto;
  }

  .drx-root .drx-body {
    overflow: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  a.drx-button,
  .drx-root .drx-backdrop,
  .drx-root .drx-panel,
  .drx-root .drx-card,
  .drx-root .drx-close,
  .drx-root a.drx-cta {
    transition: none !important;
  }
}
