/* Breadcrumbs, form fields and the /kontakti and /blagodarim layouts.
   Fields follow the button rule: no outline and no ring. Focus = 1px lift, a 2px cyan bottom edge
   (inset 0 -2px 0 #00e0ff) and soft cyan light under the field. Errors get a #ff8a7a bottom edge. */

/* ---------- breadcrumbs (the same names and order as the BreadcrumbList) ---------- */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; list-style: none; font-size: 1.0625rem; color: var(--text-soft); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: "/"; margin: 0 10px; color: rgba(166, 182, 204, .6); }
.crumbs a {
  display: inline-flex; align-items: center; min-height: 2.75rem; color: #cfdcef; text-decoration: none; outline: none;
  transition: color .25s, text-shadow .25s, translate .25s;
}
.crumbs a:is(:hover, :focus-visible) { color: var(--cyan-bright); text-decoration: underline; text-underline-offset: 4px; }
.crumbs a:focus-visible { text-shadow: 0 4px 14px rgba(0, 224, 255, .5); translate: 0 -1px; }
.crumbs [aria-current="page"] { color: #eaf4ff; }

/* ---------- fields ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 8px; font: 600 1.0625rem/1.3 var(--font-text); color: #eaf4ff; }
.field input, .field textarea {
  display: block; width: 100%; height: 3.25rem; padding: 0 16px; border: 0; border-radius: 14px; outline: none;
  -webkit-appearance: none; appearance: none;
  font: 400 1.0625rem/1.4 var(--font-text); color: #fff; caret-color: var(--cyan);
  background: rgba(2, 8, 22, .62);                                   /* dark translucent: the glass card shows round it */
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(143, 233, 255, .10), inset 0 -1px 0 rgba(143, 233, 255, .24);
  transition: transform .2s var(--curve), box-shadow .2s, background-color .2s;
}
.field textarea { height: auto; min-height: 8rem; padding: 13px 16px; resize: vertical; }
.field :is(input, textarea):hover { background: rgba(4, 12, 30, .72); }
.field :is(input, textarea):focus, .field :is(input, textarea):focus-visible {
  outline: none; transform: translateY(-1px); background: rgba(4, 14, 34, .8);
  box-shadow: inset 0 -2px 0 #00e0ff, inset 0 1px 0 rgba(143, 233, 255, .12), 0 12px 26px -12px rgba(0, 224, 255, .6);
}
.field [aria-invalid="true"] { box-shadow: inset 0 -2px 0 #ff8a7a, inset 0 2px 6px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(143, 233, 255, .10); }
.field [aria-invalid="true"]:focus { box-shadow: inset 0 -2px 0 #ff8a7a, inset 0 1px 0 rgba(143, 233, 255, .12), 0 12px 26px -12px rgba(255, 138, 122, .5); }
/* browser autofill keeps the dark field and white text (no light-yellow box) */
.field input:-webkit-autofill { -webkit-text-fill-color: #fff; caret-color: var(--cyan); transition: background-color 600000s 0s, transform .2s, box-shadow .2s; }
.field-error { font: 500 1.0625rem/1.4 var(--font-text); color: #ffb4a8; max-width: none; }
.field-error:not(:empty) { margin-top: 8px; }

/* the trap for bots: off-screen, never display:none; visibility:hidden keeps autofill and Tab out of it */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.hp input { visibility: hidden; }

/* one line is always held for the status; at the press lead-form.js holds the height of its longest message */
.form-status { max-width: none; min-height: 1.55rem; margin: 4px 0 14px; font-size: 1.0625rem; line-height: 1.45; }
.form-status:not(:empty) {
  padding: 14px 16px; border-radius: 14px; color: #ffe3de;
  background: rgba(70, 10, 6, .5); box-shadow: inset 3px 0 0 #ff8a7a;
}
.form-status.is-info:not(:empty) { color: #e6fbff; background: rgba(0, 40, 80, .5); box-shadow: inset 3px 0 0 var(--cyan); }
.form-status a { color: #fff; font-weight: 700; white-space: nowrap; text-underline-offset: 3px; outline: none; }
.form-status a:is(:hover, :focus-visible) { color: var(--cyan-bright); text-shadow: 0 4px 14px rgba(0, 224, 255, .5); }
#lead .btn-primary { width: 100%; }
.form-note { margin-top: 14px; font-size: 1.0625rem; line-height: 1.45; color: var(--text-soft); max-width: none; }
.form-note a, .form-noscript a { color: var(--cyan-bright); text-underline-offset: 3px; outline: none; }
.form-note a:is(:hover, :focus-visible), .form-noscript a:is(:hover, :focus-visible) { color: #fff; text-shadow: 0 4px 14px rgba(0, 224, 255, .5); }
/* 0 px until Turnstile really shows a challenge (interaction-only): no empty band at the bottom of the card.
   It grows only after the visitor pressed the button. */
.ts-slot { display: flex; justify-content: center; }
.form-noscript { font-size: 1.1875rem; color: #eaf4ff; }

/* ---------- /kontakti ---------- */
.contact-page { text-shadow: 0 1px 12px rgba(2, 1, 4, .7); } /* text over the ribbon strands */
.contact-head { padding-top: clamp(16px, 2.5vw, 32px); }
.contact-head h1 { margin: 6px 0 clamp(20px, 3vw, 36px); max-width: 22em; } /* em, not ch: ch changes when the web font swaps in */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 540px); gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact-phone {
  display: inline-flex; align-items: center; gap: .3em; min-height: 3rem; color: #fff; text-decoration: none; outline: none;
  font: 700 clamp(2rem, 8vw, 3.5rem)/1.1 var(--font-head); letter-spacing: .02em; white-space: nowrap;
  text-shadow: 0 0 22px rgba(0, 224, 255, .35), 0 1px 12px rgba(2, 1, 4, .7); transition: color .25s, text-shadow .25s, translate .25s;
}
.contact-phone svg { flex: none; width: .62em; height: .62em; color: var(--cyan-bright); }
.contact-phone:is(:hover, :focus-visible) { color: var(--cyan-bright); text-shadow: 0 6px 18px rgba(0, 224, 255, .55); translate: 0 -1px; }
.contact-hours { margin: 4px 0 24px; font-size: 1.1875rem; color: #dbe6f5; }
.contact-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.contact-note { margin-top: 10px; font-size: 1.0625rem; color: var(--text-soft); }
.contact-email { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(46, 86, 150, .3); }
.contact-label { font: 600 1rem/1.2 var(--font-head); letter-spacing: .04em; color: var(--cyan-bright); }
.contact-email a {
  display: inline-flex; align-items: center; min-height: 2.75rem; margin-top: 4px; color: #fff; outline: none;
  font: 600 1.375rem/1.2 var(--font-text); text-underline-offset: 5px; text-decoration-color: rgba(143, 233, 255, .5);
  transition: color .25s, text-shadow .25s, translate .25s;
}
.contact-email a:is(:hover, :focus-visible) { color: var(--cyan-bright); text-shadow: 0 6px 16px rgba(0, 224, 255, .5); translate: 0 -1px; }
.contact-email .contact-note { margin-top: 2px; }

.lead-card { border-radius: 32px; padding: clamp(26px, 3.2vw, 40px); text-shadow: none; }
.lead-card h2 { font-size: clamp(1.375rem, 2.2vw, 1.75rem); }
.lead-intro { margin: 10px 0 22px; color: #dbe6f5; font-size: 1.0625rem; }

.after-steps { padding-block: clamp(48px, 6vw, 84px) 0; }
.after-steps h2 { margin-bottom: clamp(24px, 3vw, 36px); }
.steps-3 { grid-template-columns: repeat(3, 1fr); }
.steps-3 li { display: flex; flex-direction: column; }
.steps-3 .link-more { margin-top: 10px; align-self: flex-start; }
.contact-reach { margin-top: clamp(32px, 4vw, 48px); font: 600 1.1875rem/1.4 var(--font-text); color: #eaf4ff; }

/* ---------- /blagodarim ---------- */
.thanks { padding-top: clamp(28px, 6vw, 72px); text-shadow: 0 1px 12px rgba(2, 1, 4, .7); }
.thanks-panel { max-width: 760px; margin-inline: auto; }
.thanks-panel .link-more { margin-top: 8px; }

/* ---------- legal pages: /politika-za-poveritelnost, /biskvitki, /danni-za-dostavchika ----------
   Long text over the ribbon strands: one reading column, a text shadow, and the table and the facts on a dark
   translucent panel (a plain panel, not glass, so the text stays readable at every scroll position). */
.legal-page { text-shadow: 0 1px 12px rgba(2, 1, 4, .7); }
.legal { max-width: 820px; padding-top: clamp(16px, 2.5vw, 32px); }
.legal h1 { margin: 6px 0 14px; }
.legal h2 { margin: clamp(36px, 4.5vw, 52px) 0 14px; font-size: clamp(1.25rem, 2vw, 1.625rem); }
.legal-n { color: var(--cyan-bright); }
.legal p, .legal-list { max-width: 56ch; color: #dbe6f5; }
.legal p + p, .legal p + .legal-list, .legal-list + p { margin-top: 14px; }
.legal .legal-lead { font-size: 1.1875rem; color: #eaf4ff; }
.legal-date { color: var(--text-soft); margin-bottom: 18px; }
.legal-list { display: grid; gap: 10px; padding-left: 1.25em; }
.legal-list li::marker { color: var(--cyan-bright); }
.legal strong { color: #fff; font-weight: 600; }
.legal :is(p, .legal-list li, dd) > a { color: var(--cyan-bright); text-underline-offset: 3px; text-decoration-color: rgba(143, 233, 255, .5); outline: none; overflow-wrap: anywhere; transition: color .25s, text-shadow .25s; }
.legal :is(p, .legal-list li, dd) > a:is(:hover, :focus-visible) { color: #fff; text-shadow: 0 4px 14px rgba(0, 224, 255, .5); }
.legal code { font: 600 .95em/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: #fff; overflow-wrap: anywhere; }
.legal .btn-glass { margin: 18px 0 6px; }
.legal .btn-glass[hidden] { display: none; }

/* /danni-za-dostavchika: label on the left, value on the right; stacked on phones */
.legal-facts { margin-top: 24px; border-radius: 24px; padding: 6px clamp(18px, 3vw, 32px); background: rgba(5, 9, 20, .78); text-shadow: none; }
.legal-facts > div { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 4px 24px; padding: 16px 0; }
.legal-facts > div + div { border-top: 1px solid rgba(46, 86, 150, .3); }
.legal-facts dt { font: 600 1rem/1.5 var(--font-head); letter-spacing: .02em; color: var(--cyan-bright); }
.legal-facts dd { color: #eaf4ff; overflow-wrap: anywhere; }
.legal-note { display: block; color: var(--text-soft); font-size: 1rem; }
.legal-facts + p { margin-top: 24px; }

/* /biskvitki: a table on wide screens, one card per row on phones */
.legal-table-wrap { margin-top: 18px; border-radius: 24px; background: rgba(5, 9, 20, .78); text-shadow: none; overflow: hidden; }
.cookie-table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
.cookie-table th, .cookie-table td { padding: 14px 16px; text-align: left; vertical-align: top; }
.cookie-table thead th { font: 600 .9375rem/1.3 var(--font-head); letter-spacing: .02em; color: var(--cyan-bright); background: rgba(0, 81, 195, .16); }
.cookie-table tbody tr + tr { border-top: 1px solid rgba(46, 86, 150, .3); }
.cookie-table tbody th { font-weight: 600; color: #fff; }
.cookie-table tbody th code { white-space: nowrap; overflow-wrap: normal; }
.cookie-table td { color: #dbe6f5; }
.cookie-kind { display: block; font-weight: 400; font-size: .9375rem; color: var(--text-soft); }
.legal-table-wrap + p { margin-top: 18px; }

@media (max-width: 1023px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .lead-card { max-width: 640px; }
}
@media (max-width: 900px) {
  .steps-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .legal-facts > div { grid-template-columns: minmax(0, 1fr); }
  .cookie-table, .cookie-table tbody, .cookie-table tr, .cookie-table th, .cookie-table td { display: block; }
  .cookie-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cookie-table tbody tr { padding: 14px 18px; }
  .cookie-table tbody th { padding: 0 0 6px; font-size: 1.0625rem; }
  .cookie-table td { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 12px; padding: 4px 0; }
  .cookie-table td::before { content: attr(data-label); color: var(--text-soft); }
  .contact-ctas { flex-direction: column; align-items: stretch; }
  .lead-card { border-radius: 28px; padding: 26px 20px 20px; }
  .contact-email a { font-size: 1.25rem; }
}

/* ---------- consent banner (src/partials/consent.bg.html, assets/js/consent-ui.js) ----------
   Fixed, so it never moves the page; it enters with opacity + transform only. 15px text: never the LCP element.
   WebGL path (owner, Task 6B): WebGL glass. glass.js draws a position:fixed glass box on its fixed canvas, which lies over
   the page, so the page text scrolling under the banner never shows through; the DOM keeps no fill and no shadow.
   Without WebGL (or without a slot) it is the opaque panel below: the glass card's tint, rim and shadow on a solid base,
   no CSS blur. The choices are neumorphic (.btn-neu) on a solid #0b1220 plate (.cc-plate). */
:root .cc[data-glass] {
  position: fixed; z-index: 90; left: max(16px, env(safe-area-inset-left)); bottom: calc(16px + env(safe-area-inset-bottom));
  width: min(26rem, calc(100% - 32px)); max-height: calc(100vh - 112px); max-height: calc(100dvh - 112px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 22px 24px 16px; border-radius: 28px; color: #eaf4ff; text-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  background: linear-gradient(172deg, rgba(60, 110, 190, .20) 0%, rgba(10, 30, 70, .30) 55%, rgba(2, 6, 18, .45) 100%), #070d1c;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(143, 233, 255, .22), inset 0 -14px 28px rgba(0, 8, 24, .35),
    inset 0 0 0 1px rgba(143, 233, 255, .08);
  opacity: 0; visibility: hidden; transform: translateY(18px); pointer-events: none;
  transition: opacity .35s ease, transform .45s var(--curve), visibility 0s linear .45s;
}
:root .cc[data-glass].is-open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
/* html.gl-flat (no second WebGL context): the glass would be drawn behind the page, so the opaque panel stays */
html.gl-on:not(.gl-flat) .cc[data-glass]:not([data-glass-css]) { background: none; box-shadow: none; }
.cc[hidden] { display: none; }
.cc-h { font: 600 1.25rem/1.2 var(--font-head); letter-spacing: .01em; color: #fff; margin: 0 0 8px; }
.cc-text, .cc-note { font-size: 15px; line-height: 1.5; color: #d3deee; max-width: none; }
.cc-text a { color: var(--cyan-bright); text-underline-offset: 3px; outline: none; transition: color .25s, text-shadow .25s; }
.cc-text a:is(:hover, :focus-visible) { color: #fff; text-shadow: 0 4px 14px rgba(0, 224, 255, .6); }
/* the solid plate the neu buttons rise from: neu never sits on glass itself */
.cc-plate { background: var(--neu); border-radius: 20px; padding: 6px; box-shadow: inset 0 1px 0 rgba(46, 86, 150, .32), 0 6px 18px rgba(0, 0, 0, .4); }
.cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cc-actions .btn-neu { width: 100%; }
.cc-more { margin-top: 6px; }
.cc-more[aria-expanded="true"]::after { rotate: 90deg; }

.cc-settings[hidden] { display: none; }
/* switches: a row-wide button (label + track); CSS only, the knob turns cyan when on. Not neumorphic: neu never sits on glass */
.cc-settings { margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(46, 86, 150, .3); }
.cc-switch {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 3rem; padding: 0 2px;
  border: 0; outline: none; background: none; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent;
  font: 600 1.0625rem/1.3 var(--font-text); color: #eaf4ff; transition: color .25s, transform .25s var(--curve);
}
.cc-switch[hidden] { display: none; }
.cc-track {
  position: relative; flex: none; width: 46px; height: 26px; border-radius: 13px;
  background: rgba(2, 8, 22, .8); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(143, 233, 255, .22);
  transition: background-color .25s, box-shadow .25s;
}
.cc-track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #8193ad; box-shadow: 0 2px 5px rgba(0, 0, 0, .5); transition: transform .25s var(--curve), background-color .25s, box-shadow .25s;
}
.cc-switch[aria-checked="true"] .cc-track { background: rgba(0, 112, 255, .38); box-shadow: inset 0 2px 5px rgba(0, 0, 0, .35), inset 0 -1px 0 rgba(143, 233, 255, .4); }
.cc-switch[aria-checked="true"] .cc-track::after { transform: translateX(20px); background: var(--cyan); box-shadow: 0 0 10px rgba(0, 224, 255, .75), 0 2px 5px rgba(0, 0, 0, .4); }
.cc-switch:hover { color: #fff; }
.cc-switch:focus, .cc-switch:focus-visible { outline: none; }
.cc-switch:focus-visible { color: var(--cyan-bright); transform: translateY(-1px); }
.cc-switch:focus-visible .cc-track { box-shadow: inset 0 2px 5px rgba(0, 0, 0, .45), 0 8px 18px -6px rgba(0, 224, 255, .7); }
.cc-note { margin: 6px 0 14px; color: var(--text-soft); }
.cc-save-row { margin-bottom: 6px; }
.cc-save { width: 100%; }

/* the footer's «Настройки за бисквитки»: looks like the legal links next to it */
.footer-link {
  display: inline-flex; align-items: center; min-height: 3rem; padding: 0; border: 0; outline: none; background: none; cursor: pointer;
  font: 400 1.0625rem/1.2 var(--font-text); color: #cfdcef; -webkit-tap-highlight-color: transparent; transition: color .25s;
}
.footer-link[hidden] { display: none; }
.footer-link:is(:hover, :focus-visible) { color: var(--cyan-bright); text-decoration: underline; text-underline-offset: 4px; outline: none; }

@media (max-width: 640px) {
  /* full width minus 16 px, above the sticky call (16 px off the bottom, 3.875rem tall) with a 12 px gap */
  :root .cc[data-glass] {
    left: 8px; right: 8px; width: auto; bottom: calc(env(safe-area-inset-bottom) + 16px + 3.875rem + 12px);
    max-height: calc(100vh - 76px - 16px - 3.875rem - 12px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 76px - 16px - 3.875rem - 12px - env(safe-area-inset-bottom));
    padding: 20px 18px 12px; border-radius: 24px;
  }
}
/* 641 px and up (no sticky call there): a bottom bar under the hero, never over its «Обадете се» or number (the site exists for the call).
   One row: text left, «Отказвам» «Приемам» «Настройки» right, at most 96 px tall; the settings open upward above it. */
@media (min-width: 641px) {
  :root .cc[data-glass] {
    left: 0; right: 0; margin-inline: auto; width: min(1160px, calc(100% - 24px)); bottom: calc(10px + env(safe-area-inset-bottom));
    max-height: none; overflow: visible; padding: 7px 12px 7px 22px; border-radius: 22px;
  }
  .cc-main { display: flex; align-items: center; gap: 20px; }
  .cc-body { flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 1.5; }   /* the inline line boxes use this strut */
  .cc-h { display: inline; margin: 0 .45em 0 0; font-size: 1rem; }
  .cc-text { display: inline; }
  .cc-actions { flex: none; margin-top: 0; grid-template-columns: repeat(2, 8.25rem); gap: 8px; }
  .cc-more { flex: none; margin-top: 0; }
  .cc-more[aria-expanded="true"]::after { rotate: -90deg; }
  /* the settings open as a solid #0b1220 panel above the bar: the neu «Запазете избора» sits on it directly */
  .cc-settings {
    position: absolute; right: 0; bottom: calc(100% + 10px); width: min(26rem, 100%); margin: 0; padding: 14px 20px 10px;
    border-top: 0; border-radius: 22px; background: var(--neu);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(46, 86, 150, .35);
  }
  .cc-settings .cc-plate { padding: 0; box-shadow: none; }
  .cc-settings[hidden] { display: none; }
}
/* 641-1023 px: one row would squeeze the text to 6 lines, so the buttons wrap under it (at most 131 px). */
@media (min-width: 641px) and (max-width: 1023px) {
  .cc-main { flex-wrap: wrap; row-gap: 6px; }
  .cc-body { flex-basis: 100%; }
}
/* While the banner is up (html.cc-pending, set in <head> before first paint by measureHead in tools/build.mjs), the hero
   stage is the first screen minus the bar (--cc-h: its height + 10 px below + 12 px gap),
   so the hero's «Обадете се» and number sit above the bar. The choice drops the class; the hero grows back after that
   click, which is not CLS. On short windows the hero also sheds its outer padding and the 6% drop. */
@media (min-width: 641px) {
  html.cc-pending { --cc-h: 153px; }
  html.cc-pending .hero-stage { min-height: calc(100vh - var(--cc-h)); }
}
@media (min-width: 1024px) { html.cc-pending { --cc-h: 103px; } }
@media (min-width: 641px) and (max-height: 800px) {
  html.cc-pending .hero-stage { padding-block: 8px; }
  html.cc-pending .hero { transform: none; min-height: 0; padding-block: 32px; }
}
/* a very short window (1024x600 netbook, 700x500 window): tighter still, so the call row clears the bar */
@media (min-width: 641px) and (max-height: 620px) {
  html.cc-pending .hero-stage { padding-block: 4px; min-height: calc(100vh - 80px - var(--cc-h)); }   /* the space between header and bar */
  html.cc-pending .hero { padding-block: 20px; }
  html.cc-pending .hero h1 { margin-bottom: 8px; font-size: clamp(1.5rem, 3.6vw, 2.25rem); }
  html.cc-pending .hero p { margin-bottom: 12px; }
  html.cc-pending .hero .hero-phone { margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  :root .cc[data-glass], :root .cc[data-glass].is-open, .cc-switch, .cc-track, .cc-track::after { transition: none; }
}
