/*
 * TYMCZASOWE — plakietki rabatu online BLACK WEEKS (functions/black-weeks-promo.php).
 * Ładowane poza gulpem; do usunięcia razem z modułem.
 * Proporcje karty 1452 × 1083; wszystko skaluje się z szerokością plakietki (cqw), więc ten sam
 * HTML działa na listingu, w kaflu standardu i w kreatorze.
 */

/* --- Rama: nadpisuje wymiary bazowej plakietki ------------------------------------------- */
.online-discount.online-discount--blackweeks {
  width: 190px;
  max-width: calc(100% - 16px);
  margin: 6px auto 12px;
  aspect-ratio: 1452 / 1083;
  container-type: inline-size;
  isolation: isolate;
  color: #111;
  font-family: 'Open Sans', sans-serif;
  line-height: 1;
}

.online-discount-scope .online-discount--blackweeks.online-discount--listing {
  top: 12px;
  right: 10px;
  width: 180px;
  max-width: 180px;
  margin: 0;
  transform: none;
}

.reservation-sidebar-summary .online-discount--blackweeks.online-discount--checkout {
  width: 230px;
  max-width: 100%;
  margin: 14px auto 10px;
}

/* Kolumna pod plakietką na listingu potrzebuje odrobinę więcej miejsca niż pod zwykłą. */
@media (min-width: 992px) {
  .online-discount-scope .singleOffer.has-online-discount .singleOffer__core__functions {
    padding-top: 150px;
  }
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .online-discount-scope .singleOffer.has-online-discount .singleOffer__core__details {
    padding-top: 150px;
  }
}

/* Ramka karty z EXTRA rabatem — złoto zamiast różu. */
.online-discount-scope .singleOffer.has-double-discount {
  border-color: #c9a13b;
  box-shadow: 0 1px 4px rgba(201, 161, 59, .18);
}

