/* SANTA+ abonēšanas baneris — v2.0 (Melnā piektdiena)
   Desktop: josla lapas apakšā, atveras līdz ~pusei ekrāna.
   Mobilais (<768px): kompakta josla VIRS apakšējās navigācijas, atveras kā bottom sheet.
   Krāsas maina šeit, :root mainīgajos. */

.spb-bf {
  --spb-bg: #000000;
  --spb-fg: #FFFFFF;
  --spb-muted: #D9D9D9;
  --spb-accent: #FFFFFF;              /* pogas */
  --spb-accent-fg: #000000;           /* teksts uz pogām */
  --spb-red: #E3262F;                 /* Melnās piektdienas sarkanā (kā landing lapā) */
  --spb-red-hi: #FF3B44;
  --spb-red-deep: #A90F18;
  --spb-tag-bg: #FFE500;
  --spb-tag-fg: #111111;
  --spb-card-bg: #141414;
  --spb-control-bg: rgba(255,255,255,.14);
  --spb-line: #2A2A2A;                /* plānas līnijas / rokturis */
  --spb-note: #BDBDBD;
  --spb-bottom-offset: 0px;           /* JS iestata = apakšējās navigācijas augstums (mobilajā) */
  --spb-z: 9990;                      /* virs lapas satura, zem cookie loga */
  --spb-font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --spb-font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-family: var(--spb-font-sans);
}
.spb-bf[hidden] { display: none !important; }
.spb-bf *, .spb-bf *::before, .spb-bf *::after { box-sizing: border-box; }

/* ---------- Panelis ---------- */
.spb-panel {
  position: fixed;
  left: 0; right: 0;
  bottom: var(--spb-bottom-offset);
  z-index: var(--spb-z);
  background: var(--spb-bg);
  color: var(--spb-fg);
  transform: translateY(0);
  transition: transform .3s ease;
  box-shadow: 0 -4px 16px rgba(0,0,0,.25);
}
.spb-bf.is-entering .spb-panel,
.spb-bf.is-away .spb-panel { transform: translateY(calc(100% + var(--spb-bottom-offset) + 20px)); }
@media (prefers-reduced-motion: reduce) { .spb-panel { transition: none; } }

.spb-scrim {
  display: none;
  position: fixed; inset: 0;
  z-index: calc(var(--spb-z) - 1);
  background: rgba(0,0,0,.6);
}

.spb-inner {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  height: 128px;
  padding: 0 96px 0 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.spb-handle { display: none; }
.spb-brand { display: contents; }
.spb-logo { display: block; height: 44px; width: auto; flex: 0 0 auto; }
.spb-divider { flex: 0 0 1px; width: 1px; height: 96px; background: var(--spb-fg); opacity: .3; }

.spb-copy { width: 420px; flex: 0 1 420px; display: flex; flex-direction: column; gap: 18px; }
.spb-title {
  margin: 0;
  font-family: var(--spb-font-serif);
  font-weight: 600; font-size: 28px; line-height: 1.15;
  color: var(--spb-fg);
}
.spb-desc { display: none; margin: 0; font-size: 17px; line-height: 1.5; color: var(--spb-muted); }

/* Akcijas termiņš: tumša "pill" zīme virs virsraksta (atšķiras no dzeltenajām atlaidēm un sarkanās pogas) */
.spb-deadline {
  margin: 0; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--spb-fg); color: var(--spb-bg);
  font-family: var(--spb-font-sans); font-size: 13px; font-weight: 600; line-height: 1.2;
  white-space: nowrap;
}
.spb-deadline svg { width: 14px; height: 14px; flex: 0 0 auto; }
.spb-deadline-short { display: none; }
.spb-bf:not(.is-open) .spb-copy { gap: 8px; }

