/* ==========================================================================
   Product enquiry pop-up — `.sk-epop`                           (2026-10-19)

   Markup: templates/catalog/_partials/product-lead-popup.tpl (product pages only).
   Behaviour: assets/js/product-lead.js (opens it after 15 s, sends it).

   A native <dialog> opened with showModal(): the browser puts it above
   everything (Tawk, the sticky bar, the header), makes the page behind it
   inert, traps Tab and closes on Escape. Same visual language as the sign-out
   confirmation `.sk-confirm` (theme-premium.css): Inter titles, brand pink
   actions, 20px card, ink backdrop. Compact on purpose: the product page stays
   visible around it, and on a short phone screen the card's own contents
   scroll so the button is never cut off.
   ========================================================================== */
.sk-epop {
  --lead-pink: #d50075;
  --lead-pink-dark: #9e0056;
  --lead-tint: #fef0f7;
  --lead-ink: #1a0010;
  --lead-body: #4b4550;
  --lead-muted: #756e7d;
  --lead-line: #ddd3e0;
  --lead-soft: #faf7fa;
  --lead-soft-line: #ebe5ed;
  --lead-error: #b02a37;
  --lead-max-h: calc(100vh - 2rem);

  width: min(25rem, calc(100vw - 2rem));
  max-width: none;
  max-height: var(--lead-max-h);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--lead-ink);
  font-family: inherit;
  overflow: visible;
}

@supports (height: 100dvh) {
  .sk-epop { --lead-max-h: calc(100dvh - 2rem); }
}

.sk-epop::backdrop {
  background: rgba(26, 0, 16, .5);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.sk-epop[open] { animation: sk-epop-in .2s cubic-bezier(.2, .7, .3, 1) both; }
.sk-epop[open]::backdrop { animation: sk-epop-fade .2s ease both; }

@keyframes sk-epop-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

@keyframes sk-epop-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .sk-epop[open],
  .sk-epop[open]::backdrop { animation: none; }
}

/* The page behind does not scroll while the pop-up is open. product-lead.js
   pads the body by the scrollbar's width so nothing shifts sideways. */
html.sk-epop-open,
html.sk-epop-open body { overflow: hidden; }

.sk-epop__panel {
  position: relative;
  max-height: var(--lead-max-h);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.5rem 1.25rem 1.25rem;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(26, 0, 16, .32);
}

.sk-epop *,
.sk-epop *::before,
.sk-epop *::after { box-sizing: border-box; }

.sk-epop p { margin: 0; }

/* ---------------------------------------------------------------- close */
.sk-epop__close {
  position: absolute;
  top: .5rem;
  right: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--lead-muted);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}

.sk-epop__close:active { background: var(--lead-tint); color: var(--lead-pink); }

@media (hover: hover) {
  .sk-epop__close:hover { background: var(--lead-tint); color: var(--lead-pink); }
}

/* ---------------------------------------------------------------- heading */
.sk-epop__title {
  margin: 0 2.25rem .35rem 0;
  color: var(--lead-ink);
  font-family: inherit;   /* Inter, like every other control title */
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* The heading takes focus only so a screen reader announces the dialog; it is not
   a control, so no ring. Outranks product-premium.css's
   `.page-product [tabindex]:focus-visible` pink outline. */
.sk-epop .sk-epop__title:focus,
.page-product .sk-epop .sk-epop__title:focus-visible { outline: none; }

.sk-epop__text {
  color: var(--lead-body);
  font-size: .875rem;
  line-height: 1.55;
}

.sk-epop__nowrap { white-space: nowrap; }

/* v2: shown when the name and phone of the last enquiry are already filled in. */
.sk-epop__saved {
  margin-top: .6rem !important;
  padding: .5rem .75rem;
  border-radius: 10px;
  background: var(--lead-tint);
  color: var(--lead-pink-dark);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.45;
}

.sk-epop__tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: .75rem;
  border-radius: 50%;
  background: var(--lead-tint);
  color: var(--lead-pink);
}

/* ---------------------------------------------------------------- product */
.sk-epop__product {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1rem 0;
  padding: .625rem;
  border: 1px solid var(--lead-soft-line);
  border-radius: 14px;
  background: var(--lead-soft);
}

.sk-epop__media { flex: 0 0 3.5rem; display: block; }

.sk-epop__img {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
}

.sk-epop__product-text { min-width: 0; }

.sk-epop__product-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--lead-ink);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.35;
}

.sk-epop__meta {
  margin-top: .15rem !important;
  color: var(--lead-muted);
  font-size: .75rem;
  line-height: 1.4;
}

