/* =========================================================================
   NobbyDec Pop-up Rabat 1.0.0: kod rabatowy na karcie lameli + popup promocji.
   Ładowane tylko na kartach lameli (inc/coupon.php). Kolory i promienie —
   tokeny z decor-configurator.css wtyczki NobbyDec Decor (--decor-*).

   Warstwy (zmierzone na nobbydec.pl): przewijanie w górę Woodmart 350,
   sticky «Dodaj do koszyka» 399 (NobbyDec Decor 1.29+; wcześniej 995),
   zasłona panelu bocznego 400, panele boczne 500, pasek cookies 1510,
   popupy wtyczki 100000+. Przycisk «−X%» = 360:
   nad treścią, pod panelami i cookies. Popup = 100000, jak pozostałe popupy.
   ========================================================================= */

/* ---------- Karta ceny: cena po rabacie (kwoty z WooCommerce) ---------- */
body.ndde-lamele .tc-totals-form.ndpr-on #tm-epo-totals{ display:none; }
.ndpr-price:empty{ display:none; }
.ndpr-was{
  display:block;
  font-size:15px;
  line-height:20px;
  color:var(--decor-muted);
  text-decoration-thickness:1px;
}
.ndpr-total{
  font-size:30px;
  line-height:36px;
  font-weight:700;
  color:#1d232b;
}
.ndpr-note{
  margin-top:4px;
  font-size:12px;
  line-height:17px;
  color:var(--decor-accent);
}
.ndpr-note b{ font-weight:600; white-space:nowrap; }
/* Kwoty z wc_price() dostają kolor ceny motywu — tu obowiązują kolory karty ceny. */
.ndpr-price .woocommerce-Price-amount{ color:inherit; }
/* 30/70: ten sam blok pokazuje zaliczkę przed i po rabacie (kwoty z NDDE_PAY.split),
   więc zwykła kwota zaliczki NobbyDec Decor (.decor-price-now) chowa się jak suma EPO przy 100%. */
body.ndde-lamele .tc-totals-form.ndpr-on.ndpr-dep .decor-price-now{ display:none; }
/* NobbyDec Decor bez NDDE_PAY (< 1.28): przy 30/70 zostaje tylko informacja o rabacie. */
body.ndde-lamele .tc-totals-form.decor-pay-30:not(.ndpr-dep) .ndpr-was,
body.ndde-lamele .tc-totals-form.decor-pay-30:not(.ndpr-dep) .ndpr-total{ display:none; }
/* Przeliczanie po zmianie konfiguracji — stara kwota przygaszona, bez skoku układu. */
body.ndpr-busy .ndpr-price,
body.ndpr-busy .tc-totals-form .decor-price-now,
body.ndpr-busy .decor-sticky-price,
body.ndpr-busy p.price.ndpr-top{ opacity:.45; transition:opacity .15s; }