/* ---------- Pogas ---------- */
.spb-actions { display: flex; align-items: center; gap: 32px; flex: 0 0 auto; }
.spb-btn {
  font: inherit; cursor: pointer; border: 0;
  height: 48px; padding: 0 28px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  font-weight: 700; font-size: 18px; text-decoration: none;
}
.spb-btn--primary { min-width: 240px; background: var(--spb-accent); color: var(--spb-accent-fg); }
.spb-btn--primary:hover { opacity: .88; }
.spb-btn--ghost { padding: 0 20px; background: transparent; color: var(--spb-fg); border: 1.5px solid var(--spb-fg); font-weight: 600; }
.spb-btn--ghost:hover { background: rgba(255,255,255,.1); }
.spb-btn svg { width: 22px; height: 22px; flex: 0 0 auto; }

.spb-iconbtn {
  cursor: pointer; border: 0;
  width: 44px; height: 44px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--spb-control-bg); color: var(--spb-fg);
}
.spb-iconbtn svg { width: 22px; height: 22px; }
.spb-toggle { position: absolute; right: 32px; top: 50%; margin-top: -22px; }
.spb-toggle svg { transition: transform .2s ease; }
.spb-bf.is-open .spb-toggle svg { transform: rotate(180deg); }
.spb-x { display: none; background: transparent; }

.spb-bf :focus-visible { outline: 3px solid var(--spb-fg); outline-offset: 3px; }

/* ---------- Tarifi (redzami tikai atvērtā stāvoklī) ---------- */
.spb-plans { display: none; width: 420px; flex: 0 0 420px; flex-direction: column; gap: 14px; margin: 0; border: 0; padding: 0; }
.spb-plans legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.spb-plan {
  position: relative;
  height: 60px; padding: 0 20px;
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--spb-fg); border-radius: 8px;
  background: var(--spb-card-bg); color: var(--spb-fg);
  font-size: 18px; cursor: pointer;
}
.spb-plan:has(input:checked) { border: 2px solid var(--spb-accent); }
.spb-plan input { width: 22px; height: 22px; margin: 0; accent-color: var(--spb-accent); flex: 0 0 auto; }
.spb-tag {
  position: absolute; top: -13px; right: 16px;
  padding: 4px 10px; border-radius: 3px;
  background: var(--spb-tag-bg); color: var(--spb-tag-fg);
  font-size: 14px; font-weight: 700;
}
.spb-plan-text { display: flex; flex-direction: column; gap: 2px; }
.spb-plan-note { font-size: 13px; color: var(--spb-note); }
.spb-plan--single { min-height: 72px; padding-block: 12px; font-size: 20px; cursor: default; }
.spb-plan--single input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.spb-submit { margin-top: 10px; height: 56px; width: 100%; font-size: 20px; }

/* ---------- Desktop: atvērts ---------- */
.spb-bf.is-open .spb-inner {
  height: auto;
  min-height: min(450px, 60vh);
  padding: 40px 96px 40px 48px;
  gap: 40px;
}
.spb-bf.is-open .spb-logo { align-self: flex-start; margin-top: 8px; }
.spb-bf.is-open .spb-divider { height: auto; align-self: stretch; }
.spb-bf.is-open .spb-copy { width: 460px; flex-basis: 460px; }
.spb-bf.is-open .spb-title { font-size: 38px; line-height: 1.1; letter-spacing: -0.01em; }
.spb-bf.is-open .spb-desc { display: block; }
.spb-bf.is-open .spb-actions { display: none; }
.spb-bf.is-open .spb-plans { display: flex; }
.spb-bf.is-open .spb-toggle { top: 24px; margin-top: 0; }

/* Vidēji ekrāni: kompaktāk */
@media (max-width: 1200px) and (min-width: 768px) {
  .spb-inner { gap: 20px; padding: 0 84px 0 24px; }
  .spb-copy { width: 300px; flex-basis: 300px; }
  .spb-title { font-size: 22px; }
  .spb-actions { gap: 12px; }
  .spb-btn--primary { min-width: 0; }
  .spb-bf.is-open .spb-inner { gap: 24px; padding: 32px 84px 32px 24px; }
  .spb-bf.is-open .spb-copy { width: 340px; flex-basis: 340px; }
  .spb-bf.is-open .spb-title { font-size: 30px; }
  .spb-plans { width: 360px; flex-basis: 360px; }
}