.sk-epop__price {
  margin-top: .3rem !important;
  color: var(--lead-body);
  font-size: .8125rem;
  line-height: 1.4;
}

.sk-epop__price strong { color: var(--lead-ink); font-weight: 700; }

/* ---------------------------------------------------------------- form */
.sk-epop__field { margin-bottom: .875rem; }

.sk-epop__label {
  display: block;
  margin-bottom: .3rem;
  color: var(--lead-ink);
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.3;
}

.sk-epop__input {
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 0 .875rem;
  border: 1px solid var(--lead-line);
  border-radius: 10px;
  background: #fff;
  color: var(--lead-ink);
  font: inherit;
  font-size: 1rem;        /* 16px: iOS zooms into any smaller field */
  line-height: 1.3;
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.sk-epop__input::placeholder { color: #a39aa6; opacity: 1; }

.sk-epop__input:focus {
  border-color: var(--lead-pink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(213, 0, 117, .14);
}

/* One focus ring, not two: product-premium.css adds a 2px outline to every
   input/button on the product page; here the border + halo (and the button's
   own ring below) are the focus treatment. */
.page-product .sk-epop .sk-epop__input:focus-visible,
.page-product .sk-epop .sk-epop__submit:focus-visible { outline: none; }

.sk-epop__input[aria-invalid="true"] { border-color: var(--lead-error); }
.sk-epop__input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(176, 42, 55, .14); }

/* v3: the saved number, masked and read-only, with a way to type another. */
.sk-epop__input[readonly] {
  background: var(--lead-soft);
  color: var(--lead-body);
  letter-spacing: .02em;
}

.sk-epop__change {
  display: inline-block;
  margin: .35rem 0 0;
  padding: .25rem 0;
  border: 0;
  background: none;
  color: var(--lead-pink);
  font: inherit;
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.sk-epop__change:focus-visible { outline: 2px solid var(--lead-pink); outline-offset: 2px; border-radius: 4px; }

.sk-epop__hint {
  margin-top: .3rem !important;
  color: var(--lead-muted);
  font-size: .75rem;
  line-height: 1.4;
}

.sk-epop__error {
  margin-top: .3rem !important;
  color: var(--lead-error);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.4;
}

.sk-epop__status {
  margin-bottom: .875rem !important;
  padding: .55rem .75rem;
  border-radius: 10px;
  background: #fdf2f3;
  color: #8f1d2a;
  font-size: .8125rem;
  line-height: 1.45;
}

.sk-epop__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sk-epop__submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  margin: 0;
  padding: .5rem 1rem;
  border: 1.5px solid var(--lead-pink);
  border-radius: 10px;
  background: var(--lead-pink);
  box-shadow: 0 6px 18px rgba(213, 0, 117, .24);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.sk-epop__submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--lead-pink);
}

.sk-epop__submit:active { background: var(--lead-pink-dark); border-color: var(--lead-pink-dark); }

.sk-epop__submit[disabled] { cursor: progress; opacity: .8; }

.sk-epop__submit--ghost {
  background: #fff;
  box-shadow: none;
  color: var(--lead-pink);
}

.sk-epop__submit--ghost:active { background: var(--lead-tint); color: var(--lead-pink); }

@media (hover: hover) {
  .sk-epop__submit:hover { background: var(--lead-pink-dark); border-color: var(--lead-pink-dark); color: #fff; }
  .sk-epop__submit[disabled]:hover { background: var(--lead-pink); border-color: var(--lead-pink); }
  .sk-epop__submit--ghost:hover { background: var(--lead-pink); border-color: var(--lead-pink); color: #fff; }
}

.sk-epop__privacy {
  margin-top: .75rem !important;
  color: var(--lead-muted);
  font-size: .75rem;
  line-height: 1.5;
}

.sk-epop__privacy a {
  color: var(--lead-pink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sk-epop [hidden] { display: none !important; }

/* ---------------------------------------------------------------- sizes */
@media (min-width: 576px) {
  .sk-epop__panel { padding: 1.75rem 1.75rem 1.5rem; }
  .sk-epop__title { font-size: 1.25rem; }
}

/* Short screens (a landscape phone, or a phone with the keyboard up): tighter
   spacing first; past that the card's contents scroll. */
@media (max-height: 620px) {
  .sk-epop__panel { padding-top: 1.125rem; padding-bottom: 1rem; }
  .sk-epop__product { margin: .75rem 0; padding: .5rem; }
  .sk-epop__field { margin-bottom: .625rem; }
  .sk-epop__tick { width: 2.25rem; height: 2.25rem; margin-bottom: .5rem; }
}