/* ---------- Pole «Mam kod rabatowy?»: komunikat pod polem ---------- */
body.ndde-lamele .decor-coupon .ndpr-msg{
  margin-top:6px;
  font-size:12px;
  line-height:16px;
  color:var(--decor-muted);
}
body.ndde-lamele .decor-coupon .ndpr-msg:empty{ display:none; }
body.ndde-lamele .decor-coupon .ndpr-msg.is-ok{ color:var(--decor-accent); font-weight:600; }
body.ndde-lamele .decor-coupon .ndpr-msg.is-err{ color:#b42318; }
body.ndde-lamele .decor-coupon .decor-coupon-row button[disabled]{ opacity:.6; cursor:progress; }
body.ndde-lamele .decor-coupon.is-applied .decor-coupon-row input{ letter-spacing:.06em; font-weight:600; }

/* ---------- Popup ---------- */
.ndpr-popup{
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:rgba(17,20,26,.55);
  opacity:0;
  transition:opacity .2s ease;
  overscroll-behavior:contain;
}
.ndpr-popup[hidden]{ display:none; }
.ndpr-popup.is-open{ opacity:1; }
.ndpr-popup__dialog{
  position:relative;
  box-sizing:border-box;
  width:100%;
  max-width:420px;
  max-height:calc(100vh - 32px);
  max-height:calc(100dvh - 32px);
  overflow-y:auto;
  padding:36px 28px 24px;
  background:var(--decor-bg);
  color:var(--decor-ink);
  border-radius:16px;
  box-shadow:0 24px 64px rgba(17,20,26,.22);
  text-align:center;
  transform:translateY(8px) scale(.98);
  transition:transform .2s ease;
}
.ndpr-popup.is-open .ndpr-popup__dialog{ transform:none; }
.ndpr-popup__offer[hidden],
.ndpr-popup__done[hidden]{ display:none; }

.ndpr-popup .ndpr-popup__close{
  position:absolute;
  top:12px;
  right:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  width:40px;
  height:40px;
  min-height:0;
  margin:0;
  padding:0;
  border:0;
  border-radius:50%;
  background:var(--decor-soft);
  color:var(--decor-ink);
  box-shadow:none;
  cursor:pointer;
}
/* Woodmart ma :is(button,…):hover z własnym tłem — stany ustawiamy jawnie. */
.ndpr-popup .ndpr-popup__close:hover{ background:#eceef1; color:var(--decor-ink); box-shadow:none; }
.ndpr-popup__close svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }

.ndpr-popup .ndpr-popup__title{
  margin:0 0 8px;
  font-size:26px;
  line-height:1.2;
  font-weight:700;
  color:var(--decor-ink);
  text-transform:none;
  letter-spacing:-.01em;
}
.ndpr-popup__title span{ color:var(--decor-accent); white-space:nowrap; }
/* Dłuższy tytuł oferty nie wchodzi pod przycisk «×» (prawy górny róg). */
.ndpr-popup .ndpr-popup__offer .ndpr-popup__title{ padding:0 24px; text-wrap:balance; }
.ndpr-popup .ndpr-popup__text{
  margin:0 0 20px;
  font-size:15px;
  line-height:1.5;
  color:var(--decor-muted);
}
/* Krótka linia zalet pod opisem — drugorzędna (mniejsza niż opis i CTA). */
.ndpr-popup .ndpr-popup__perks{
  margin:-14px 0 18px;
  font-size:13px;
  line-height:18px;
  color:var(--decor-muted);
}

/* Karta kodu */
.ndpr-popup__code{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  column-gap:12px;
  align-items:center;
  margin:0 0 14px;
  padding:12px 12px 12px 16px;
  border:1.5px dashed #c5ccd4;
  border-radius:12px;
  background:var(--decor-soft);
  text-align:left;
}
.ndpr-popup__code-line{               /* «Kod: LAMELE20»; kod przechodzi do nowej linii w całości, nie w połowie */
  grid-column:1;
  min-width:0;
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  column-gap:6px;
}
.ndpr-popup__code-label{
  font-size:15px;
  line-height:26px;
  font-weight:500;
  color:var(--decor-muted);
}
.ndpr-popup__code-value{
  font-size:20px;
  line-height:26px;
  font-weight:700;
  letter-spacing:.08em;
  color:var(--decor-ink);
  max-width:100%;
  overflow-wrap:break-word;
  user-select:all;
}
.ndpr-popup .ndpr-popup__copy{
  grid-column:2;
  grid-row:1;
  height:44px;
  min-height:44px;
  margin:0;
  padding:0 16px;
  border:1px solid #d6d9de;
  border-radius:8px;
  background:#fff;
  color:var(--decor-ink);
  font-size:13px;
  font-weight:600;
  line-height:1;
  text-transform:none;
  letter-spacing:0;
  box-shadow:none;
  cursor:pointer;
}
.ndpr-popup .ndpr-popup__copy:hover{ border-color:var(--decor-ink); background:#fff; color:var(--decor-ink); box-shadow:none; }
.ndpr-popup .ndpr-popup__copy.is-done,
.ndpr-popup .ndpr-popup__copy.is-done:hover{ border-color:var(--decor-accent); background:#fff; color:var(--decor-accent); }

/* Główny przycisk — jak «Dodaj do koszyka» na karcie (52 px, promień 10 px) */
.ndpr-popup .ndpr-popup__cta{
  display:block;
  width:100%;
  height:52px;
  min-height:52px;
  margin:0;
  padding:0 16px;
  border:0;
  border-radius:10px;
  background:var(--decor-ink);
  color:#fff;
  font-size:15px;
  font-weight:600;
  line-height:1.2;
  text-transform:none;
  letter-spacing:0;
  box-shadow:none;
  cursor:pointer;
}
.ndpr-popup .ndpr-popup__cta:hover{ background:#111821; color:#fff; box-shadow:none; }
.ndpr-popup .ndpr-popup__cta[disabled]{ opacity:.7; cursor:progress; }

.ndpr-popup .ndpr-popup__msg{
  margin:10px 0 0;
  font-size:13px;
  line-height:18px;
  color:#b42318;
}
.ndpr-popup .ndpr-popup__msg:empty{ display:none; }
.ndpr-popup .ndpr-popup__timer{
  margin:16px 0 0;
  font-size:13px;
  line-height:18px;
  color:var(--decor-muted);
}
.ndpr-popup__timer b{ font-weight:600; color:var(--decor-ink); font-variant-numeric:tabular-nums; white-space:nowrap; }
.ndpr-popup__timer small{ display:block; margin-top:2px; font-size:12px; line-height:16px; }

/* Stan «zastosowano» */
.ndpr-popup__check{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:52px;
  height:52px;
  margin:0 0 12px;
  border-radius:50%;
  background:#e6f3f4;
  color:var(--decor-accent);
}
.ndpr-popup__check svg{ width:26px; height:26px; fill:none; stroke:currentColor; stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; }
.ndpr-popup .ndpr-popup__done .ndpr-popup__title{ font-size:22px; }

.ndpr-popup__sr,
.ndpr-popup__ta{
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  padding:0;
  overflow:hidden;
  clip:rect(0 0 0 0);
  white-space:nowrap;
  border:0;
}

.ndpr-popup button:focus-visible{ outline:2px solid var(--decor-accent); outline-offset:2px; }
.ndpr-popup .ndpr-popup__cta:focus-visible{ outline-offset:3px; }

/* ---------- Przycisk «−X%» przy prawej krawędzi ----------
   «body» przed klasą: Woodmart ma :is(.btn, button, …) o tej samej wadze
   i ładuje się po wtyczce — bez tego wygrałby position/tło motywu. */
body .ndpr-fab{
  position:fixed;
  top:50%;
  right:0;
  z-index:360;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:2px;
  box-sizing:border-box;
  width:56px;
  height:auto;
  min-height:60px;
  margin:0;
  padding:10px 6px 9px;
  border:0;
  border-radius:12px 0 0 12px;
  background:var(--decor-ink);
  color:#fff;
  box-shadow:0 6px 20px rgba(17,20,26,.18);
  transform:translateY(-50%);
  text-transform:none;
  letter-spacing:0;
  line-height:1;
  cursor:pointer;
}
body .ndpr-fab[hidden]{ display:none; }
/* Pod przyciskiem przejeżdża karta ceny albo przyciski zakupu — chowamy go za krawędź. */
body.ndpr-fab-away .ndpr-fab{ transform:translate(110%, -50%); visibility:hidden; }   /* poza fokusem i czytnikiem */
@media (prefers-reduced-motion:no-preference){
  body .ndpr-fab{ transition:transform .2s ease, visibility 0s linear 0s, background-color .15s; }
  body.ndpr-fab-away .ndpr-fab{ transition:transform .2s ease, visibility 0s linear .2s; }
}
body .ndpr-fab:hover{ background:#111821; color:#fff; box-shadow:0 6px 20px rgba(17,20,26,.18); }
body .ndpr-fab:focus-visible{ outline:2px solid var(--decor-accent); outline-offset:2px; }
body .ndpr-fab__pct{ font-size:15px; font-weight:700; line-height:18px; }
body .ndpr-fab__txt{ font-size:11px; font-weight:500; line-height:14px; opacity:.85; }

/* ---------- Telefon / mała wysokość ---------- */
@media (max-width:480px){
  .ndpr-popup__dialog{ padding:32px 20px 20px; }
  .ndpr-popup .ndpr-popup__close{ width:44px; height:44px; top:8px; right:8px; }
  .ndpr-popup .ndpr-popup__title{ font-size:22px; }
  .ndpr-popup .ndpr-popup__offer .ndpr-popup__title{ padding:0 32px; }   /* «×» 44 px; przy 320 px tytuł w 2 liniach */
  .ndpr-popup__code-value{ font-size:18px; }
  /* «Kod: …» i «Kopiuj kod» / «Kod skopiowany» nie mieszczą się obok siebie — przycisk pod kodem. */
  .ndpr-popup__code{ grid-template-columns:minmax(0, 1fr); row-gap:10px; }
  .ndpr-popup__code-line{ justify-content:center; }
  .ndpr-popup .ndpr-popup__copy{ grid-column:1; grid-row:2; width:100%; }
}
@media (max-width:767px){
  body .ndpr-fab{ width:44px; min-height:52px; padding:9px 4px 8px; top:56%; }
  body .ndpr-fab__pct{ font-size:14px; }
}
@media (max-height:520px){
  .ndpr-popup__dialog{ padding-top:24px; padding-bottom:18px; }
  .ndpr-popup .ndpr-popup__text{ margin-bottom:12px; }
  .ndpr-popup .ndpr-popup__perks{ margin:-8px 0 10px; }
  .ndpr-popup .ndpr-popup__offer .ndpr-popup__title{ font-size:22px; }   /* telefon poziomo: niższy tytuł, dialog bez przewijania */
  .ndpr-popup__code{ margin-bottom:10px; }
  .ndpr-popup .ndpr-popup__timer{ margin-top:10px; }
}

@media (prefers-reduced-motion:reduce){
  .ndpr-popup,
  .ndpr-popup__dialog,
  body.ndpr-busy .ndpr-price{ transition:none; }
  .ndpr-popup__dialog{ transform:none; }
}

/* =========================================================================
   1.3.0 — wygląd popupu promocji: ciemne okno ze wstęgą powodu.

   Blok jest na końcu pliku celowo: nadpisuje jasny układ z wcześniejszych
   sekcji, a te zostają nietknięte (łatwiej wrócić). Selektory z «body» —
   Woodmart ładuje swoje reguły przycisków PO tej wtyczce.
   Kolory: złoto wzorów (#ffc83d) na grafitowym tle; karta produktu jest
   widoczna dookoła, bo tło jest półprzezroczyste i bez rozmycia.
   ========================================================================= */
.ndpr-popup{ background:rgba(12,16,24,.46); }
/* Kolumna: wstęga zostaje na górze, przewija się tylko treść — i dopiero
   wtedy, gdy naprawdę brakuje wysokości (telefon poziomo, niskie ekrany).
   max-height (100dvh − 32px) zostaje z podstawowej reguły .ndpr-popup__dialog. */
.ndpr-popup .ndpr-popup__dialog{
  max-width:430px; padding:0; overflow:hidden; border-radius:18px;
  display:flex; flex-direction:column;
  background:rgba(18,22,31,.96); color:#fff;
  box-shadow:0 30px 80px rgba(0,0,0,.45);
}
.ndpr-popup .ndpr-popup__offer{ display:flex; flex-direction:column; min-height:0; }
/* Reguła wyżej jest mniej szczegółowa niż ta — «hidden» musi dalej ukrywać widok. */
.ndpr-popup .ndpr-popup__offer[hidden]{ display:none; }
/* «×» na złotej wstędze: ciemny znak na jasnym krążku, cel 40 px */
.ndpr-popup .ndpr-popup__close{
  top:6px; right:6px; width:40px; height:40px; padding:0; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background:rgba(255,255,255,.45); color:#5a4208; box-shadow:none;
}
.ndpr-popup .ndpr-popup__close:hover{ background:#fff; color:#1a1205; box-shadow:none; }
.ndpr-popup .ndpr-popup__close svg{ width:15px; height:15px; stroke-width:2.4; }

/* Wstęga: po co jest rabat (tekst z ustawień) + skrócony termin z kuponu */
.ndpr-popup .ndpr-popup__reason{
  margin:0; padding:9px 46px 9px 16px;
  display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap;
  background:linear-gradient(90deg,#b8860b,#f0b429 55%,#ffd76e); color:#1a1205;
  font-size:11.5px; font-weight:800; line-height:1.35; letter-spacing:.09em; text-transform:uppercase;
}
.ndpr-popup .ndpr-popup__reason b{
  background:rgba(0,0,0,.18); color:#fff; border-radius:20px; padding:2px 9px;
  font-size:11px; font-weight:700; letter-spacing:.04em; white-space:nowrap;
}

/* Treść zajmuje resztę wysokości okna i przewija się tylko w razie potrzeby. */
.ndpr-popup .ndpr-popup__body{
  flex:1 1 auto; min-height:0;
  padding:18px 20px 20px; text-align:center;
  overflow-y:auto; overscroll-behavior:contain;
}

/* Taśma wzorów — obrazki już wczytane przez stronę; ścięcie po prawej mówi «jest więcej» */
.ndpr-popup .ndpr-popup__strip{
  display:flex; justify-content:center; margin:0 0 14px;
  -webkit-mask-image:linear-gradient(90deg,#000 82%,transparent);
          mask-image:linear-gradient(90deg,#000 82%,transparent);
}
.ndpr-popup .ndpr-popup__strip span{
  width:46px; height:46px; margin-left:-9px; border-radius:12px;
  background-size:cover; background-position:center;
  border:2px solid #12161f; box-shadow:0 2px 8px rgba(0,0,0,.5);
}
.ndpr-popup .ndpr-popup__strip span:first-child{ margin-left:0; }

.ndpr-popup .ndpr-popup__offer .ndpr-popup__title{
  margin:0 0 8px; padding:0; color:#fff; font-size:25px; line-height:1.18; font-weight:800;
}
.ndpr-popup .ndpr-popup__title i{
  display:block; font-style:normal; color:#ffc83d; font-size:34px; letter-spacing:-.02em;
}
.ndpr-popup .ndpr-popup__text{ margin:0 0 15px; color:#b9c2d0; font-size:13.5px; line-height:1.45; }

/* Korzyść w złotówkach: kwoty liczone z sumy EPO, format z WooCommerce */
.ndpr-popup .ndpr-popup__deal{
  margin:0 0 14px; padding:11px 14px; border-radius:13px;
  background:#1b2130; border:1px solid #2b3446;
  display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap;
}
.ndpr-popup .ndpr-popup__deal[hidden]{ display:none; }
.ndpr-popup .ndpr-popup__deal s{ color:#7d8798; font-size:14px; }
.ndpr-popup .ndpr-popup__deal b{ color:#fff; font-size:22px; font-weight:800; }
.ndpr-popup .ndpr-popup__deal em{
  font-style:normal; background:#0f7f6c; color:#fff; border-radius:20px; padding:3px 10px;
  font-size:11.5px; font-weight:700; white-space:nowrap;
}

body .ndpr-popup .ndpr-popup__cta{
  display:block; width:100%; height:auto; min-height:0; border:0;
  padding:15px 18px; border-radius:12px;
  background:linear-gradient(180deg,#ffc83d,#eb9c11); color:#1a1205;
  font-size:16px; font-weight:800; line-height:1.2; text-transform:none; letter-spacing:0;
  box-shadow:0 8px 22px rgba(240,180,41,.3);
}
body .ndpr-popup .ndpr-popup__cta:hover{ background:linear-gradient(180deg,#ffd45f,#f5a716); color:#1a1205; box-shadow:none; }

.ndpr-popup .ndpr-popup__code{
  margin:12px 0 0; padding:0; border:0; background:none;
  display:flex; align-items:center; justify-content:center; gap:8px; flex-wrap:wrap;
}
.ndpr-popup .ndpr-popup__code-label{ color:#9aa4b4; font-size:12.5px; }
.ndpr-popup .ndpr-popup__code-value{
  color:#fff; background:#1b2130; border:1px dashed #3b465c; border-radius:8px;
  padding:4px 9px; font-size:12.5px; font-weight:700; letter-spacing:.06em;
}
body .ndpr-popup .ndpr-popup__copy{
  border:0; background:none; color:#ffc83d; padding:2px 4px;
  font-size:12.5px; font-weight:600; text-decoration:underline; box-shadow:none;
}
body .ndpr-popup .ndpr-popup__copy:hover,
body .ndpr-popup .ndpr-popup__copy.is-done,
body .ndpr-popup .ndpr-popup__copy.is-done:hover{ border:0; background:none; color:#ffd45f; box-shadow:none; }

/* Zamknięcie bez celowania w «×» — na telefonie okno jest prawie na całą szerokość */
body .ndpr-popup .ndpr-popup__no{
  display:block; width:100%; border:0; background:none; box-shadow:none;
  padding:13px 10px 2px; color:#8b94a4;
  font-size:13px; font-weight:500; line-height:1.3; text-transform:none; letter-spacing:0;
  text-decoration:underline; text-underline-offset:3px;
}
body .ndpr-popup .ndpr-popup__no:hover{ background:none; color:#fff; box-shadow:none; }

.ndpr-popup .ndpr-popup__timer{ margin:9px 0 0; color:#7d8798; font-size:11.5px; line-height:1.5; }
.ndpr-popup .ndpr-popup__timer b{ color:#b9c2d0; }
.ndpr-popup .ndpr-popup__msg{ color:#ffb4a8; }

/* Ekran «Rabat aktywny» — ten sam ciemny układ */
.ndpr-popup .ndpr-popup__done{ padding:26px 20px 22px; text-align:center; }
.ndpr-popup .ndpr-popup__done .ndpr-popup__title{ color:#fff; }
.ndpr-popup .ndpr-popup__check{ background:rgba(15,127,108,.18); color:#3fd3b4; }

/* Przycisk powrotu przy krawędzi — ten sam złoty akcent co CTA */
body .ndpr-fab{
  border:0; padding:11px 9px; border-radius:12px 0 0 12px;
  background:linear-gradient(180deg,#ffc83d,#eb9c11); color:#1a1205;
  box-shadow:0 6px 20px rgba(235,156,17,.42);
}
body .ndpr-fab:hover{ background:linear-gradient(180deg,#ffd45f,#f5a716); color:#1a1205; }
body .ndpr-fab .ndpr-fab__txt{ color:#1a1205; font-weight:700; opacity:.9; }
body .ndpr-fab .ndpr-fab__pct{ color:#1a1205; font-weight:800; }

@media (max-width:480px){
  .ndpr-popup .ndpr-popup__dialog{ max-width:94vw; padding:0; }
  .ndpr-popup .ndpr-popup__reason{ padding:8px 42px 8px 12px; gap:6px; font-size:10px; letter-spacing:.06em; }
  .ndpr-popup .ndpr-popup__reason b{ padding:2px 8px; font-size:10px; }
  .ndpr-popup .ndpr-popup__body{ padding:15px 15px 17px; }
  .ndpr-popup .ndpr-popup__strip span{ width:40px; height:40px; }
  .ndpr-popup .ndpr-popup__offer .ndpr-popup__title{ font-size:21px; }
  .ndpr-popup .ndpr-popup__title i{ font-size:30px; }
  .ndpr-popup .ndpr-popup__text{ font-size:12.5px; }
  .ndpr-popup .ndpr-popup__deal b{ font-size:19px; }
  body .ndpr-popup .ndpr-popup__cta{ padding:14px 12px; font-size:14.5px; }
}