/* ---------- Mobilais ---------- */
@media (max-width: 767.98px) {
  /* Aizvērts: 84px josla virs apakšējās navigācijas */
  .spb-panel { box-shadow: 0 -4px 16px rgba(0,0,0,.12); }
  .spb-inner {
    height: 84px;
    padding: 0 12px 0 16px;
    gap: 10px;
    justify-content: flex-start;
  }
  .spb-handle {
    display: block; position: absolute; top: 6px; left: 50%;
    width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: #5A5A5A;
  }
  .spb-divider { display: none; }
  .spb-brand { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 5px; cursor: pointer; }
  .spb-logo { height: 18px; align-self: flex-start; }
  .spb-copy { width: auto; flex: 1 1 auto; }
  .spb-title { font-family: var(--spb-font-sans); font-size: 13px; line-height: 1.3; font-weight: 500; }

  /* Mobilajā aizvērtā joslā: īsā termiņa zīme blakus logo, virsraksts zem tiem */
  .spb-bf:not(.is-open) .spb-brand { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; row-gap: 5px; align-items: center; }
  .spb-bf:not(.is-open) .spb-copy { display: contents; }
  .spb-bf:not(.is-open) .spb-logo { grid-column: 1; grid-row: 1; }
  .spb-bf:not(.is-open) .spb-deadline { grid-column: 2; grid-row: 1; justify-self: start; padding: 2px 7px; font-size: 11px; gap: 4px; }
  .spb-bf:not(.is-open) .spb-deadline svg { width: 11px; height: 11px; }
  .spb-bf:not(.is-open) .spb-deadline-full { display: none; }
  .spb-bf:not(.is-open) .spb-deadline-short { display: inline; }
  .spb-bf:not(.is-open) .spb-title { grid-column: 1 / -1; grid-row: 2; }
  .spb-bf.is-open .spb-deadline { font-size: 12px; }
  .spb-actions { gap: 0; }
  .spb-btn--primary { min-width: 0; height: 44px; padding: 0 18px; font-size: 15px; gap: 6px; }
  .spb-btn--primary svg { width: 16px; height: 16px; }
  .spb-x { display: inline-flex; }
  .spb-toggle { display: none; }

  /* Atvērts: bottom sheet, sedz arī navigāciju */
  .spb-bf.is-open .spb-scrim { display: block; }
  .spb-bf.is-open .spb-panel {
    bottom: 0;
    max-height: 85vh; max-height: 85dvh;
    border-radius: 20px 20px 0 0;
    box-shadow: none;
    display: flex; flex-direction: column;
    z-index: calc(var(--spb-z) + 1);
  }
  .spb-bf.is-open .spb-inner {
    height: auto; min-height: 0;
    flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: 24px 20px 0; gap: 14px;
  }
  .spb-bf.is-open .spb-handle { top: 8px; }
  .spb-bf.is-open .spb-brand { flex: 0 0 auto; gap: 14px; cursor: default; }
  .spb-bf.is-open .spb-logo { height: 24px; margin-top: 4px; }
  .spb-bf.is-open .spb-copy { width: auto; flex: 0 0 auto; }
  .spb-bf.is-open .spb-title { font-family: var(--spb-font-serif); font-size: 28px; line-height: 1.12; font-weight: 600; letter-spacing: 0; }
  .spb-bf.is-open .spb-desc { font-size: 15px; }
  .spb-bf.is-open .spb-plans { width: 100%; flex: 0 0 auto; margin-top: 6px; }
  .spb-plan { height: 56px; padding: 0 16px; font-size: 16px; gap: 12px; }
  .spb-tag { top: -12px; right: 12px; padding: 3px 8px; font-size: 13px; }
  .spb-bf.is-open .spb-submit {
    position: sticky; bottom: 0;
    margin: 6px -20px 0; width: calc(100% + 40px);
    height: auto; border-radius: 0;
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--spb-bg);
    border-top: 1px solid var(--spb-line);
  }
  .spb-bf.is-open .spb-submit { display: block; }
  .spb-bf.is-open .spb-submit > span {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px; border-radius: 999px; background: var(--spb-accent); font-size: 18px;
  }
  .spb-bf.is-open .spb-toggle { display: inline-flex; position: absolute; top: 12px; right: 8px; background: transparent; }
  .spb-bf.is-open .spb-x { display: none; }

}