/* --- Karta ----------------------------------------------------------------------------------- */
.online-discount--blackweeks .bw-badge__card {
  position: absolute;
  z-index: 1;
  inset: 22% 10% 13.4% 10%;
  overflow: hidden;
  border: 1px solid #c9a13b;
  border-radius: 7.5% / 10.5%;
  background:
    radial-gradient(ellipse 60% 50% at 18% 12%, rgba(255, 255, 255, .85), transparent 70%),
    linear-gradient(165deg, #f4f4f5 0%, #e3e3e5 50%, #d6d6d9 100%);
  box-shadow:
    0 0 0 .5px rgba(122, 92, 22, .5),
    inset 0 0 0 .5px rgba(255, 233, 160, .7),
    0 4px 10px rgba(0, 0, 0, .18);
}

/* Łuk połysku: dolna krawędź dużej elipsy — nisko z lewej, wznosi się w prawo. */
.online-discount--blackweeks .bw-badge__card::after {
  content: "";
  position: absolute;
  left: -110%;
  top: -92%;
  width: 230%;
  height: 160%;
  border-bottom: 1.5px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(255, 255, 255, .6);
  pointer-events: none;
}

.online-discount--blackweeks.bw-badge--extra .bw-badge__card {
  background: linear-gradient(145deg, #242b34 0%, #3b4652 55%, #566473 100%);
  box-shadow:
    0 0 0 .5px rgba(122, 92, 22, .5),
    inset 0 1px 0 rgba(255, 255, 255, .12),
    0 4px 10px rgba(32, 48, 64, .3);
}

.online-discount--blackweeks.bw-badge--extra .bw-badge__card::after {
  display: none;
}

/* --- Okrąg z procentem ---------------------------------------------------------------------- */
.online-discount--blackweeks .bw-badge__percent {
  position: absolute;
  z-index: 3;
  top: 10.9%;
  left: 58.9%;
  width: 23%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9a13b;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #fff 0%, #ececee 55%, #d2d2d5 100%);
  box-shadow:
    0 0 0 .5px rgba(122, 92, 22, .5),
    inset 0 0 0 .5px rgba(255, 233, 160, .7),
    0 3px 8px rgba(0, 0, 0, .2);
}

.online-discount--blackweeks .bw-badge__percent span {
  font-size: 15cqw;
  font-weight: 800;
  line-height: 1;
  color: #111;
}

.online-discount--blackweeks.bw-badge--extra .bw-badge__percent {
  background: linear-gradient(145deg, #242b34, #566473);
  box-shadow:
    0 0 0 .5px rgba(122, 92, 22, .5),
    0 2px 6px rgba(32, 48, 64, .35);
}

.online-discount--blackweeks.bw-badge--extra .bw-badge__percent span {
  color: #fff;
}

/* --- Teksty: nagłówek w rogu, kwota na środku, stopka pod nią -------------------------------- */
.online-discount.online-discount--blackweeks p,
.online-discount.online-discount--blackweeks .bw-badge__amount {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 0;
  border: 0;
  font-family: inherit;
  font-weight: 800;
  line-height: 1;
  text-transform: none;
  text-shadow: none;
  white-space: nowrap;
  color: #111;
}

.online-discount.online-discount--blackweeks .bw-badge__heading {
  top: 31%;
  left: 17%;
  font-size: 6.3cqw;
  letter-spacing: -.01em;
  text-align: left;
}

.online-discount.online-discount--blackweeks .bw-badge__amount {
  top: 43%;
  left: 10%;
  right: 10%;
  font-size: 16.5cqw;
  letter-spacing: -.035em;
  text-align: center;
}

.online-discount.online-discount--blackweeks .bw-badge__footer {
  top: 69.5%;
  left: 10%;
  right: 10%;
  font-size: 5.4cqw;
  text-align: center;
}

.online-discount.online-discount--blackweeks.bw-badge--extra p {
  color: #fff;
}

.online-discount.online-discount--blackweeks.bw-badge--extra .bw-badge__amount {
  color: #ffda00;
}

/* --- Kafelek „ŁAP RABAT / rezerwuj online 24/7” w nagłówku ------------------------------------ */
/* Ten sam markup i wymiary co zwykły kafelek, tylko grafitowe tło i złote obwódki.
 * Selektory jak w parts/_header.scss, żeby wygrać kolejnością. */
header .col-contact--online .header-online-badge,
header .header-online-row .header-online-badge {
  border-color: #b9a77b;
  background: linear-gradient(145deg, #505d69 0%, #3d4854 45%, #2c3540 100%);
  box-shadow: 0 2px 6px rgba(32, 48, 64, .14), inset 0 1px 2px rgba(255, 255, 255, .14);
}

header .col-contact--online .header-online-badge::before,
header .header-online-row .header-online-badge::before {
  display: none;
}

header .col-contact--online .header-online-badge:focus-visible,
header .header-online-row .header-online-badge:focus-visible {
  outline-color: #ffd200;
}

header .col-contact--online .header-online-badge__percent,
header .header-online-row .header-online-badge__percent {
  border-color: #c6b58c;
  background: radial-gradient(circle at 32% 20%, #626f7b 0%, #45525e 55%, #303b46 100%);
  box-shadow: 0 2px 5px rgba(32, 48, 64, .19), inset 0 1px 2px rgba(255, 255, 255, .16);
  text-shadow: none;
  transform: none;
}

/* --- Pozycja „Black Friday” w menu ------------------------------------------------------------ */
/* Żółta pigułka z ciemnym tekstem. Klasę menu-item--black-friday nadaje się w Wygląd → Menu
 * (Klasy CSS), tak jak menu-item--special — ta zostaje różowa dla innych pozycji (np. SuperLast). */
header .col-menu ul li.menu-item.menu-item--black-friday {
  margin: 4px 0;
  padding: 0 8px;
  border-color: #f2c200;
  border-radius: 5px;
  background: #ffc914;
  /* Link motywu animuje kolor 0,2 s — tło musi iść w tym samym tempie, inaczej napis miga. */
  transition: background-color .2s ease-in-out, border-color .2s ease-in-out;
}

/* Mniejszy padding linku oddany marginesem pozycji, żeby tekst stał w linii z sąsiadami. */
header .col-menu ul li.menu-item.menu-item--black-friday > a {
  padding-top: 4px;
  padding-bottom: 4px;
  color: #111;
}

/* Hover: kolory zamieniają się miejscami — czarne tło, żółty tekst. */
header .col-menu ul li.menu-item.menu-item--black-friday:hover {
  border-color: #111;
  background: #111;
}

header .col-menu ul li.menu-item.menu-item--black-friday:hover > a {
  color: #ffc914;
}

/* Menu mobilne (burger): kafelki pozycji mają własne tło, więc tylko podmiana kolorów. */
#collapse-menu #burgerMenu > li.menu-item--black-friday:not(.li-search-container) {
  background: #ffc914;
}

#collapse-menu #burgerMenu > li.menu-item--black-friday:not(.li-search-container) > a {
  color: #111;
}

#collapse-menu #burgerMenu > li.menu-item--black-friday:not(.li-search-container) > a img {
  filter: brightness(0);
}

/* Kwota przy etykiecie pozycji menu („Black Friday <strong class="bf-header-saving">-1000 zł</strong>”). */
.bf-header-saving {
  font-weight: 900;
  white-space: nowrap;
}

/* --- Listing ---------------------------------------------------------------------------------- */
#search-result-list .singleOffer.has-online-discount .promoButton {
  border-color: #ffda00;
  background: #ffda00;
  color: #111;
  font-weight: 700;
}

#search-result-list .singleOffer.has-online-discount .promoButton span {
  color: #111;
}

#search-result-list .singleOffer.has-online-discount .promoButton:hover,
#search-result-list .singleOffer.has-online-discount .promoButton:focus {
  border-color: #ffe94d;
  background: #ffe94d;
  color: #111;
}

#search-result-list .singleOffer.has-online-discount .promoButton:focus-visible {
  outline: 3px solid #263b50;
  outline-offset: 3px;
}

/* Przerywnik: plakietki skalują się z szerokością zdjęcia, nie mają minimalnej szerokości ramy. */
#search-result-list .cutscene-image__badges > .online-discount--blackweeks {
  width: 24%;
  max-width: none;
  margin: 0;
  transform: translateY(-3%);
}