/* Desktop/tablet: submit poga ir pati poga (span bez fona) */
@media (min-width: 768px) {
  .spb-submit > span { display: inline-flex; align-items: center; gap: 12px; }
}

/* --- v1.1: aizvērtās joslas poga "Uzzināt vairāk" (mobilajā kompaktāka, lai teksts ietilpst) --- */
@media (max-width: 767.98px) {
  .spb-bf:not(.is-open) .spb-actions .spb-btn--primary { padding: 0 14px; font-size: 14px; gap: 4px; }
  .spb-bf:not(.is-open) .spb-actions .spb-btn--primary svg { display: none; }
  .spb-bf:not(.is-open) .spb-brand { min-width: 0; }
}
@media (max-width: 379.98px) {
  .spb-bf:not(.is-open) .spb-inner { gap: 6px; }
  .spb-bf:not(.is-open) .spb-actions .spb-btn--primary { padding: 0 12px; font-size: 13px; }
  .spb-bf:not(.is-open) .spb-brand { column-gap: 6px; }
  .spb-bf:not(.is-open) .spb-logo { height: 16px; }
  .spb-bf:not(.is-open) .spb-deadline { padding: 2px 6px; font-size: 10px; }
  .spb-bf:not(.is-open) .spb-deadline svg { display: none; }
}

/* --- v1.2: cenu piezīmes mobilajā mazliet mazākas, lai ietilpst vienā rindā --- */
@media (max-width: 767.98px) {
  .spb-plan-note { font-size: 12px; }
}
/* lodziņš aug līdzi, ja piezīme šaurā ekrānā pārlec otrā rindā */
.spb-plan { height: auto; min-height: 60px; padding-block: 8px; }
@media (max-width: 767.98px) { .spb-plan { min-height: 56px; } }

/* --- v2.1: aizvērtajā joslā cits virsraksts; atvērtajā žurnālu saraksts --- */
.spb-title--open, .spb-mags { display: none; }
.spb-bf.is-open .spb-title--closed { display: none; }
.spb-bf.is-open .spb-title--open { display: block; }
.spb-bf.is-open .spb-mags { display: block; margin: 0; font-size: 15px; line-height: 1.5; color: var(--spb-fg); }
.spb-mags strong { font-weight: 700; }
@media (max-width: 767.98px) { .spb-bf.is-open .spb-mags { font-size: 14px; } }

/* --- v2.2: "Melnā piektdiena" vārdzīme logo vietā; SANTA+ logo virsraksta tekstā --- */
.spb-bf .spb-wordmark {
  height: auto; width: auto; margin: 0;
  display: flex; flex-direction: column;
  font-family: "IBM Plex Sans Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  font-weight: 700; text-transform: uppercase; letter-spacing: .01em;
  font-size: 30px; line-height: .95; color: var(--spb-fg); white-space: nowrap;
}
.spb-inline-logo { display: inline; height: .72em; width: auto; vertical-align: baseline; }
@media (max-width: 1200px) and (min-width: 768px) { .spb-bf .spb-wordmark { font-size: 26px; } }
@media (max-width: 767.98px) {
  .spb-bf .spb-wordmark { flex-direction: row; gap: .28em; font-size: 15px; line-height: 1; height: auto; }
  .spb-bf.is-open .spb-wordmark { font-size: 22px; }
}
@media (max-width: 379.98px) { .spb-bf:not(.is-open) .spb-wordmark { font-size: 13px; height: auto; } }
@media (max-width: 767.98px) {
  /* mobilajā aizvērtajā joslā: vārdzīme virs virsraksta, termiņa zīme tikai atvērtajā skatā */
  .spb-bf:not(.is-open) .spb-brand { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .spb-bf:not(.is-open) .spb-copy { display: block; min-width: 0; }
  .spb-bf:not(.is-open) .spb-deadline { display: none; }
  .spb-bf:not(.is-open) .spb-wordmark { max-width: 100%; line-height: 1.15; }
}

/* --- v2.3: termiņš pie pogas mobilajā aizvērtajā joslā (steidzamība tieši pie darbības) --- */
.spb-cta { display: contents; }
.spb-cta-note { display: none; }
@media (max-width: 767.98px) {
  .spb-bf:not(.is-open) .spb-cta { display: flex; flex-direction: column; align-items: center; gap: 3px; }
  .spb-bf:not(.is-open) .spb-cta-note {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 11px; font-weight: 600; line-height: 1.2; color: var(--spb-muted); white-space: nowrap;
  }
  .spb-bf:not(.is-open) .spb-cta-note svg { width: 11px; height: 11px; }
}

/* --- v2.4: CRO labojumi --- */
.spb-deadline-extra { display: none; }
.spb-bf.is-open .spb-deadline-extra { display: inline; }
/* bultiņas aplis vienmēr tumši pelēks, lai nekonkurē ar balto CTA pogu */
.spb-bf .spb-toggle { background: #2A2A2A; color: #FFFFFF; }
@media (max-width: 767.98px) { .spb-bf.is-open .spb-toggle { background: transparent; } }

/* --- v2.5: pusgads kā galvenais āķis --- */
.spb-tl-short { display: none; }
@media (max-width: 767.98px) {
  .spb-tl-full { display: none; }
  .spb-tl-short { display: inline; }
}
.spb-plan-main { font-size: 24px; line-height: 1.2; letter-spacing: .01em; }
.spb-plan--single .spb-plan-note { font-size: 14px; }
.spb-plan--single { min-height: 84px; }
@media (max-width: 767.98px) {
  .spb-plan-main { font-size: 20px; }
  .spb-plan--single .spb-plan-note { font-size: 13px; }
  .spb-plan--single { min-height: 76px; }
}
/* aizvērtās joslas garākais teksts ietilpst 128px joslā */
@media (min-width: 768px) {
  .spb-bf:not(.is-open) .spb-title--closed { font-size: 24px; line-height: 1.15; }
}
@media (min-width: 1201px) {
  .spb-bf:not(.is-open) .spb-copy { width: 540px; flex-basis: 540px; }
}
@media (max-width: 1200px) and (min-width: 768px) {
  .spb-tl-full { display: none; }
  .spb-tl-short { display: inline; }
  .spb-bf:not(.is-open) .spb-copy { width: 360px; flex-basis: 360px; }
  .spb-bf:not(.is-open) .spb-title--closed { font-size: 20px; }
}

/* --- v2.6: sarkanā krāsa emoji vietā (kā landing lapā) --- */
/* sarkana lente joslas augšmalā */
.spb-panel::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; pointer-events: none;
  background: linear-gradient(90deg, var(--spb-red-deep), var(--spb-red) 35%, var(--spb-red) 65%, var(--spb-red-deep));
}
/* atslēgas vārds un cena sarkanā */
.spb-hl { color: var(--spb-red-hi); }
/* termiņa zīme sarkana, ar lielajiem burtiem kā landing lapas lente */
.spb-bf .spb-deadline {
  background: #D41E27; color: #FFFFFF;
  text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 700;
}
.spb-bf .spb-cta-note { color: var(--spb-red-hi); }
@media (max-width: 767.98px) {
  .spb-bf.is-open .spb-panel::before { display: none; }
  .spb-bf.is-open .spb-deadline { font-size: 11px; white-space: normal; letter-spacing: .04em; border-radius: 12px; }
}