/* --- Kalkulator na stronie obiektu ------------------------------------------------------------- */
.calculator.calculator--online-discount {
  border-color: #d5d9dc;
}

.calculator.calculator--online-discount .calculator__border {
  overflow: hidden;
  border: 1px solid #d5d9dc;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, .08);
}

.calculator-online-discount {
  padding: 18px 21px;
  background: linear-gradient(135deg, #20252c, #505e6a);
}

.calculator-online-discount__amount {
  font-size: 30px;
  color: #ffda00;
}

.calculator.calculator--online-discount .calculator__form:not(.navyblue) {
  background: #f7f8fa;
}

.calculator.calculator--online-discount .calculator__form.navyblue {
  background: linear-gradient(145deg, #242b34, #566473);
}

.calculator.calculator--online-discount .price-basic .price-summary-label {
  font-weight: 700;
}

.calculator.calculator--online-discount .calculator-price-final,
.calculator.calculator--online-discount .price-total .final-currency-symbol {
  color: #ffda00;
}

.calculator.calculator--online-discount .calculator__reservation .reservation_form_submit {
  border: 0;
  background: #ffda00;
  box-shadow: none;
  color: #111;
}

.calculator.calculator--online-discount .calculator__reservation .reservation_form_submit:hover {
  background: #ffe94d;
}

.calculator.calculator--online-discount .calculator__reservation .reservation_form_submit img {
  filter: brightness(0);
}

.calculator-online-discount-terms {
  border-radius: 0 0 10px 10px;
  background: #fff;
}

.calculator-online-discount-terms a {
  color: #365d7a;
  text-decoration: underline;
}

/* --- Podsumowanie w kreatorze rezerwacji z rabatem -------------------------------------------- */
/* Atrybut data-online-discount ustawia sidebar-hotel.php i reservation-steps.js („none” bez rabatu). */
.reservation-steps-sidebar[data-online-discount]:not([data-online-discount="none"]) {
  border-color: #434b54;
  box-shadow: 0 5px 20px rgba(0, 0, 0, .08);
}

.reservation-steps-sidebar[data-online-discount]:not([data-online-discount="none"]) .reservation-sidebar-header {
  border-bottom: 0;
  background: linear-gradient(135deg, #20252c, #505e6a);
  color: #ffda00;
}

.reservation-steps-sidebar[data-online-discount]:not([data-online-discount="none"]) .price-details .total-discount-online {
  width: calc(100% + 16px);
  margin: 4px -8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff6c2;
  color: #202a33;
}

.reservation-steps-sidebar[data-online-discount]:not([data-online-discount="none"]) .reservation-sidebar-summary .total-price-container {
  align-items: center;
  padding: 14px 16px;
  border-radius: 10px;
  background: linear-gradient(145deg, #242b34, #566473);
}

.reservation-steps-sidebar[data-online-discount]:not([data-online-discount="none"]) .reservation-sidebar-summary .total-price-container > span {
  color: #fff;
}

.reservation-steps-sidebar[data-online-discount]:not([data-online-discount="none"]) .reservation-sidebar-summary .total {
  color: #ffda00;
}

.reservation-steps-sidebar[data-online-discount]:not([data-online-discount="none"]) .reservation-steps-sidebar__next {
  background: #ffda00;
  color: #111;
}

.reservation-steps-sidebar[data-online-discount]:not([data-online-discount="none"]) .reservation-steps-sidebar__next:hover {
  background: #ffe94d;
}

.reservation-steps-sidebar[data-online-discount]:not([data-online-discount="none"]) .reservation-sidebar-summary .payment-split {
  color: #202a33;
}

/* --- Kafelek standardu z rabatem ---------------------------------------------------------------- */
/* div.standards-list jak w sections/_section-standards-list.scss — wygrywa z zieloną ramką online. */
div.standards-list .single-standard[data-online-discount],
div.standards-list .single-standard[data-online-discount][data-sales-mode="online"].highlighted {
  border-color: #434b54;
}

.standards-list .single-standard[data-online-discount] .single-standard_sales-mode-online {
  background: linear-gradient(135deg, #252b33, #4e5b67);
  color: #ffda00;
}

.standards-list .single-standard[data-online-discount] .single-standard_sales-mode-online p {
  color: #ffda00;
}

.standards-list .single-standard[data-online-discount] .single-standard_total-price {
  color: #202a33;
  font-weight: 800;
}

.standards-list .single-standard[data-online-discount] .single-standard_button > .online-discount--blackweeks {
  width: 190px;
  margin: 0 auto 10px;
}

.standards-list .single-standard.highlighted[data-online-discount] .online-discount ~ .single-standards-reservation-form button {
  border-color: #ffda00;
  background: #ffda00;
  color: #111;
  font-weight: 700;
}

.standards-list .single-standard.highlighted[data-online-discount] .online-discount ~ .single-standards-reservation-form button:hover {
  border-color: #ffe94d;
  background: #ffe94d;
}
