/* ============================================================
   ENTANGLE – Frontend Survey Styles
   ============================================================
   Architektura:
     1. Utility třídy          (u-*, is-*)
     2. Kořenový kontejner     (.entangle-container)
     3. Layout & grid          (.row, .col-*)
     4. Typografie             (h2, h3, p uvnitř .entangle-container)
     5. Strukturní komponenty  (uvod, form-group, verification)
     6. Tabulka / matice       (.custom-table, matrix-*)
     7. Vstupní prvky          (checkbox, radio, range, select)
     8. Importance-Satisfaction widget
     9. Stavové třídy          (.error-message, .blue-message, atd.)
    10. Responzivita           (@media)
   ============================================================ */


/* ============================================================
   0. DESIGN TOKENS – výchozí barvy pluginu
   Šablona je může přepsat přes :root, nastavení pluginu přes inline style.
   ============================================================ */

/* ── Plugin fallback colors ────────────────────────────
   Theme defines these variables on :root or body.
   Plugin sets them here as fallbacks — theme values take precedence
   because :root has lower specificity than theme's selectors,
   and if theme sets them on :root too, its stylesheet loads after. */
:root {
  --color-primary: #2271b1;
  --color-neutral-100: #f5f5f5;
  --color-neutral-200: #e0e0e0;
  --color-neutral-300: #ccc;
  --color-base: #222;
  --color-contrast: #fff;
  --border-radius: 8px;
  /* The vote marks: the green of a positive vote and the red of a negative
     one, and the green at a tenth over white for a surface that belongs to
     the ballot without depending on the theme's palette. */
  --color-success: #198754;
  --color-success-soft: #e8f3ee;
  --color-danger: #dc3545;
}

/* The size of the host's own text, measured ONCE at the root of the widget and handed down as a length. Registered,
   so the `1em` below is computed where it is declared and every step of the scale is a multiple of the same number
   wherever it is used; unregistered (an older browser) it stays the text "1em" and a step set inside another step
   compounds — smaller by a few per cent, never broken. */
@property --entangle-em {
  syntax: "<length>";
  inherits: true;
  initial-value: 16px;
}

.entangle-container__holder,
.entangle-map-modal {

  /* ── The type scale: steps of the HOST's text size ──
     The widget stands in somebody else's page, and its text is the size of that page's text: a theme that sets its
     body at 19px got a questionnaire at 14px beside it (13. 11.; the scale was fixed pixels). Not rem — a page
     builder moves the root (html { font-size: 62.5% }) and rem follows it down; the text the widget INHERITS is
     what the visitor actually reads, so the scale is measured from that. The floors keep the small steps legible
     on a page whose own text is small. A theme may set --entangle-font-size to state the size itself. */
  --entangle-em: var(--entangle-font-size, 1em);
  --font-xs:   max(12px, calc(var(--entangle-em) * 0.8125)); /* meta, hints */
  --font-sm:   max(13px, calc(var(--entangle-em) * 0.875));  /* descriptions, tables */
  --font-base: var(--entangle-em);                           /* body, answers, inputs */
  --font-md:   calc(var(--entangle-em) * 1.125);             /* the title of a question */
  --font-lg:   calc(var(--entangle-em) * 1.25);              /* the title of a card */
  --font-xl:   calc(var(--entangle-em) * 1.5);               /* the title of a section */
  --font-2xl:  calc(var(--entangle-em) * 2);                 /* the intro of a slider */
  --line-height-tight: 1.2;
  --line-height-base:  1.5;

  /* ── The neutrals: ONE family, and a theme can name each ──
     The greys were written where they were needed (#666, #999, #bbb, a veil of black, the theme's own surface) and
     stood side by side as different greys (13. 11.). Each is now one of these. Without a theme they are DERIVED
     from the colour of the text around — so they read on a white page, on a tinted section and on a dark one, and
     they carry the tone of the site's ink. A theme that has greys of its own sets the --entangle-* names on :root
     and the whole widget follows:
       --entangle-surface      the quiet ground of an answer, a pill, a cell
       --entangle-line         a hairline; --entangle-line-strong the edge of a control
       --entangle-muted        secondary text; --entangle-faint what is quieter still */
  --ent-surface: var(--entangle-surface, color-mix(in srgb, currentColor 5%, transparent));
  --ent-surface-hover: color-mix(in srgb, currentColor 6%, var(--ent-surface));
  --ent-line: var(--entangle-line, var(--color-neutral-300));
  --ent-line-strong: var(--entangle-line-strong, color-mix(in srgb, currentColor 50%, transparent));
  --ent-muted: var(--entangle-muted, color-mix(in srgb, currentColor 72%, transparent));
  --ent-faint: var(--entangle-faint, color-mix(in srgb, currentColor 58%, transparent));

  /* ── Spacing škála (8px grid) ── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;
}


/* ============================================================
   1. UTILITY TŘÍDY
   ============================================================ */

/* Stavová třída – JS ji přidává/odebírá pro show/hide */
.is-hidden { display: none; }

/* Screen-reader only — viditelné pouze pro asistivní technologie */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Jednorázové layout utility */
.u-float-right   { float: right; }
.u-mx-auto       { margin: auto; }
.u-w-60-mx-auto  { width: 60%; margin: auto; }      /* carousel verification-box */
.verification-slide-box { width: 100%; margin: auto; } /* full-width verification in slider */

/* Rozměry */
.u-w-80          { width: 80px; }                   /* th, td v matici */
.u-max-w-30      { max-width: 30px; }               /* col-1 wrapper u checkbox/radio */

/* Spacing */
.u-mt-50         { margin-top: 50px; }              /* verification-box horní odsazení */
.u-mb-0-p-answer { margin: 0 0 15px 0; }           /* popisek limitu odpovědí */
.u-mb-20         { margin-bottom: 20px; }           /* matrix-mobile sekce */
.u-mb-25-hidden  { margin-bottom: 25px; display: none; } /* extended-answer-input */

/* Matice – buňka a reset inputu */
.u-cell-pad      { padding: 10px 20px; }            /* custom-radio div uvnitř td */
.u-input-reset   { margin-left: 0; padding-left: 0; } /* matrix radio/checkbox input */


/* ============================================================
   2. KOŘENOVÝ KONTEJNER
   ============================================================ */

.entangle-container {
  max-width: var(--responsive--aligndefault-width);
  /* Breakout z prose wrapperu: builder weby (AutomaticCSS/Bricks) vkládají
     shortcode do sloupce na šířku textu, ale deklarují --content-width.
     Kde --content-width není, min() se vyhodnotí na 100 % a nic se nemění.
     Předpokládá centrovaný sloupec (margin-left počítá střed rodiče). */
  --entangle-w: min(var(--content-width, 100%), calc(100vw - 32px));
  width: var(--entangle-w);
  margin-left: calc(50% - var(--entangle-w) / 2);
  margin-right: auto;
  border-radius: var(--border-radius);
  /* No padding at all. Sideways the gutter already comes from the width above
     (100vw - 32px leaves 16px each side when this sits directly in the body),
     and inside a builder column the theme's own wrapper provides it. And the
     air ABOVE and BELOW a block is the page's, not the block's: 48px here stood
     on top of the template's space and the theme's space above the footer, and
     the three made a hole of 250px under every questionnaire (13. 11.). */
  padding: 0;
}

/* …and for the same reason whatever stands last in the widget ends flush with it. */
.entangle-container > :last-child,
.entangle-container .questions-card > :last-child,
.entangle-container__holder .vote-submit-wrapper.my-5 {
  margin-bottom: 0;
}

.entangle-container tfoot { display: none; }


/* ============================================================
   3. LAYOUT & GRID
   (Lightweight náhrada Bootstrap gridu uvnitř .entangle-container)
   ============================================================ */

.entangle-container .row,
.entangle-container .asq-row {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
}

.entangle-container [class*="col-"] {
  padding: 0;
}

.entangle-container .col-1  { flex: 0 0 8.333%;  max-width: 8.333%; }
.entangle-container .col-6  { flex: 0 0 50%;     max-width: 50%; }
.entangle-container .col-11 { flex: 0 0 91.667%; max-width: 91.667%; }
.entangle-container .col-12 { flex: 0 0 100%;    max-width: 100%; }

/* Responzivní sloupce – přepisují col-12 na ≥768px */
@media (min-width: 768px) {
  .entangle-container .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .entangle-container .col-md-6 { flex: 0 0 50%;     max-width: 50%; }
  .entangle-container .col-md-8 { flex: 0 0 66.667%; max-width: 66.667%; }
}

/* Sloupce pro starší .col-lg-2 / .col-lg-10 breakpointové přepsání – viz @media */
.entangle-container .col-lg-2.col-2 {
  flex: 0 0 16.667%;
  max-width: 16.667%;
}


/* ============================================================
   4. TYPOGRAFIE
   ============================================================ */

/* Základní velikost a barva textu. The size is the host's (see the scale above) with a floor — and it is not
   var(--font-base): the scale is measured from this very element, and a size that named the scale would chase
   its own tail. */
.entangle-container {
  font-size: max(1em, 14px);
  line-height: var(--line-height-base);
  color: var(--color-base);
}

/* THEME DEFENCE 1/2 — the theme does not colour our labels.
   Page builders style a bare <label> in a muted grey of their own (Bricks:
   label { color: var(--bricks-text-light) } = #9e9e9e). That rule matches our
   labels directly, and a matching rule always beats the colour they would
   inherit from the container above — inheritance never competes with a rule.
   It cost twice on the answer cards: their background is mixed from
   currentColor, so a muted label drained the bar tint with it.
   Said once here, for every label the widget has now or grows later, instead
   of at whichever selector the next regression is noticed at. A control that
   wants a colour of its own (.importance-radio + label) declares it further
   down the file and wins on source order. */
.entangle-container label {
  color: inherit;
}

/* Nadpisy */
.entangle-container h2 {
  font-size: var(--font-xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-base);
  margin: 0 0 var(--space-4) 0;
}

.entangle-container h3 {
  font-size: var(--font-lg);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-base);
  margin: 0 0 var(--space-3) 0;
}

.entangle-container h4 {
  font-size: var(--font-md);
  font-weight: 600;
  line-height: var(--line-height-tight);
  color: var(--color-base);
  margin: 0 0 var(--space-2) 0;
}

/* Sekční nadpis nad otázkou */
.nadpis-nad-otazkou {
  font-size: var(--font-sm);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--ent-line);
  padding-bottom: var(--space-2);
  margin-bottom: var(--space-5);
}

/* Odstavcový text */
.entangle-container .questions-card p {
  font-size: var(--font-sm);
  line-height: var(--line-height-base);
  margin: 0 0 var(--space-3) 0;
}

.required-question { color: var(--color-danger); }


/* ============================================================
   5. STRUKTURNÍ KOMPONENTY
   ============================================================ */

/* --- Karty / wrapper --- */
.questions-card {
  max-width: 800px;
  margin: 0 auto;
}

/* --- Úvodní sekce --- */
.entangle-container-uvod {
  margin-bottom: var(--space-8);
}

.entangle-container-uvod-wrapper {
  font-size: var(--font-base);
  text-align: left;
  border-bottom: 1px solid var(--color-neutral-300);
  padding-bottom: var(--space-8);
}

.entangle-container-uvod-wrapper h2 {
  font-size: var(--font-2xl);
  padding-bottom: var(--space-1);
}

/* Text from the editor (the intro card, the message before the start / after
   the end): wpautop wraps it in <p>, but a theme reset (Automatic.css:
   `:where(p) { margin-block: 0 }`) glued the paragraphs into one block and
   nothing here set a gap of its own. One line between paragraphs; the last one
   keeps none, the wrapper's own padding parts it from the ballot. (0,2,1) so
   the survey intro, which sits inside .questions-card, gets the same rhythm. */
.entangle-container .entangle-container-uvod-wrapper p {
  margin: 0 0 var(--space-4);
}

.entangle-container .entangle-container-uvod-wrapper p:last-child {
  margin-bottom: 0;
}

/* --- Otázky --- */
.form-group {
  margin-bottom: var(--space-8);
}

.form-group p {
  padding-bottom: var(--space-3);
}

/* ── The rhythm of a questionnaire ──────────────────────────────────────
   Read from the top: the intro, then SECTIONS, each a title over its questions; a question is its title, a
   quiet line of explanation, and the answers. The distances say which belongs to which — small inside a
   question (title → explanation 8, → answers 16), a clear step between two questions (48), and a line with the
   same step on both sides before a new section. Until 13. 11. every one of these was 48: the markup's spacing
   classes (.mb-4, .mb-5) and a paragraph's padding stacked on each other, so an explanation stood as far from
   its own answers as from the next question, and the title of a section — small capitals over a rule — was
   the quietest thing on the page.

   (0,3,x) throughout: the markup's utility classes are (0,2,0) and stand further down the file. */
.entangle-container .questions-card .entangle-container-uvod {
  margin-bottom: var(--space-7);
}

.entangle-container .questions-card .entangle-container-uvod-wrapper {
  padding-bottom: var(--space-7);
  border-bottom-color: var(--ent-line);
}

/* The intro is the body of the page, not small print. */
.entangle-container .questions-card .entangle-container-uvod-wrapper p {
  font-size: var(--font-base);
}

.entangle-container .questions-card .form-group {
  margin-bottom: var(--space-8);
}

/* The title of a section. */
.entangle-container .questions-card .form-group > .nadpis-nad-otazkou {
  margin: 0 0 var(--space-6);
  padding: 0;
  border: 0;
  font-size: var(--font-xl);
  letter-spacing: 0;
  text-transform: none;
  text-wrap: balance;
}

/* A section after the first opens under a line; the first follows the line of the intro. */
.entangle-container .questions-card form > .form-group:not(:first-of-type) > .nadpis-nad-otazkou {
  padding-top: var(--space-8);
  border-top: 1px solid var(--ent-line);
}

/* The title of a question… */
.entangle-container .questions-card .form-group > h3 {
  margin: 0 0 var(--space-4);
  font-size: var(--font-md);
  line-height: 1.3;
  text-wrap: balance;
}

/* …its explanation, close under it and quieter… */
.entangle-container .questions-card .form-group > h3:has(+ div:not(.input-container, .row)) {
  margin-bottom: var(--space-2);
}

.entangle-container .questions-card .form-group > h3 + div:not(.input-container, .row) {
  margin-bottom: var(--space-4);
  color: var(--ent-muted);
}

.entangle-container .questions-card .form-group > h3 + div:not(.input-container, .row) p {
  margin: 0;
  padding: 0;
}

.entangle-container .questions-card .form-group > h3 + div:not(.input-container, .row) p + p {
  margin-top: var(--space-2);
}

/* …and the note on how many answers may be given, which belongs to the answers under it. */
.entangle-container .questions-card .maximal-checkboxes-alert {
  margin: 0 0 var(--space-3);
  padding: 0;
  color: var(--ent-muted);
}

/* --- Verification box ---
   No fill of its own (the wizard sits directly on the page like the rest of
   the form); the gap below separates it from the first ballot item. */
.verification-box {
  gap: var(--space-5);
  padding: 0;
  background: transparent;
  border-radius: var(--border-radius);
  flex-wrap: wrap;
}
/* (0,2,0) to beat `.entangle-container .row { margin-bottom: 0 }`. */
.entangle-container .verification-box,
.verification-box.row {
  margin-bottom: var(--space-8);
}

/* Entangle/NIA info box (_verification_entangle.php) má vlastní kartu s
   rámečkem — šedý podklad wrapperu je u něj nežádoucí. */
.verification-box--bare {
  background: transparent;
}

.verification-box .col-md-6 {
  flex: 1 1 220px;
  max-width: 100%;
  width: auto;
}
#verify_email,
#verify_sms,
#pin_code {
  padding: var(--space-2) var(--space-4);
  margin-bottom: var(--space-2);
}

.submit_verify {
  background-color: var(--color-primary) !important;
  padding: var(--space-2) var(--space-4);
  color: var(--color-contrast, #fff);
}

/* Disabled stav – opravena nekonzistence: bylo .submit-verify (pomlčka) */
.submit_verify:disabled,
.submit_verify[disabled] {
  color: var(--ent-faint);
}

.submit_verify_full-col {
  display: block;
  margin: 0 auto;
}

/* ============================================================
   5b. VERIFICATION WIZARD (2-step email/SMS flow)
   ============================================================ */

/* Themes style `button, [type="button"]` globally. That selector has the
   same specificity (0,1,0) as a lone plugin class, so the stylesheet that
   loads last wins — and the theme's does. Every button rule here is
   therefore scoped to .verification-wizard (0,2,0), which wins on
   specificity instead of on load order. */

.verification-wizard {
  max-width: 400px;
  margin: 0 auto var(--space-8);
  text-align: center; /* a ballot turns it to the start, see section 11 */
}

.verification-wizard button {
  font: inherit;
  text-transform: none;
  box-shadow: none;
}

.verify-heading {
  font-size: var(--font-xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.verify-info-text {
  font-size: var(--font-sm);
  color: var(--ent-muted);
  margin-bottom: var(--space-4);
  line-height: var(--line-height-base);
}

.entangle-container .gdpr-consent-wrap.custom-checkbox {
  margin: var(--space-5) 0 var(--space-5) auto;
  width: fit-content;
}

/* On the ballot the confirmation follows the proposal grid; the same room above
   it as below (the button wrapper) keeps it from reading as part of the last card.
   It is a condition of the vote, not small print, so it sits centred on the
   button it conditions (the generic rule parks it on the right); bold on top
   of that read as shouting. */
#voteForm .gdpr-consent-wrap.custom-checkbox {
  margin-top: var(--space-8);
  margin-left: auto;
  margin-right: auto;
}

.entangle-container .gdpr-consent-wrap .custom-control-label {
  width: auto;
}

.gdpr-consent-wrap .col-11 p {
  display: inline;
  margin: 0;
}

.gdpr-error-message {
  color: #dc3545;
  font-size: var(--font-xs);
  margin-top: var(--space-1);
  padding-left: var(--space-2);
}

.verify-input {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--font-base);
  font-family: inherit;
  color: var(--color-base);
  background-color: #fff;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--border-radius);
  box-sizing: border-box;
  margin-bottom: var(--space-2);
  transition: border-color 0.15s ease;
}

.verify-input:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* intl-tel-input overrides for phone input */
.verification-wizard .iti {
  display: block;
  width: 100%;
  margin-bottom: var(--space-2);
}

.verification-wizard .iti .verify-phone-input {
  margin-bottom: 0;
  letter-spacing: 1.5px;
  /* No padding-left here: intl-tel-input sets it inline from the measured
     width of the country container, which varies with the dial code. */
}

/* The country picker is a <button>, so the theme's generic button styling
   lands on it and breaks the flag/dial-code row into two lines. Restate the
   vendor's own layout at a specificity the theme cannot outrank.
   Flag, arrow and dial code share ONE surface — with the background on the
   inner element the hover state covered only part of the control. */
.verification-wizard .iti__selected-country {
  display: flex;
  align-items: center;
  width: auto;
  height: 100%;
  margin: 0;
  padding: 0 8px;
  border: 0;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  background: var(--color-neutral-100);
  color: inherit;
  font: inherit;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

/* The theme also colours :hover / :focus (white on pink, unreadable here). */
.verification-wizard .iti__selected-country:hover,
.verification-wizard .iti__selected-country:focus,
.verification-wizard .iti__selected-country:focus-visible,
.verification-wizard .iti__selected-country:active {
  background: var(--color-neutral-200);
  color: inherit;
  box-shadow: none;
}

.verification-wizard .iti__country-container {
  border-right: 1px solid var(--color-neutral-300);
}

.verification-wizard .iti__selected-country-primary {
  padding: 0;
  background: none;
  border-radius: 0;
}

/* Same size as the number typed next to it — a smaller dial code read as a
   different field. */
.verification-wizard .iti__selected-dial-code {
  font-size: inherit;
  color: inherit;
}

.verify-hint {
  font-size: var(--font-xs);
  color: var(--ent-muted);
  margin: 0 0 var(--space-4) 0;
  padding: 0;
}

/* Both CTAs (send code / verify) share one rule, so step 1 and step 2 look
   the same — step 2 previously fell through to whatever the theme did. */
.verification-wizard .verify-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3);
  font-size: var(--font-base);
  font-weight: 400;
  color: var(--color-contrast, #fff);
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.verification-wizard .verify-cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.verify-spinner {
  width: 20px;
  height: 20px;
}

/* Under "Continue" when a survey follows, and at the top of that survey:
   the ballot is already in, and the reader should not be left guessing. */
.vote-submit-note {
  margin: var(--space-2) 0 0;
  font-size: var(--font-sm);
  color: inherit;
  text-align: center;
}

.ev-survey-intro {
  margin: 0 0 var(--space-6);
  font-size: var(--font-md);
  text-align: center;
}

/* Verified state: the contact it applies to, and the way back to another one. */
.verify-done-contact {
  display: block;
  font-weight: 700;
  margin-top: var(--space-1);
}

.verify-done-actions {
  margin: var(--space-2) 0 0;
  font-size: var(--font-sm);
}

/* OTP digit inputs */
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-5) 0;
}

.otp-digit {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: var(--font-xl);
  font-weight: 700;
  border: 2px solid var(--color-neutral-300);
  border-radius: var(--border-radius);
  outline: none;
  transition: border-color 0.15s ease;
  padding: 0;
  box-sizing: border-box;
  color: var(--color-base);
  background: #fff;
}

.otp-digit:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(41, 134, 204, 0.2);
}

/* Sent-to text */
.verify-sent-to {
  font-size: var(--font-sm);
  color: var(--ent-muted);
  margin-bottom: var(--space-2);
  padding: 0;
}

.verify-change-contact {
  font-size: var(--font-xs);
  margin-left: var(--space-2);
  color: var(--color-primary);
  text-decoration: underline;
  background-image: none !important;
}

/* Resend link and countdown */
.verify-resend {
  font-size: var(--font-xs);
  color: var(--ent-muted);
  margin-top: var(--space-4);
  padding: 0;
}

.verify-resend-link {
  color: var(--color-primary);
  background-image: none !important;
}

.verify-resend-countdown {
  color: var(--ent-faint);
}

/* Alert area inside wizard */
.verify-alert-area .alert {
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--border-radius);
  font-size: var(--font-sm);
}

.verify-alert-area .alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.verify-alert-area .alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Success confirmation step */
.verify-done-alert {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: var(--space-4);
  border-radius: var(--border-radius);
  font-size: var(--font-base);
}

/* Responsive: smaller OTP boxes on mobile */
@media (max-width: 480px) {
  .otp-digit {
    width: 40px;
    height: 48px;
    font-size: 20px;
  }

  .otp-inputs {
    gap: 5px;
  }

  .verification-wizard {
    max-width: 100%;
  }
}


/* --- Carousel tlačítka --- */
.custom-carousel-button {
    position: static !important;
    width: auto !important;
    height: auto !important;
    opacity: 1 !important;
    color: #fff !important;
    background-color: #32373c !important;
    background-color: var(--color-primary) !important;
    border: none !important;
    padding: var(--space-2) var(--space-5) !important;
    border-radius: var(--border-radius) !important;
    cursor: pointer;
    display: inline-block;
}
.custom-carousel-button:hover {
    opacity: 1 !important;
    background-image: linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.12)) !important;
}
.custom-carousel-button:focus-visible {
    outline: 3px solid var(--color-primary) !important;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(41, 134, 204, 0.3);
}

.entangle-container .send-form {
    color: #fff !important;
    background-color: var(--color-primary) !important;
    border: none !important;
    padding: var(--space-2) var(--space-5) !important;
    border-radius: var(--border-radius) !important;
    cursor: pointer;
    display: inline-block;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Theme fonts with a tall descent (Aktiv Grotesk: ascent 11 / descent 5 at 16px)
   put the glyphs ~3px above the middle of their line box, so the button reads as
   padded at the bottom. Trimming the line box to the cap height makes the
   geometric centre the optical one; the padding then restores the 40px height.
   Browsers without text-box keep the line-box geometry above. */
@supports (text-box: trim-both cap alphabetic) {
    .entangle-container .send-form {
        text-box: trim-both cap alphabetic;
        padding-block: calc((var(--space-7) - 1cap) / 2) !important;
    }
}
/* The submit borrows the theme's button classes for its look, and a theme may hang a glyph on those — an arrow
   after every button that leads somewhere (entangle-base: `.wp-block-button__link.wp-element-button::after`). A
   submit leads nowhere and has its own picture (the paper plane, the spinner), so it stood there with two
   (13. 11.). (0,3,1): one class more than the theme's rule, whichever sheet loads last. */
.entangle-container .send-form.wp-element-button::before,
.entangle-container .send-form.wp-element-button::after {
    content: none;
}
.entangle-container .send-form:hover {
    background-image: linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.12)) !important;
}
.send-form:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

/* --- Progress bar --- */
.entangle-container .progress {
    background-color: var(--color-neutral-200);
    --bs-progress-bar-bg: var(--color-primary);
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.entangle-container .progress-bar {
    height: 100%;
    background-color: var(--color-primary) !important;
}

/* --- Carousel navigace (řádek pod slides) --- */
.entangle-container .carousel-nav {
    margin-top: var(--space-6);
}

/* Pravý sloupec navigace – tlačítka zarovnat doprava, ve stejné výšce jako Zpět */
.entangle-container .carousel-nav .col-6:last-child {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Odeslat – stejná velikost jako .custom-carousel-button (Zpět/Další) */
.entangle-container .carousel-nav #sendForm:hover {
    background-image: linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.12)) !important;
}
.entangle-container .carousel-nav #sendForm {
    margin-top: 0 !important;
    padding: var(--space-2) var(--space-5) !important;
    font-size: inherit !important;
    line-height: inherit !important;
    min-height: unset !important;
    height: auto !important;
    border-radius: var(--border-radius) !important;
    background-color: #32373c !important;
    background-color: var(--color-primary) !important;
    color: #fff !important;
}

/* --- Carousel intro slide (default-slide) – styl jako entangle-container-uvod --- */
.entangle-container .carousel-item.default-slide {
    border-bottom: 1px solid var(--color-neutral-300);
    padding-bottom: var(--space-8);
    margin-bottom: var(--space-4);
}

.entangle-container .carousel-item.default-slide h2 {
    font-size: var(--font-2xl);
    padding-bottom: var(--space-1);
}


/* ============================================================
   6b. MATICE – DESKTOPOVÉ INPUTY
   Struktura: td > label > div.custom-radio/checkbox > input
   Inputy nejsou v .col-1, nesměji dostat karet. styl
   ============================================================ */

/* Label v tabulkové buňce – jen centrování, žádná karta */
/* Wrapper div uvnitř buňky */
.custom-table .custom-control {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

/* Matice – checkbox */
.entangle-container .custom-table input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--ent-line-strong);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  margin: 0;
  position: relative;
}

.entangle-container .custom-table input[type="checkbox"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.entangle-container .custom-table input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpolyline points='1.5,5 4.5,8 10.5,1.5' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Matice – radio */
.entangle-container .custom-table input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--ent-line-strong);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  margin: 0;
  position: relative;
}

.entangle-container .custom-table input[type="radio"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.entangle-container .custom-table input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Ccircle cx='4' cy='4' r='3.5' fill='%23fff'/%3E%3C/svg%3E") center / 8px no-repeat;
}

.table-responsive {
  padding: 0;
}

.entangle-container .row > .matrix-radio-desktop,
.entangle-container .row > .matrix-checkbox-desktop {
  padding-left: 0;
  padding-right: 0;
}

.custom-table {
  border-collapse: separate !important;
  border-spacing: 0;
  table-layout: fixed;
}

/* Sloupec s výrokem je široký; sloupce s odpověďmi si rovnoměrně rozdělí zbytek
   (funguje pro libovolný počet sloupců). Přebíjí u-w-80 (80px) z markupu. */
.custom-table th:first-child,
.custom-table td:first-child { width: 42%; }
.custom-table th:not(:first-child),
.custom-table td:not(:first-child) { width: auto; }

.custom-table thead th {
  border: 0 !important;
  border-bottom: 1px solid var(--ent-line-strong);
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  font-size: var(--font-sm);
  line-height: var(--line-height-tight);
}

.custom-table thead th:first-child {
  border-right: 1px solid var(--ent-line-strong);
  text-align: left;
}

.custom-table tbody tr:hover {
  background: none;
}

.custom-table tbody td {
  border-right: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid var(--color-neutral-300);
}

.custom-table tbody td:first-child {
  border-left: none;
  border-right: 1px solid var(--ent-line-strong);
  padding: 0 12px;
}

/* Lepivý první sloupec – background theme barva */
.custom-table tbody .sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 15px 12px 15px 12px !important;
  border-bottom: 1px solid var(--ent-line);
  font-size: var(--font-sm);
  line-height: var(--line-height-tight);
  text-align: left;
  background-color: #f5f5f5;
  background-color: var(--entangle-surface, var(--color-neutral-100));
}

/* Label zabírá celou plochu buňky vč. paddingu */
.custom-table td .custom-control-label {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 15px 20px !important;
  cursor: pointer;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0;
  line-height: 1;
}

.custom-table td .custom-control-label:hover {
  background: none !important;
}

/* Hover pouze na klikatelné buňce */
.matrix-cell {
  cursor: pointer;
}

.matrix-cell:hover {
  background: var(--color-neutral-200);
}

.custom-table tfoot { display: none; }

/* --- Matice – desktop / mobile přepínání --- */
.matrix-radio-desktop,
.matrix-checkbox-desktop { display: block; }

.matrix-radio-mobile,
.matrix-checkbox-mobile  { display: none; }

.matrix-checkbox-mobile {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* --- Mobile matrix layout --- */
.entangle-container .matrix-radio-mobile .row,
.entangle-container .matrix-checkbox-mobile .row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  align-items: center;
}

/* --- Pomocné třídy matice --- */
.matrix-border {
  border-bottom: 1px solid var(--ent-line-strong);
  margin-bottom: 5px;
}

.matrix-name {
  font-size: var(--font-xs);
  margin-bottom: var(--space-2);
}

.matrix-columns p { float: left; } /* opraveno: bylo "matrix-columns p" bez tečky */


/* ============================================================
   7. VSTUPNÍ PRVKY
   ============================================================ */

/* THEME DEFENCE 2/2 — the theme does not reshape our tick boxes.
   Page builders style every control at once (Bricks:
   input:not([type=submit]) { padding: 0 12px; width: 100% }) together with a
   global box-sizing: border-box, and keep all of it in @layer bricks. This
   file is unlayered, so it wins on every property it names — and only on
   those. A radio that named width and height and nothing else kept the 12px
   of side padding and came out 26px wide against 18 tall: an oval with the
   dot pushed out of it.
   No width/height/min-width/max-width here on purpose — the size belongs to
   the control (18px on the cards and in the matrix, 42px on the satisfaction
   smileys, 1px on the screen-reader-only ones) and a blanket size would crush
   the last two. */
.entangle-container input[type="checkbox"],
.entangle-container input[type="radio"] {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
  /* A control does not inherit the colour of the text (it is black by the browser's own sheet), and the edge of
     the box is mixed from it — so on a dark section it would be a black edge on a dark ground. */
  color: inherit;
}

/* The standard tick box is 18px wherever it appears — on the answer cards and
   in the matrix cells. The size lives here; the rules that follow only draw. */
.entangle-container .custom-radio input[type="radio"],
.entangle-container .custom-checkbox input[type="checkbox"],
.entangle-container .custom-table input[type="radio"],
.entangle-container .custom-table input[type="checkbox"] {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Radio – stejný styl jako checkbox karta --- */
.entangle-container .custom-radio {
  display: block;
  width: 100%;
  padding-left: 0;
  margin-bottom: var(--space-2);
}

.entangle-container .custom-radio .custom-control-label {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  padding: 11px 14px 11px 10px;
  background: rgba(0, 0, 0, 0.04);
  background: var(--ent-surface);
  border-radius: min(var(--border-radius), 8px);
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
  margin: 0;
  line-height: 1.1;
}

/* The row tint has to read against whatever sits behind it: the page's white,
   a grey section, the brick-tinted consent box. A translucent white managed
   that only on darker ground and disappeared on white — which is where these
   questions usually sit. Mixing the tint from currentColor always contrasts:
   dark text yields a dark veil, light text on a dark section a light one.
   That veil is the DEFAULT of --ent-surface; a theme that names its own
   surface (--entangle-surface) answers for the ground it puts it on.
   The plain rgba above it is the fallback for browsers without color-mix. */
.entangle-container .custom-radio .custom-control-label:hover {
  background: rgba(0, 0, 0, 0.09);
  background: var(--ent-surface-hover);
}

.entangle-container .custom-radio .custom-control-label:has(input:checked) {
  background: rgba(0, 0, 0, 0.07);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.entangle-container .custom-radio .custom-control-label:has(input:checked):hover {
  background: rgba(0, 0, 0, 0.11);
  background: color-mix(in srgb, var(--color-primary) 18%, transparent);
}

/* Nativní radio – nastylován přímo */
.entangle-container .custom-radio .col-1 input[type="radio"],
.entangle-container .custom-radio label .col-1 input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--ent-line-strong);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  margin: 0;
  position: relative;
}

/* Checked – modrý kruh s bílou tečkou uprostřed */
.entangle-container .custom-radio .col-1 input[type="radio"]:checked,
.entangle-container .custom-radio label .col-1 input[type="radio"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.entangle-container .custom-radio .col-1 input[type="radio"]:checked::after,
.entangle-container .custom-radio label .col-1 input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3E%3Ccircle cx='4' cy='4' r='3.5' fill='%23fff'/%3E%3C/svg%3E") center / 8px no-repeat;
}

/* .col-11 fills remaining space, reset Bootstrap row gutter padding */
.entangle-container .custom-radio .custom-control-label .col-11,
.entangle-container .custom-checkbox .custom-control-label .col-11 {
  flex: 1 1 0;
  max-width: none;
  min-width: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Optical centring of the option text on its tick box, as on the buttons:
   the row centres the line box, but a font with an uneven ascent and descent
   (Aktiv Grotesk) then sets the letters a few pixels above the box's middle.
   Trimming the text to cap height and baseline lets the flex row centre the
   letters themselves. Browsers without text-box keep the line-box centring. */
@supports (text-box: trim-both cap alphabetic) {
  .entangle-container .custom-radio .custom-control-label .col-11,
  .entangle-container .custom-checkbox .custom-control-label .col-11 {
    text-box: trim-both cap alphabetic;
  }
}

/* .col-1 wrapper */
.entangle-container .custom-radio .col-1,
.entangle-container .custom-radio label .col-1 {
  display: flex;
  align-items: center;
  padding-left: 0;
  padding-right: 8px;
  min-width: 30px;
  max-width: 30px;
  flex: 0 0 30px;
}

/* --- Focus-visible indikátory pro keyboard navigaci --- */
.entangle-container .custom-radio .col-1 input[type="radio"]:focus-visible,
.entangle-container .custom-radio label .col-1 input[type="radio"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.entangle-container .custom-checkbox .col-1 input[type="checkbox"]:focus-visible,
.entangle-container .custom-checkbox label .col-1 input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.entangle-container .custom-table input[type="radio"]:focus-visible,
.entangle-container .custom-table input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.importance-radio:focus-visible + label {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* --- Range slider ---
   Gradient na tracku se aktualizuje přes JS:
   el.style.background = `linear-gradient(to right, var(--color-primary)
     ${pct}%, #ddd ${pct}%)` */
.entangle-range {
  display: block;
  width: 100% !important;
  box-sizing: border-box;
  /* The track paints across the padding box, so the theme's side padding never
     showed — it only shortened the distance the thumb could travel. */
  padding: 0;
  margin-bottom: 32px !important;
  height: 6px;
  appearance: none;
  -webkit-appearance: none;
  background: linear-gradient(to right, var(--color-primary) 50%, var(--color-neutral-200) 50%);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
}

/* Popisky na koncích škály (např. „nejhorší“ … „nejlepší“) */
.entangle-range-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  /* -10px keeps the labels close under the track but clear of the 24px thumb,
     which overflows ~9px below the 6px track (was -26px → overlapped the thumb). */
  margin-top: -10px;
  margin-bottom: 16px;
  font-size: var(--font-sm);
  line-height: 1.3;
  color: var(--ent-muted);
}

.entangle-range-label-from { text-align: left; }
.entangle-range-label-to   { text-align: right; }

/* Číselný vstup vedle range slideru – fixní max šířka */
.entangle-range-value {
  width: auto !important;
  max-width: 200px !important;
  text-align: center;
}

/* Thumb – Chrome / Safari / Edge */
.entangle-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

/* Thumb – Firefox */
.entangle-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

/* Track + progress – Firefox */
.entangle-range::-moz-range-track {
  height: 6px;
  background: #ddd;
  border-radius: 3px;
}

.entangle-range::-moz-range-progress {
  height: 6px;
  background: var(--color-primary);
  border-radius: 3px;
}

.entangle-range:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Skupiny checkboxů a radiobuttonů */

/* --- Checkbox – celý řádek jako klikatelná karta ---
   Struktura v HTML:
   <div class="custom-control custom-checkbox">
     <label class="custom-control-label row" for="...">
       <div class="col-1">
         <input type="checkbox" class="custom-control-input">
       </div>
       <div class="col-11">Text</div>
     </label>
   </div>                                                    */

.entangle-container .custom-checkbox {
  display: block;
  width: 100%;
  padding-left: 0;
  margin-bottom: var(--space-2);
}

/* Celý label = klikatelná karta */
.entangle-container .custom-checkbox .custom-control-label {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: 100%;
  padding: 11px 14px 11px 10px;
  background: rgba(0, 0, 0, 0.04);
  background: var(--ent-surface);
  border-radius: min(var(--border-radius), 8px);
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
  margin: 0;
  line-height: 1.1;
}

.entangle-container .custom-checkbox .custom-control-label:hover {
  background: rgba(0, 0, 0, 0.09);
  background: var(--ent-surface-hover);
}

/* Checked stav – label se zvýrazní */
.entangle-container .custom-checkbox .custom-control-label:has(input:checked) {
  border-color: var(--color-primary);
  background: rgba(0, 0, 0, 0.07);
  background: color-mix(in srgb, var(--color-primary) 12%, transparent);
}

.entangle-container .custom-checkbox .custom-control-label:has(input:checked):hover {
  background: rgba(0, 0, 0, 0.11);
  background: color-mix(in srgb, var(--color-primary) 18%, transparent);
}

/* Nativní checkbox – nastylován přímo */
.entangle-container .custom-checkbox .col-1 input[type="checkbox"],
.entangle-container .custom-checkbox label .col-1 input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--ent-line-strong);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
  margin: 0;
  position: relative;
}

.entangle-container .custom-checkbox .col-1 input[type="checkbox"]:checked,
.entangle-container .custom-checkbox label .col-1 input[type="checkbox"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* Fajfka přes ::after */
.entangle-container .custom-checkbox .col-1 input[type="checkbox"]:checked::after,
.entangle-container .custom-checkbox label .col-1 input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='10' viewBox='0 0 12 10'%3E%3Cpolyline points='1.5,5 4.5,8 10.5,1.5' stroke='%23fff' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* .col-1 wrapper – odsazení checkboxu od levého okraje */
.entangle-container .custom-checkbox .col-1,
.entangle-container .custom-checkbox label .col-1 {
  display: flex;
  align-items: center;
  padding-left: 0;
  padding-right: 8px;
  min-width: 30px;
  max-width: 30px;
  flex: 0 0 30px;
}

.entangle-container .extended-answer-input {
  margin-top: var(--space-2);
}

/* --- Select --- */
.entangle-container select {
  display: block;
  width: 100%;
  padding: var(--space-2) 40px var(--space-2) var(--space-4);
  font-size: var(--font-base);
  font-family: inherit;
  color: var(--color-base);
  /* One shorthand, not four longhands: the shorthand resets every background
     longhand, so a stray one from the theme cannot survive. Bricks draws its
     own arrow from two gradients at background-size: 4px 4px — the only
     longhand this rule did not name — and painted our 12×8 chevron at 4×4, a
     speck in the corner of the field. The price of the shorthand: a typo drops
     the whole declaration, white field included, and the "/ size" has to stay
     directly behind the position. */
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px 8px;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--border-radius);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
  box-sizing: border-box;
}

.entangle-container select:hover {
  border-color: var(--ent-line-strong);
}

.entangle-container select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: none;
}

.entangle-container select:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -1px;
}

/* --- Input text --- */
.entangle-container input[type="text"],
.entangle-container input[type="email"],
.entangle-container input[type="tel"],
.entangle-container input[type="number"] {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-base);
  font-family: inherit;
  color: var(--color-base);
  background-color: #fff;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--border-radius);
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.entangle-container input[type="text"]:hover,
.entangle-container input[type="email"]:hover,
.entangle-container input[type="tel"]:hover,
.entangle-container input[type="number"]:hover {
  border-color: var(--ent-line-strong);
}

.entangle-container input[type="text"]:focus,
.entangle-container input[type="email"]:focus,
.entangle-container input[type="tel"]:focus,
.entangle-container input[type="number"]:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: none;
}

/* --- Textarea --- */
.entangle-container textarea {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-base);
  font-family: inherit;
  color: var(--color-base);
  background-color: #fff;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--border-radius);
  box-sizing: border-box;
  resize: vertical;
  transition: border-color 0.15s ease;
}

.entangle-container textarea:hover {
  border-color: var(--ent-line-strong);
}

.entangle-container textarea:focus,
.entangle-container textarea.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: none;
}


/* ============================================================
   8. IMPORTANCE-SATISFACTION WIDGET
   ============================================================ */

/* Importance + Satisfaction – flexbox layout s fixní mezerou */
.imp-sat-container {
  display: flex;
  align-items: flex-start;
  gap: 60px;
}

@media (max-width: 600px) {
  .imp-sat-container {
    flex-direction: column;
    gap: 20px;
  }
}

/* --- Důležitost --- */
.importance-heading {
  font-size: var(--font-md);
  font-weight: 600;
  margin-bottom: var(--space-5);
  padding-top: var(--space-5);
}

.importance-container {
  display: inline-block;
}

/* Skrytý nativní radio – sr-only pozicí (čitelný pro screen reader) */
.importance-radio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.importance-radio + label {
  display: inline-block;
  width: 42px;
  height: 42px;
  line-height: 42px;
  text-align: center;
  vertical-align: middle;
  margin: -1px var(--space-1) 0 0;
  padding-left: 0 !important;
  font-size: var(--font-sm);
  color: #333;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  cursor: pointer;
}

.importance-radio:hover + label {
  background: rgba(0, 0, 0, 0.13);
}

.importance-radio[waschecked="true"] + label,
.importance-radio[waschecked="true"]:hover + label {
  background: #000;
  color: #fff;
}

/* --- Spokojenost --- */
.satisfaction-heading {
  font-size: var(--font-md);
  font-weight: 600;
  margin-bottom: var(--space-5);
  padding-top: var(--space-5);
}

.satisfaction-container {
  display: inline-block;
}

.satisfaction-container input[type="radio"] {
  -webkit-appearance: none;
  width: 42px !important;
  height: 42px !important;
  border: none;
  cursor: pointer;
  margin: 0 5px;
  transition: all 0.2s ease;
}

.satisfaction-container input[type="radio"]:focus {
  outline: none;
}

.satisfaction-container input[type="radio"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 50%;
}

.satisfaction-container input[type="radio"]:after {
  display: none;
}

/* Emoji ikony – výchozí (šedá), hover a waschecked="true" (barevná) */
/* totally_sad */
.satisfaction-container input[type="radio"].totally_sad {
  background: url("data:image/svg+xml,%3Csvg width='42' height='42' viewBox='0 0 42 42' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 42C32.598 42 42 32.598 42 21C42 9.40202 32.598 0 21 0C9.402 0 0 9.40202 0 21C0 32.598 9.402 42 21 42Z' fill='black' fill-opacity='0.08'/%3E%3Cpath d='M15.1039 17.5509C16.2476 16.4072 16.2476 14.5528 15.1039 13.4091C13.9601 12.2653 12.1058 12.2653 10.962 13.4091C9.81829 14.5528 9.81829 16.4072 10.962 17.5509C12.1058 18.6946 13.9601 18.6946 15.1039 17.5509Z' fill='%2305364A'/%3E%3Cpath d='M31.785 16.3241C32.2538 14.776 31.3788 13.141 29.8307 12.6722C28.2826 12.2035 26.6476 13.0785 26.1788 14.6266C25.7101 16.1747 26.5851 17.8097 28.1332 18.2784C29.6813 18.7472 31.3163 17.8722 31.785 16.3241Z' fill='%2305364A'/%3E%3Cpath d='M30.2772 29.608C30.2555 29.5646 30.2338 29.5212 30.1904 29.4562C28.1729 26.2888 24.7451 24.4014 20.992 24.4014C17.2389 24.4014 13.8112 26.2888 11.7936 29.4562C11.7719 29.4996 11.7285 29.5429 11.7068 29.608C11.0777 30.8229 12.0105 32.2764 13.3773 32.2764H28.585C29.9735 32.2764 30.9281 30.8229 30.2772 29.608Z' fill='%2305364A'/%3E%3C/svg%3E") center / cover;
}
.satisfaction-container input[type="radio"].totally_sad:hover,
.satisfaction-container input[type="radio"].totally_sad[waschecked="true"] {
  background: url("data:image/svg+xml,%3Csvg width='42' height='42' viewBox='0 0 42 42' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 42C32.598 42 42 32.598 42 21C42 9.40202 32.598 0 21 0C9.402 0 0 9.40202 0 21C0 32.598 9.402 42 21 42Z' fill='%23E01F25'/%3E%3Cpath d='M15.1039 17.5509C16.2476 16.4072 16.2476 14.5528 15.1039 13.4091C13.9601 12.2653 12.1058 12.2653 10.962 13.4091C9.81829 14.5528 9.81829 16.4072 10.962 17.5509C12.1058 18.6946 13.9601 18.6946 15.1039 17.5509Z' fill='%2305364A'/%3E%3Cpath d='M31.785 16.3241C32.2538 14.776 31.3788 13.141 29.8307 12.6722C28.2826 12.2035 26.6476 13.0785 26.1788 14.6266C25.7101 16.1747 26.5851 17.8097 28.1332 18.2784C29.6813 18.7472 31.3163 17.8722 31.785 16.3241Z' fill='%2305364A'/%3E%3Cpath d='M30.2772 29.608C30.2555 29.5646 30.2338 29.5212 30.1904 29.4562C28.1729 26.2888 24.7451 24.4014 20.992 24.4014C17.2389 24.4014 13.8112 26.2888 11.7936 29.4562C11.7719 29.4996 11.7285 29.5429 11.7068 29.608C11.0777 30.8229 12.0105 32.2764 13.3773 32.2764H28.585C29.9735 32.2764 30.9281 30.8229 30.2772 29.608Z' fill='%2305364A'/%3E%3C/svg%3E") center / cover;
}

/* sad */
.satisfaction-container input[type="radio"].sad {
  background: url("data:image/svg+xml,%3Csvg width='42' height='42' viewBox='0 0 42 42' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 42C32.598 42 42 32.598 42 21C42 9.40202 32.598 0 21 0C9.40202 0 0 9.40202 0 21C0 32.598 9.40202 42 21 42Z' fill='black' fill-opacity='0.08'/%3E%3Cpath d='M15.1034 17.5519C16.2471 16.4081 16.2471 14.5538 15.1034 13.41C13.9596 12.2663 12.1053 12.2663 10.9615 13.41C9.81781 14.5538 9.81781 16.4081 10.9615 17.5519C12.1053 18.6956 13.9596 18.6956 15.1034 17.5519Z' fill='%2305364A'/%3E%3Cpath d='M31.2392 17.3594C32.2752 16.1171 32.108 14.2703 30.8657 13.2342C29.6235 12.1982 27.7766 12.3654 26.7406 13.6077C25.7046 14.8499 25.8718 16.6968 27.114 17.7328C28.3563 18.7688 30.2032 18.6016 31.2392 17.3594Z' fill='%2305364A'/%3E%3Cpath d='M28.4775 32.5844C27.805 32.5844 27.1541 32.2589 26.7636 31.6515C25.5054 29.6556 23.3359 28.4841 20.9929 28.4841C18.6499 28.4841 16.4805 29.6773 15.2222 31.6515C14.6148 32.606 13.3565 32.8881 12.4236 32.2806C11.4691 31.6732 11.187 30.4149 11.7945 29.482C13.8121 26.3147 17.2398 24.4272 20.9929 24.4272C24.746 24.4272 28.1738 26.3147 30.1913 29.482C30.7988 30.4366 30.5168 31.6949 29.5622 32.2806C29.2368 32.4976 28.8463 32.5844 28.4775 32.5844Z' fill='%2305364A'/%3E%3C/svg%3E") center / cover;
}
.satisfaction-container input[type="radio"].sad:hover,
.satisfaction-container input[type="radio"].sad[waschecked="true"] {
  background: url("data:image/svg+xml,%3Csvg width='42' height='42' viewBox='0 0 42 42' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 42C32.598 42 42 32.598 42 21C42 9.40202 32.598 0 21 0C9.40202 0 0 9.40202 0 21C0 32.598 9.40202 42 21 42Z' fill='%23F15A29'/%3E%3Cpath d='M15.1034 17.5519C16.2471 16.4081 16.2471 14.5538 15.1034 13.41C13.9596 12.2663 12.1053 12.2663 10.9615 13.41C9.81781 14.5538 9.81781 16.4081 10.9615 17.5519C12.1053 18.6956 13.9596 18.6956 15.1034 17.5519Z' fill='%2305364A'/%3E%3Cpath d='M31.2392 17.3594C32.2752 16.1171 32.108 14.2703 30.8657 13.2342C29.6235 12.1982 27.7766 12.3654 26.7406 13.6077C25.7046 14.8499 25.8718 16.6968 27.114 17.7328C28.3563 18.7688 30.2032 18.6016 31.2392 17.3594Z' fill='%2305364A'/%3E%3Cpath d='M28.4775 32.5844C27.805 32.5844 27.1541 32.2589 26.7636 31.6515C25.5054 29.6556 23.3359 28.4841 20.9929 28.4841C18.6499 28.4841 16.4805 29.6773 15.2222 31.6515C14.6148 32.606 13.3565 32.8881 12.4236 32.2806C11.4691 31.6732 11.187 30.4149 11.7945 29.482C13.8121 26.3147 17.2398 24.4272 20.9929 24.4272C24.746 24.4272 28.1738 26.3147 30.1913 29.482C30.7988 30.4366 30.5168 31.6949 29.5622 32.2806C29.2368 32.4976 28.8463 32.5844 28.4775 32.5844Z' fill='%2305364A'/%3E%3C/svg%3E") center / cover;
}

/* happy */
.satisfaction-container input[type="radio"].happy {
  background: url("data:image/svg+xml,%3Csvg width='42' height='42' viewBox='0 0 42 42' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 42C32.598 42 42 32.598 42 21C42 9.40202 32.598 0 21 0C9.40202 0 0 9.40202 0 21C0 32.598 9.40202 42 21 42Z' fill='black' fill-opacity='0.08'/%3E%3Cpath d='M13.0118 18.4239C14.6293 18.4239 15.9405 17.1127 15.9405 15.4952C15.9405 13.8777 14.6293 12.5664 13.0118 12.5664C11.3943 12.5664 10.083 13.8777 10.083 15.4952C10.083 17.1127 11.3943 18.4239 13.0118 18.4239Z' fill='%2305364A'/%3E%3Cpath d='M28.9571 18.4239C30.5746 18.4239 31.8858 17.1127 31.8858 15.4952C31.8858 13.8777 30.5746 12.5664 28.9571 12.5664C27.3396 12.5664 26.0283 13.8777 26.0283 15.4952C26.0283 17.1127 27.3396 18.4239 28.9571 18.4239Z' fill='%2305364A'/%3E%3Cpath d='M20.9954 32.5902C17.2422 32.5902 13.8145 30.7028 11.7969 27.5354C11.1895 26.5809 11.4715 25.3226 12.4261 24.7369C13.3806 24.1294 14.6389 24.4114 15.2246 25.366C16.4829 27.3619 18.6524 28.5334 20.9954 28.5334C23.3384 28.5334 25.5078 27.3402 26.7661 25.366C27.3735 24.4114 28.6318 24.1294 29.5647 24.7369C30.5192 25.3443 30.8012 26.6026 30.1938 27.5354C28.1762 30.7028 24.7485 32.5902 20.9954 32.5902Z' fill='%2305364A'/%3E%3C/svg%3E") center / cover;
}
.satisfaction-container input[type="radio"].happy:hover,
.satisfaction-container input[type="radio"].happy[waschecked="true"] {
  background: url("data:image/svg+xml,%3Csvg width='42' height='42' viewBox='0 0 42 42' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 42C32.598 42 42 32.598 42 21C42 9.40202 32.598 0 21 0C9.40202 0 0 9.40202 0 21C0 32.598 9.40202 42 21 42Z' fill='%2391CA60'/%3E%3Cpath d='M13.0118 18.4239C14.6293 18.4239 15.9405 17.1127 15.9405 15.4952C15.9405 13.8777 14.6293 12.5664 13.0118 12.5664C11.3943 12.5664 10.083 13.8777 10.083 15.4952C10.083 17.1127 11.3943 18.4239 13.0118 18.4239Z' fill='%2305364A'/%3E%3Cpath d='M28.9571 18.4239C30.5746 18.4239 31.8858 17.1127 31.8858 15.4952C31.8858 13.8777 30.5746 12.5664 28.9571 12.5664C27.3396 12.5664 26.0283 13.8777 26.0283 15.4952C26.0283 17.1127 27.3396 18.4239 28.9571 18.4239Z' fill='%2305364A'/%3E%3Cpath d='M20.9954 32.5902C17.2422 32.5902 13.8145 30.7028 11.7969 27.5354C11.1895 26.5809 11.4715 25.3226 12.4261 24.7369C13.3806 24.1294 14.6389 24.4114 15.2246 25.366C16.4829 27.3619 18.6524 28.5334 20.9954 28.5334C23.3384 28.5334 25.5078 27.3402 26.7661 25.366C27.3735 24.4114 28.6318 24.1294 29.5647 24.7369C30.5192 25.3443 30.8012 26.6026 30.1938 27.5354C28.1762 30.7028 24.7485 32.5902 20.9954 32.5902Z' fill='%2305364A'/%3E%3C/svg%3E") center / cover;
}

/* totally_happy */
.satisfaction-container input[type="radio"].totally_happy {
  background: url("data:image/svg+xml,%3Csvg width='42' height='42' viewBox='0 0 42 42' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 42C32.598 42 42 32.598 42 21C42 9.40202 32.598 0 21 0C9.40202 0 0 9.40202 0 21C0 32.598 9.40202 42 21 42Z' fill='black' fill-opacity='0.08'/%3E%3Cpath d='M13.0122 18.4273C14.6297 18.4273 15.941 17.1161 15.941 15.4986C15.941 13.8811 14.6297 12.5698 13.0122 12.5698C11.3947 12.5698 10.0835 13.8811 10.0835 15.4986C10.0835 17.1161 11.3947 18.4273 13.0122 18.4273Z' fill='%2305364A'/%3E%3Cpath d='M28.9576 18.4273C30.5751 18.4273 31.8863 17.1161 31.8863 15.4986C31.8863 13.8811 30.5751 12.5698 28.9576 12.5698C27.3401 12.5698 26.0288 13.8811 26.0288 15.4986C26.0288 17.1161 27.3401 18.4273 28.9576 18.4273Z' fill='%2305364A'/%3E%3Cpath d='M28.5889 24.7402H13.3811C12.0143 24.7402 11.0598 26.1938 11.7106 27.4086C11.7323 27.452 11.754 27.4954 11.7974 27.5605C13.815 30.7279 17.2427 32.6153 20.9958 32.6153C24.749 32.6153 28.1767 30.7279 30.1943 27.5605C30.216 27.5171 30.2594 27.4737 30.281 27.4086C30.9102 26.1938 29.9556 24.7402 28.5889 24.7402Z' fill='%2305364A'/%3E%3C/svg%3E") center / cover;
}
.satisfaction-container input[type="radio"].totally_happy:hover,
.satisfaction-container input[type="radio"].totally_happy[waschecked="true"] {
  background: url("data:image/svg+xml,%3Csvg width='42' height='42' viewBox='0 0 42 42' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M21 42C32.598 42 42 32.598 42 21C42 9.40202 32.598 0 21 0C9.40202 0 0 9.40202 0 21C0 32.598 9.40202 42 21 42Z' fill='%2339B54A'/%3E%3Cpath d='M13.0122 18.4273C14.6297 18.4273 15.941 17.1161 15.941 15.4986C15.941 13.8811 14.6297 12.5698 13.0122 12.5698C11.3947 12.5698 10.0835 13.8811 10.0835 15.4986C10.0835 17.1161 11.3947 18.4273 13.0122 18.4273Z' fill='%2305364A'/%3E%3Cpath d='M28.9576 18.4273C30.5751 18.4273 31.8863 17.1161 31.8863 15.4986C31.8863 13.8811 30.5751 12.5698 28.9576 12.5698C27.3401 12.5698 26.0288 13.8811 26.0288 15.4986C26.0288 17.1161 27.3401 18.4273 28.9576 18.4273Z' fill='%2305364A'/%3E%3Cpath d='M28.5889 24.7402H13.3811C12.0143 24.7402 11.0598 26.1938 11.7106 27.4086C11.7323 27.452 11.754 27.4954 11.7974 27.5605C13.815 30.7279 17.2427 32.6153 20.9958 32.6153C24.749 32.6153 28.1767 30.7279 30.1943 27.5605C30.216 27.5171 30.2594 27.4737 30.281 27.4086C30.9102 26.1938 29.9556 24.7402 28.5889 24.7402Z' fill='%2305364A'/%3E%3C/svg%3E") center / cover;
}


/* --- Škála se smajlíky (typ otázky smiley-scale) ---
   Jeden bod = jedno radio + popiska. Ikonu i barvu počítá PHP z pozice bodu
   (EntangleCore\Questions\SmileyScale) a barva přichází jako --ess-color na
   obalu bodu. Barvu nese bod už v klidu, jen ztlumenou — škála tak sděluje směr
   dřív, než na ni někdo klikne; vybraný bod jede naplno a dostane rámeček.
   Aktivní stav se řídí :checked, ne atributem waschecked jako u starších
   smajlíků výše. */

.ess-points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.ess-point {
  position: relative;
  flex: 1 1 0;
  min-width: 100px;
}

.ess-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.ess-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  height: 100%;
  padding: var(--space-3) var(--space-2);
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

.ess-icon {
  display: block;
  width: 48px;
  height: 48px;
}

/* Barevné části ikony (pozadí obličeje, rozsvícené sloupce). */
.ess-ink {
  fill: var(--ess-color);
  opacity: 0.55;
  transition: opacity 0.12s ease;
}

/* Zhasnuté sloupce — zůstávají neutrální, ať je vidět, kolik z celé škály to je. */
.ess-off {
  fill: rgba(0, 0, 0, 0.08);
}

.ess-eye {
  fill: #05364a;
}

.ess-mouth {
  fill: none;
  stroke: #05364a;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.ess-input:checked + .ess-label .ess-ink {
  opacity: 1;
}

.ess-input:checked + .ess-label {
  border-color: var(--ess-color);
  background: rgba(0, 0, 0, 0.03);
}

.ess-input:focus-visible + .ess-label {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Hover jen tam, kde opravdu je — na dotyku by po klepnutí zůstal viset
   a tvářil se jako vybraná odpověď. */
@media (hover: hover) {
  .ess-label:hover {
    background: rgba(0, 0, 0, 0.04);
  }

  .ess-label:hover .ess-ink {
    opacity: 1;
  }
}

.ess-value {
  font-size: var(--font-sm);
  font-weight: 700;
  line-height: 1;
  color: var(--ent-faint);
}

.ess-text {
  font-size: var(--font-sm);
  line-height: 1.25;
}

/* Bez ikon je číslo jediná kotva, tak dostane kolečko. */
.ess-points--no-icons .ess-value {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #05364a;
  background: var(--ess-color);
  opacity: 0.55;
  transition: opacity 0.12s ease;
}

.ess-points--no-icons .ess-input:checked + .ess-label .ess-value {
  opacity: 1;
}

@media (hover: hover) {
  .ess-points--no-icons .ess-label:hover .ess-value {
    opacity: 1;
  }
}

/* Na mobilu vedle sebe nevyjdou — jeden bod na řádek, ikona vlevo. */
@media (max-width: 575px) {
  .ess-points {
    flex-direction: column;
  }

  .ess-point {
    min-width: 0;
  }

  .ess-label {
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--space-3);
    padding: var(--space-2);
    text-align: left;
  }

  .ess-icon {
    width: 36px;
    height: 36px;
  }

  .ess-points--no-icons .ess-value {
    width: 32px;
    height: 32px;
  }
}


/* ============================================================
   9. STAVOVÉ TŘÍDY & ZPRÁVY
   ============================================================ */

.error-message,
.satisfaction-error-message {
  background: #e85050;
  padding: var(--space-1) var(--space-2);
  margin: var(--space-2) 0 0 0;
  border-radius: 2px;
}

.error-message p,
.satisfaction-error-message p {
  margin: 0;
  padding: 0;
  color: #fff;
}

/* ── Frontend countdown ───────────────────────────── */

.entangle-frontend-countdown {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding: var(--space-1) var(--space-4);
  font-size: var(--font-sm);
  font-weight: 500;
  border-radius: var(--border-radius);
  background: #fef8ee;
  border: 1px solid #f0c33c;
  color: #826200;
}

.entangle-frontend-countdown[data-type="end"] {
  background: #fef2f1;
  border-color: #d63638;
  color: #8a1f1f;
}

.entangle-frontend-countdown-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.entangle-frontend-countdown.is-expired .entangle-frontend-countdown-timer {
  color: #d63638;
}

/* ── Header status line: countdown + turnout ───────────────
   Two chips of the same size side by side under the title; on a narrow screen
   they wrap under each other. The countdown carries its own bottom margin for
   the pages that still print it alone, so it is dropped inside this row. */
.entangle-vote-meta {
  display: flex;
  flex-wrap: wrap;
  /* stretch, not center: the pills stay the same height even when one of them
     wraps to two lines on a narrow screen. */
  align-items: stretch;
  justify-content: flex-start;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.entangle-vote-meta:empty { display: none; }

.entangle-vote-meta .entangle-frontend-countdown { margin-bottom: 0; }

/* The two pills are a matched pair, so their type is stated here for both
   rather than inherited: a theme that sizes spans, buttons or the countdown's
   own parts would otherwise make one of them read larger than the other, and
   a taller line box would push its text off the shared baseline. */
.entangle-vote-meta .entangle-frontend-countdown,
.entangle-vote-meta .entangle-vote-stats {
  font-size: var(--font-sm);
  line-height: 1.5;
  /* The words in the MIDDLE of the pill, whatever the font. A line box reserves
     room above the capitals and under the baseline, and how much of each is the
     font's own business: padding tuned by hand for one face (6.5px over 1.5px,
     for Liberec's) let the words sink in the pill under another (13. 11.). So
     the padding is even, the pill keeps its height by a min-height, and where
     the browser can do it the line box of each part is cut to the capitals and
     the baseline (`text-box`), which makes "the middle" the middle of the
     letters themselves. Elsewhere the line box is centred — a pixel or two
     high for words without descenders, never low. */
  min-height: calc(1.5em + 10px);
  padding-top: var(--space-1);
  padding-bottom: var(--space-1);
}

@supports (text-box: trim-both cap alphabetic) {
  .entangle-vote-meta .entangle-frontend-countdown > *,
  .entangle-vote-meta .entangle-vote-stats > * {
    text-box: trim-both cap alphabetic;
  }
}

.entangle-vote-meta .entangle-frontend-countdown > *,
.entangle-vote-meta .entangle-vote-stats > * {
  font-size: inherit;
  line-height: inherit;
}

/* Both labels share one neutral tone, so the pair reads as a set and the
   colour is left to carry what it is for: the countdown's red belongs on the
   time that is running out, not on the words in front of it. #666 clears AA on
   both the pink and the grey pill (5.3:1 and 5.7:1). */
.entangle-vote-meta .entangle-frontend-countdown-label,
.entangle-vote-meta .entangle-vote-stats__label {
  color: var(--ent-muted);
}

/* Both values stay at 500 like their labels. The bold face of the site font can
   carry taller vertical metrics than the regular one (Aktiv Grotesk on Liberec:
   a 700 run draws a 17.1px text box against 13.7px at 500), which reads as
   uneven padding around the number and shows up plainly the moment the text is
   selected. Nothing but the weight causes it — line-height, display and
   vertical-align leave it untouched, and 600 still resolves to the bold face.
   The emphasis is carried by colour above instead, which costs no metrics. */
.entangle-vote-meta .entangle-frontend-countdown-timer,
.entangle-vote-meta .entangle-vote-stats__count {
  font-weight: 500;
}

.entangle-vote-stats {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-4);
  font-size: var(--font-sm);
  font-weight: 500;
  border-radius: var(--border-radius);
  background: var(--color-neutral-100);
  border: 1px solid var(--color-neutral-300);
  color: var(--color-base);
}

.entangle-vote-stats__count {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.entangle-vote-stats__open {
  all: unset;
  cursor: pointer;
  padding-left: var(--space-2);
  border-left: 1px solid var(--color-neutral-300);
  color: var(--color-primary);
  text-decoration: underline;
}

.entangle-vote-stats__open:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.entangle-vote-stats__open[hidden] { display: none; }

/* ── Turnout modal ─────────────────────────────────────────
   Same shape as the mapping submit modal (.entangle-map-modal below): a fixed
   overlay with an explicit dynamic height, because older mobile browsers read
   inset: 0 against the large viewport and let the panel run off screen. */
.entangle-vote-stats-modal {
  display: none;
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 2147483646;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.entangle-vote-stats-modal.is-open { display: flex; }

.entangle-vote-stats-modal__inner {
  background: #fff;
  border-radius: var(--border-radius);
  width: 100%;
  max-width: 720px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.entangle-vote-stats-modal__header {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px var(--space-5);
  border-bottom: 1px solid var(--color-neutral-300);
}

.entangle-vote-stats-modal__header h3 {
  margin: 0;
  font-size: var(--font-base);
}

.entangle-vote-stats-modal__close {
  border: 0;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  color: var(--color-base);
}

.entangle-vote-stats-modal__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-5);
}

.entangle-vote-stats-modal__empty,
.entangle-vote-stats-modal__caption {
  margin: 0;
  text-align: center;
  font-size: var(--font-sm);
  color: var(--ent-muted);
}

.entangle-vote-stats-modal__caption { margin-top: var(--space-3); }

/* The page must not scroll behind the open dialog. */
body.entangle-vote-stats-open { overflow: hidden; }

/* ── Turnout chart (inline SVG, drawn by vote-stats.js) ──── */
.entangle-vote-stats-chart {
  display: block;
  width: 100%;
  height: auto;
}

.entangle-vote-stats-chart__grid {
  stroke: var(--color-neutral-200);
  stroke-width: 1;
}

.entangle-vote-stats-chart__tick {
  fill: var(--ent-muted);
  font-size: 12px;
}

.entangle-vote-stats-chart__area {
  fill: var(--color-primary);
  fill-opacity: 0.12;
}

.entangle-vote-stats-chart__line {
  fill: none;
  stroke: var(--color-primary);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.entangle-vote-stats-chart__last {
  fill: var(--color-primary);
}

.entangle-vote-stats-chart__hit {
  fill: transparent;
}

@media (max-width: 480px) {
  /* The chip wraps under the countdown here; it keeps its own width so the two
     read as the same kind of thing rather than one badge and one banner. */
  .entangle-vote-stats-modal { padding: 0; }
  .entangle-vote-stats-modal__inner {
    max-width: none;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
}

.blue-message h3  { color: #0676ac !important; }

/* Thank-you screen: once the ballot is gone this is the only thing left on the
   page, so it is centred and given room rather than sitting on the footer. */
.thanks-message {
  padding: var(--space-8) 0;
  text-align: center;
}

.thanks-message .green-message {
  max-width: 640px;
  margin: 0 auto;
}

.thanks-message .green-message h3 {
  color: inherit !important;
  font-size: var(--font-2xl);
  margin-bottom: var(--space-4);
}

.thanks-message .green-message p {
  all: revert;
  font-size: var(--font-xl);
  line-height: 1.4;
  margin: 0 0 var(--space-2);
}

.send-normal-state {
  margin-bottom: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

/* --- Submit tlačítko – disabled stav (ověření PINem) --- */
.send-form[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: auto;          /* aby fungoval title tooltip i click handler */
}

.send-form[disabled]:hover {
  background-image: none !important;
}

/* Tooltip zpráva při kliknutí na disabled submit (mobilní fallback) */
.send-form-disabled-msg {
  display: block;
  text-align: center;
  color: #c0392b;
  font-size: var(--font-xs);
  margin-top: var(--space-2);
  animation: entangle-fade-in 0.2s ease;
}

/* Tooltip nad tlačítkem Další při neověřeném verification slidu */
.verify-required-tooltip {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: var(--space-2);
  background: #333;
  color: #fff;
  font-size: var(--font-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: 4px;
  white-space: nowrap;
  z-index: 10;
  animation: entangle-fade-in 0.2s ease;
}
.verify-required-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 16px;
  border: 6px solid transparent;
  border-top-color: #333;
}

@keyframes entangle-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.entangle-hp-wrap {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.entangle-thanks-btn-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-top: var(--space-7);
}

/* One shape for both: the link out and the kiosk's "fill in again", which is
   added by script and otherwise inherited whatever the theme does to buttons. */
.entangle-thanks-btn,
.entangle-refill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-3) var(--space-6) !important;
  font-size: var(--font-base) !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  border-radius: var(--border-radius) !important;
  text-decoration: none !important;
  cursor: pointer;
}

.entangle-thanks-btn {
  color: var(--color-contrast, #fff) !important;
  background-color: var(--color-primary) !important;
  border: 1px solid var(--color-primary) !important;
}

/* Secondary: same shape, quieter fill — leaving is the expected move. */
.entangle-refill-btn {
  color: var(--color-primary) !important;
  background-color: transparent !important;
  border: 1px solid var(--color-primary) !important;
}

.entangle-thanks-btn:hover {
  background-image: linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.12)) !important;
  color: var(--color-contrast, #fff) !important;
  text-decoration: none !important;
}

.entangle-refill-btn:hover {
  background-color: var(--color-neutral-100) !important;
  color: var(--color-primary) !important;
}

.entangle-thanks-btn:focus-visible,
.entangle-refill-btn:focus-visible {
  outline: 3px solid var(--color-primary) !important;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(41, 134, 204, 0.3);
}


/* ============================================================
   10. RESPONZIVITA
   ============================================================ */

/* Přepnutí matice z tabulky na mobilní seznam */
@media only screen and (max-width: 600px) {
  .matrix-radio-desktop,
  .matrix-checkbox-desktop { display: none; }

  .matrix-radio-mobile,
  .matrix-checkbox-mobile  { display: block; }

  /* Mobilní label pro radio/checkbox – přidá šedé pozadí */
  .custom-radio .custom-control-label,
  .custom-checkbox .custom-control-label {
    background-color: var(--ent-surface);
    margin: 0 0 5px 0;
    padding: 10px 2px;
    border-radius: 5px;
    align-items: center;
  }

  /* Matice (mobil) – odsazení otázky od odpovědí a více prostoru mezi otázkami */
  .matrix-radio-mobile > .input-container,
  .matrix-checkbox-mobile > .input-container {
    margin-bottom: 32px;
  }

  .matrix-radio-mobile > .input-container > h4,
  .matrix-checkbox-mobile > .input-container > h4 {
    margin-bottom: 14px !important;
    font-size: var(--font-base);
  }

  /* Bootstrap grid override pro .col-lg-2 */
  .col-lg-2.col-2 {
    width: 20%;
    max-width: 20%;
    flex: 0 0 20%;
  }

  .col-lg-10 .col-lg-2.col-2 {
    text-align: right;
  }
}

@media (min-width: 600px) and (max-width: 992px) {
  .col-lg-2.col-2 {
    width: 20%;
    max-width: 20%;
    flex: 0 0 20%;
  }

  .col-lg-10 .col-lg-2.col-2 {
    text-align: center;
  }
}


/* ============================================================
   11. HLASOVÁNÍ – Vote-specific styles
   ============================================================ */

/* The vote's own column is 1000px wide — the VOTE's, and nothing of the page around it: a theme uses `.container`
   for its header, its footer and for the title of the page too, and narrowing those moved the logo and the menu
   (until 12. 11.) and squeezed the page's title into the vote's column (until 13. 11.). So the rule names the one
   container the vote itself draws.

   The column stands in the MIDDLE of the page, and what is in it reads from the start (the owner, 13. 11.: the
   block centred, its words and its pills aligned to the left). Its own side padding — which a theme's `.container`
   would give it on top of the page's gutter — is taken away. */
.single-entangle_voting .entangle-container > .container {
  max-width: 1000px !important;
  margin-inline: auto;
  padding-inline: 0;
}

@media (max-width: 1000px) {
  .single-entangle_voting .entangle-container {
    /* width:auto lets the margins define the gutter. With the fixed width kept
       here the box was 12px narrower than the space left for it, so the whole
       vote sat 10px from the left edge and 22px from the right. */
    width: auto;
    margin-left: var(--space-4);
    margin-right: var(--space-4);
  }

  /* Inside a container of the theme the gutter is the theme's: a second one here set the vote 16px in from the
     title of the page above it (13. 11.). */
  .single-entangle_voting .container .entangle-container {
    margin-left: 0;
    margin-right: 0;
  }
}

/* A ballot reads from the start — ALL of it (the owner, 13. 11.). The head was turned first (the intro and the two
   pills); the rest stayed centred under it and the page read as two designs: the consent, "Continue" and its note
   in the middle of the column, the verification in a narrow centred box. Each now begins where the text above it
   begins. What stays centred is what is a thing of its own: the bar of counters pinned to the bottom of the
   screen, a dialog, the digits of a code — and the +/− of a card, which is the control of the whole card and
   stands in the middle of its foot (the owner, 14. 11.; it was moved to the start for a day and read as a
   stray dot under the photo). */
.single-entangle_voting .entangle-container-uvod-wrapper {
  text-align: start;
}

.entangle-container .vote-submit-wrapper {
  align-items: flex-start;
}

/* The markup centres the button by a utility class of its own (.m-auto). */
.entangle-container .vote-submit-wrapper > .send-form.m-auto {
  margin: 0;
}

.entangle-container .vote-submit-wrapper .vote-submit-note,
.entangle-container .ev-survey-intro {
  text-align: start;
}

.entangle-container #voteForm .gdpr-consent-wrap.custom-checkbox {
  margin-left: 0;
  margin-right: 0;
}

/* The verification is a short form, not a band across the ballot: its field and its button are as wide as an
   address or a phone number needs. (It was meant to be 400px all along — `.verification-wizard { max-width }` —
   but it is also a `.col-12` of the grid, whose 100% outranked that, so the button ran the full 1000px.) */
.entangle-container .verification-wizard {
  flex: 0 1 auto;
  width: 100%;
  max-width: 28em;
  margin-left: 0;
  margin-right: 0;
  text-align: start;
}

.entangle-container .verification-box.justify-content-center {
  justify-content: flex-start;
}

.entangle-container .verification-wizard .otp-inputs {
  justify-content: flex-start;
}

/* One step between the head of a ballot and its first card, not three: the padding over the head's line, the
   margin under it and the margin of the list each brought 48px (13. 11.). */
.entangle-container > .container > .entangle-container-uvod {
  margin-bottom: var(--space-7);
}

.entangle-container > .container > .entangle-container-uvod > .entangle-container-uvod-wrapper {
  padding-bottom: var(--space-7);
  border-bottom-color: var(--ent-line);
}

.entangle-container #voteForm > .content.mt-5 {
  margin-top: 0;
}

/* The intro of a ballot is the body of the page; a line of it is not the full width of the column. */
.entangle-container .entangle_uvod {
  max-width: 46em;
}

.entangle-container .entangle-container-uvod-wrapper .entangle_uvod p,
.entangle-container .project-card__info_text {
  font-size: var(--font-base);
}

/* Kruhová tlačítka +/- */
.circle {
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.circle svg {
  display: block;
}

.small-plus-circle,
.small-negative-circle {
  width: 22px;
  height: 22px;
}
.small-plus-circle svg,
.small-negative-circle svg {
  width: 14px;
  height: 14px;
}

.big-plus-circle,
.big-negative-circle {
  width: 40px;
  height: 40px;
}
.big-plus-circle svg,
.big-negative-circle svg {
  width: 20px;
  height: 20px;
}


.bg-gray {
  background-color: #f2f2f3;
}

/* Karta projektu */
.project-card {
  border-radius: var(--border-radius);
  margin-bottom: var(--space-5);
  border: 1px solid var(--color-neutral-300);
  padding: var(--space-5) var(--space-5) 0;
  background-color: transparent;
}

.project-card:last-child {
  margin-bottom: 0;
}

.project-card.used-positive {
  background-color: #e9f8ef;
  border: 1px solid #198754;
}

.project-card.used-negative {
  background-color: #feeeee;
  border: 1px solid #dc3545;
}

.project-card.need-vote {
  border: 1px solid #dc3545;
}

.project-card__header {
  margin-bottom: var(--space-4);
}

.project-card__image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  border-radius: var(--border-radius, 10px);
}

.project-card__info img {
  max-width: 100% !important;
}

/* THEME DEFENCE — the card states its own layout. `.project-card` is a name a theme may well have for a card of
   its own (entangle-base: a flex column with a gap of 16px, for its tiles of projects), and what the theme says
   of that name lands here too: the gap stood on top of the margins under the title, 44px between the name of a
   proposal and its photo (14. 11.). Likewise the paragraphs inside: a theme gives every <p> its own margins, so
   the text began a line below the top of the photo beside it and each line of the facts stood a line apart. */
.entangle-container .project-card {
  display: block;
}

.entangle-container .project-card__header {
  margin: 0 0 var(--space-4);
}

.entangle-container .project-card__header h3 {
  margin: 0;
}

.entangle-container .project-card__info_text p {
  margin: 0 0 var(--space-3);
}

/* Only a paragraph: where the description is bare text, the list of facts is the first ELEMENT and keeps its gap. */
.entangle-container .project-card__info_text > p:first-child {
  margin-top: 0;
}

.entangle-container .project-card__info_text > :last-child,
.entangle-container .project-card__info_text .additional-info p {
  margin-bottom: 0;
}

/* The way to the proposal is a LINK and looks like one: a theme that keeps its links plain outside the article
   (colour inherited, no underline) left it as a line of ordinary text (14. 11.). */
.entangle-container .project-card__detail-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.entangle-container .project-card__detail-link:hover {
  text-decoration-thickness: 2px;
}

/* Odkaz na návrh tece inline s popisem — inline-block s margin-top
   zvedal line-box posledního řádku a dělal nepravidelnou mezeru. */

.entangle-container .project-card__info {
  padding-left: var(--space-4);
}

/* In one column (mobile) the info block sits under the image, so the column
   gap turned into an indent: the toggle and the expanded text started 16px
   to the right of the photo and the title. */
@media only screen and (max-width: 767.98px) {
  .entangle-container .project-card__info {
    padding-left: 0;
  }
}

.entangle-container .project-card h3 {
  font-size: var(--font-lg);
}

/* Rozbalovací detail – mobilní tlačítko. It reads as part of the card's
   text (title and description colour), not as a link out of the card, so
   the theme's link colour does not apply; the underline stays. */
.project-card__show-more--mobile {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
}
.entangle-container .project-card__show-more--mobile {
  color: inherit;
}
.project-card__show-more--mobile svg {
  transition: .3s transform;
}

.project-card__show-more--mobile.active svg {
  transform: rotate(180deg);
  transition: .3s transform;
}

@media only screen and (min-width: 768px) {
  .project-card__show-more--mobile {
    display: none !important;
  }
}

@media only screen and (max-width: 768px) {
  .project-card__info_text {
    display: none;
  }
}

/* Doplňující informace */
.additional-info {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
}

.additional-info li {
  margin-bottom: var(--space-2);
}

.additional-info li:last-child {
  margin-bottom: 0;
}

/* Hlasovací tlačítka */
.voting-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  border-top: 1px solid var(--color-neutral-300);
  padding: var(--space-5) 0;
}

.voting-buttons a {
  text-decoration: none !important;
  background-image: none !important;
}

/* Wrapper submit tlačítka + back link v doplňujícím dotazníku */
.vote-submit-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

/* Bootstrap tooltip styling pro vote tlačítka – JS inicializuje tooltip z title atributu.
   Tooltip je v body, mimo .entangle-container__holder → pevné hodnoty, ne tokeny. */
.tooltip .tooltip-inner {
  background-color: #333;
  color: #fff;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  /* Without a width the message renders as one long line, so on a phone it
     runs off the screen — and the rule it explains is exactly what the voter
     needs to read. Wrapping it lets the positioner keep it in view. */
  max-width: min(280px, calc(100vw - 24px));
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
  border-top-color: #333;
}

.tooltip.bs-tooltip-bottom .tooltip-arrow::before {
  border-bottom-color: #333;
}

.voting-buttons a.used span.big-plus-circle {
  outline: 1px solid #198754;
  outline-offset: 2px;
}

.voting-buttons a.used span.big-negative-circle {
  outline: 1px solid #dc3545;
  outline-offset: 2px;
}

.voting-buttons a.disabled span.circle {
  background-color: rgba(0, 0, 0, 0.24) !important;
  cursor: default;
  outline: none;
}

/* Překročení limitu hlasů */
.positives-exceeded,
.negatives-exceeded {
  color: #888;
}

.positives-bg-exceeded,
.negatives-bg-exceeded {
  background-color: #888 !important;
}

/* The bar pinned to the bottom of the screen while its section scrolls by.
   It stands at the END of its scope (.vote-scope: a category, or the cards of
   a ballot without categories) — a copy of the header's counters, hidden from
   assistive technology — and sticks to the bottom edge: the browser keeps it
   on screen from the moment the scope reaches the bottom strip until the last
   card has passed, and hands over to the next scope's bar by itself. No scroll
   handler, no class flipping, no padding to fill the hole a fixed bar leaves,
   and none of the jolt a phone adds when its toolbar comes and goes.

   At rest — once the scope has scrolled past — the bar would sit under the
   last card as a strip nobody needs. So the bar has a fixed height and the
   scope clips exactly that much off its own bottom edge: the resting bar lies
   in the clipped strip and is invisible, the pinned bar rides above it. The
   clip line sits one pixel above the bar's top edge: on the edge itself the
   anti-aliasing left a hairline of the bar's colour under the last card. The
   clip reaches far out on the other three sides so nothing else is cut
   (tooltips, focus rings). Same green as the header, so the two read as one
   thing. */
.vote-scope {
  --votes-bar-pinned-height: 44px;
  clip-path: polygon(
    -100vw -100vh,
    calc(100% + 100vw) -100vh,
    calc(100% + 100vw) calc(100% - var(--votes-bar-pinned-height) - 1px),
    -100vw calc(100% - var(--votes-bar-pinned-height) - 1px)
  );
}

.votes-bar--pinned {
  position: sticky;
  bottom: 0;
  z-index: 5;
  box-sizing: border-box;
  height: var(--votes-bar-pinned-height, 44px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--space-4);
  border-radius: var(--border-radius, 8px) var(--border-radius, 8px) 0 0;
  background-color: var(--color-success-soft);
  text-align: center;
}

/* One line, always: the bar's height is fixed, so a long category name gets
   an ellipsis rather than a second line. The ellipsis needs overflow hidden,
   which is why the name keeps a full line box (a descender in "návrhy" was
   cut off at line-height 1) and stays out of the cap-height trim below. */
.entangle-container__holder .votes-bar--pinned ul { flex-wrap: nowrap; max-width: 100%; }
.entangle-container__holder .votes-bar--pinned .votes-bar__scope { min-width: 0; }

.votes-bar--pinned .votes-bar__label {
  overflow: hidden;
  font-size: var(--font-base);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-success);
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* The invisible resting bar already holds the categories apart; the rest of
   the gap is small so the two do not drift further than they did. */
.vote-category.vote-scope { margin-bottom: 0; }
.vote-category.vote-scope + .vote-category { margin-top: var(--space-2); }
/* Compact by construction — the bar's markup relies on m-0/p-0 utilities
   that only existed in the legacy Bootstrap build; without them the <ul>
   got the UA 16px margins and 40px indent and the <p> its own margins,
   inflating the bar to ~100px. Explicit here, independent of utilities. */
.votes-bar { padding-top: 6px; padding-bottom: 6px; line-height: 1.2; }
.votes-bar ul { margin: 0; padding: 0; list-style: none; display: inline-flex; align-items: center; }
/* line-height 1 on li/p: themes style bare p/li (Bricks: calc(6px + 2ex)) and
   would otherwise reopen the box the number sits low in. */
.votes-bar li { vertical-align: middle; line-height: 1; }
/* As a block the label's li keeps the font's strut, which holds the trimmed
   label 2.5px above the numbers; a flex row centres it like them. The
   holder-scoped selector outranks our own .d-inline-block utility. */
.entangle-container__holder .votes-bar li { display: flex; align-items: center; }
.votes-bar p { margin: 0; display: inline-flex; align-items: center; gap: 4px; line-height: 1; }
/* A ballot split into categories (voting 0.4.0) carries a bar per section.
   In flow that bar IS the section's header: the category name as a heading on
   a line of its own and the votes left underneath, the two together on a tinted
   band — a name squeezed in next to the numbers read as a caption rather than
   as "a new part of the ballot starts here", and a bare heading over a rule
   (the first cut) was still skimmed past between the intro and the cards. The
   band is the green of the positive vote at a tenth and the heading that green
   itself — the ballot's own colour, the same on every site — so the section
   break is a colour change, not one more line. The copy pinned to the bottom
   of the screen (.votes-bar--pinned above) is a one-liner, and the name rides
   along so the numbers say which category they are counting. */
.vote-category { margin-bottom: var(--space-6); }
.vote-category + .vote-category { margin-top: var(--space-8); }

.votes-bar .vote-category__title { margin: 0; }
.entangle-container__holder .votes-bar__scope { margin-right: var(--space-3); }

/* Centred like the ballot-wide bar above it — the section header belongs to the
   whole column, not to its left edge. */
.votes-bar--category { text-align: center; }

.votes-bar--category {
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  border-radius: var(--border-radius, 8px);
  background-color: var(--color-success-soft);
}

.entangle-container__holder .votes-bar--category ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: var(--space-2);
}

.entangle-container__holder .votes-bar--category .votes-bar__scope {
  flex: 1 1 100%;
  justify-content: center;
  margin-right: 0;
}

.votes-bar--category .vote-category__title {
  font-size: var(--font-xl);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-success);
}

/* The votes left in a scope as two chips — the count and the mark it belongs
   to in one pill, so "how many do I still have" is a glance rather than a
   line of text. The pill is white with a hairline (a neutral grey one would
   sink into the tinted band); the colour is carried by the number and the
   mark, which both turn grey once the limit is spent (.positives-exceeded),
   and a half-grey coloured pill would read as a bug. */
.entangle-container__holder .votes-bar ul { column-gap: var(--space-2); }

.votes-bar--category .text-success,
.votes-bar--category .text-danger,
.votes-bar--pinned .text-success,
.votes-bar--pinned .text-danger {
  gap: var(--space-2);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  border-radius: 999px;
  background-color: #fff;
  box-shadow: inset 0 0 0 1px var(--color-neutral-200);
  font-size: var(--font-md);
  font-weight: 700;
  line-height: 1;
}

.votes-bar--pinned .text-success,
.votes-bar--pinned .text-danger {
  font-size: var(--font-base);
}
/* Same optical centring as the submit button: the label and the numbers
   are trimmed to their cap height so they centre on the circles. */
@supports (text-box: trim-both cap alphabetic) {
  .votes-bar li > span:not(.votes-bar__label),
  .votes-bar .text-positive-votes,
  .votes-bar .text-negative-votes { display: inline-block; text-box: trim-both cap alphabetic; }
}

/* Focus reset pro hlasovací odkazy */
.entangle-container a:focus {
  background: transparent !important;
}


/* ============================================================
   12. BOOTSTRAP REPLACEMENT – utility třídy & komponenty
   (nahrazují bootstrap-scoped.css)
   ============================================================ */

/* --- Container (voting page) --- */
.entangle-container__holder .container {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

/* --- Form control --- */
.entangle-container .form-control {
  display: block;
  width: 100%;
  padding: var(--space-2) var(--space-3);
  font-size: inherit;
  line-height: var(--line-height-base);
  color: var(--color-base);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--border-radius);
  background: #fff;
  transition: border-color 0.15s ease;
}
.entangle-container .form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: none;
}

/* --- Spacing utilities --- */
.entangle-container__holder .mb-1 { margin-bottom: 4px; }
.entangle-container__holder .mb-2 { margin-bottom: 8px; }
.entangle-container__holder .mb-3 { margin-bottom: 16px; }
.entangle-container__holder .mb-4 { margin-bottom: 24px; }
.entangle-container__holder .mb-5 { margin-bottom: 48px; }

.entangle-container__holder .mt-1 { margin-top: 4px; }
.entangle-container__holder .mt-2 { margin-top: 8px; }
.entangle-container__holder .mt-3 { margin-top: 16px; }
.entangle-container__holder .mt-5 { margin-top: 48px; }

.entangle-container__holder .my-3 { margin-top: 16px; margin-bottom: 16px; }
.entangle-container__holder .my-5 { margin-top: 48px; margin-bottom: 48px; }

.entangle-container__holder .py-2 { padding-top: 8px; padding-bottom: 8px; }
.entangle-container__holder .m-0  { margin: 0; }
.entangle-container__holder .p-0  { padding: 0; }
.entangle-container__holder .py-5 { padding-top: 48px; padding-bottom: 48px; }
/* …but not the form of a questionnaire: it is the whole of the widget, and the air round a widget is the page's. */
.entangle-container__holder form.py-5 { padding-top: 0; padding-bottom: 0; }

.entangle-container__holder .me-1 { margin-right: 4px; }
.entangle-container__holder .m-auto { margin: auto; }

/* --- Text & background utilities --- */
.entangle-container__holder .text-center { text-align: center; }
.entangle-container__holder .text-success { color: var(--color-success); }
.entangle-container__holder .text-danger  { color: var(--color-danger); }
.entangle-container__holder .bg-success   { background-color: var(--color-success); }
.entangle-container__holder .bg-danger    { background-color: var(--color-danger); }
.entangle-container__holder .fw-bold      { font-weight: 700; }

/* --- Display utilities --- */
.entangle-container__holder .d-inline-block        { display: inline-block; }
.entangle-container__holder .justify-content-center { display: flex; justify-content: center; }

/* --- Alert --- */
.entangle-container__holder .alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--border-radius);
  font-size: var(--font-sm);
  margin-bottom: var(--space-4);
}
.entangle-container__holder .alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.entangle-container__holder .alert-danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* --- Table --- */
.entangle-container .table {
  width: 100%;
  border-collapse: collapse;
}

/* --- Carousel (base structure, no animations) --- */
.entangle-container .carousel {
  position: relative;
  overflow: hidden;
}
.entangle-container .carousel-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.entangle-container .carousel-item {
  display: none;
  position: relative;
  width: 100%;
}
.entangle-container .carousel-item.active {
  display: block;
}

/* --- Tooltip (structure for lightweight replacement) ---
   Tooltip se připojuje přímo do body, mimo .entangle-container__holder,
   proto zde NELZE použít CSS tokeny (--font-sm atd.) – musí být pevné hodnoty. */
.tooltip {
  position: absolute;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}
.tooltip.show {
  opacity: 1;
}
.tooltip-inner {
  background-color: #333;
  color: #fff;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
}
.tooltip-arrow {
  position: absolute;
  width: 0;
  height: 0;
}
.tooltip.bs-tooltip-top {
  padding-bottom: 6px;
}
.tooltip.bs-tooltip-top .tooltip-arrow {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #333;
}
.tooltip.bs-tooltip-bottom {
  padding-top: 6px;
}
.tooltip.bs-tooltip-bottom .tooltip-arrow {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #333;
}

/* ============================================================
   MAPPING – Frontend
   ============================================================ */

.entangle-mapping .entangle-container-uvod {
  margin-bottom: 0;
}

.entangle-mapping .entangle-container-uvod-wrapper {
  border-bottom: 0;
  padding-bottom: var(--space-8);
}

.entangle-mapping .entangle-mapping-toolbar {
  border-top: 1px solid var(--color-neutral-200);
  margin-left: calc(-1 * var(--space-5));
  margin-right: calc(-1 * var(--space-5));
  padding: var(--space-3) var(--space-5);
}

.entangle-mapping .entangle-mapping-toolbar-inner {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
}

.entangle-mapping .entangle-mapping-toolbar-filters {
  margin-left: auto;
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.entangle-mapping .entangle-map-category-filter,
.entangle-mapping .entangle-map-sec-filter {
  width: auto;
  flex: 0 0 auto;
  display: inline-block;
}

.entangle-map-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 0;
  border-radius: var(--border-radius);
  background: transparent;
  cursor: pointer;
  color: var(--color-base);
  padding: 0;
  transition: background 0.15s;
  box-sizing: border-box;
}

.entangle-map-search-toggle:hover {
  background: var(--color-neutral-200);
}

.entangle-map-search-toggle .material-symbols-outlined {
  font-size: 20px;
}

.entangle-map-search-toggle.is-active {
  background: var(--color-neutral-200);
}

.entangle-map-search-wrap {
  position: relative;
  display: none;
}

.entangle-map-search-wrap.is-open {
  display: block;
}

.entangle-mapping .entangle-map-search-filter {
  width: 180px;
  padding-right: 32px;
}

.entangle-map-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #999;
  padding: 2px 4px;
  display: none;
}

.entangle-map-search-clear:hover {
  color: #333;
}

.entangle-map-search-wrap.has-value .entangle-map-search-clear {
  display: block;
}

.entangle-mapping .entangle-map-pin-count {
  opacity: 0.7;
  font-size: var(--font-sm);
}

.entangle-map-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-5);
  font: inherit;
  font-size: var(--font-base, 16px);
  line-height: inherit;
  border: 0;
  border-radius: var(--border-radius);
  background-color: var(--color-primary);
  color: var(--color-contrast, #fff);
  cursor: pointer;
  transition: background-image 0.15s ease, transform 0.05s ease;
}

.entangle-map-add-btn:hover,
.entangle-map-add-btn:focus {
  background-image: linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12));
  outline: none;
}

.entangle-map-add-btn:active {
  transform: translateY(1px);
}

.entangle-map-add-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.entangle-mapping.entangle-container {
  padding: var(--space-8) var(--space-5) 0;
}

.entangle-mapping--no-header.entangle-container {
  padding-top: 0;
}

.entangle-mapping--no-header .entangle-mapping-toolbar {
  border-top: 0;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* ── Area tabs ─────────────────────────────────────── */

.entangle-mapping-areas {
  margin-left: calc(-1 * var(--space-5));
  margin-right: calc(-1 * var(--space-5));
  padding: 0 var(--space-5);
  background: var(--color-neutral-100);
}

.entangle-mapping-areas-inner {
  display: flex;
  gap: 0;
  max-width: 1000px;
  margin: 0 auto;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entangle-area-tab {
  flex: 0 0 auto;
  padding: var(--space-2) var(--space-4);
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: var(--font-sm);
  color: var(--color-base);
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}

.entangle-area-tab:hover {
  color: var(--color-primary);
}

.entangle-area-tab.is-active {
  border-bottom-color: var(--color-primary);
  color: var(--color-primary);
  font-weight: 600;
}

/* Full-width map: break out of parent padding so the map spans full width. */
.entangle-mapping .entangle-mapping-canvas {
  position: relative;
  width: calc(100% + var(--space-5) * 2);
  margin-left: calc(-1 * var(--space-5));
  margin-bottom: 0;
  height: 600px;
  background: var(--color-neutral-100);
  overflow: hidden;
}

.entangle-mapping .entangle-mapping-canvas .projekty-map {
  width: 100%;
  height: 100%;
}

/* Skeleton shimmer for map loading */
.entangle-map-skeleton {
  position: relative;
  overflow: hidden;
  background: #e8e8e8;
}

.entangle-map-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%);
  animation: entangle-shimmer 1.5s infinite;
}

@keyframes entangle-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@media (max-width: 768px) {
  .entangle-mapping .entangle-mapping-toolbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .entangle-mapping .entangle-map-pin-count {
    display: none;
  }

  .entangle-mapping.entangle-container {
    padding: var(--space-6) var(--space-5) 0;
  }

  .entangle-mapping .entangle-container-uvod-wrapper {
    padding-bottom: var(--space-6);
  }

  .entangle-map-modal {
    padding: 0 !important;
  }

  .entangle-map-modal-inner {
    /* 100vh = "large viewport" (bez adres baru) na mobile → inner přeteče visible plochu
       nahoru a dolů (schová se pod URL bar / bottom nav). 100dvh = dynamic viewport,
       respektuje aktuálně zobrazenou UI prohlížeče. Fallback vh pro browsers bez dvh. */
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
  }
  /* iOS safe area — když je modal fullscreen, header/footer musí respektovat
     notch (top) a home indicator (bottom), jinak by tlačítka byla nedostupná. */
  .entangle-map-modal-header {
    padding-top: calc(16px + env(safe-area-inset-top, 0px));
  }
  .entangle-map-modal-footer {
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .entangle-mapping .entangle-mapping-toolbar-filters {
    margin-left: 0;
    flex-direction: column;
  }

  .entangle-mapping .entangle-map-category-filter,
  .entangle-mapping .entangle-map-sec-filter {
    width: 100%;
  }

  .entangle-mapping .entangle-map-search-filter {
    width: 100%;
  }

  .entangle-map-search-toggle {
    display: none;
  }

  .entangle-map-search-wrap {
    display: block !important;
    width: 100%;
  }

  .entangle-mapping .entangle-mapping-canvas {
    height: 480px;
  }
}

/* ── Submit modal ──────────────────────────────────────── */

.entangle-map-modal {
  display: none;
  position: fixed;
  inset: 0;
  /* Explicit height (dvh) — moderní browsers interpretují inset: 0 jako small viewport,
     ale některé starší (Opera Mobile pre-2023, Samsung Internet) používají large viewport
     → modal overflow ven z visible plochy. Explicit height: 100dvh vždy fits visible. */
  height: 100vh;
  height: 100dvh;
  z-index: 2147483647; /* max i32 — above any hub/login overlay */
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  /* Override .entangle-container base styles on overlay */
  max-width: none;
  margin: 0;
  border-radius: 0;
}
.entangle-map-modal.is-open { display: flex; }

/* Autocomplete dropdown must appear above the modal */
.pac-container {
  z-index: 2147483647 !important;
}

.entangle-map-modal-inner {
  background: var(--color-neutral-100);
  border-radius: var(--border-radius);
  max-width: 680px;
  width: 100%;
  /* Fallback + dynamic viewport (mobile: 100vh = large viewport = přeteče visible). */
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.entangle-map-modal-inner > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}

.entangle-map-modal-header {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px var(--space-5);
  border-bottom: 1px solid var(--color-neutral-300);
  background: #fff;
}

.entangle-map-modal-header h3 {
  margin: 0;
  font-size: var(--font-base);
}

.entangle-map-modal-close {
  border: 0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  color: var(--color-base);
}

.entangle-map-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-5) var(--space-5);
}

.entangle-map-modal-footer {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px var(--space-5);
  border-top: 1px solid var(--color-neutral-300);
  background: #fff;
}

.entangle-map-modal-footer .entangle-map-submit-status {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--font-sm);
}

.entangle-map-field {
  margin-bottom: var(--space-5);
}

.entangle-map-field > label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
  font-size: var(--font-base);
}

.entangle-map-field textarea {
  resize: vertical;
}

.entangle-map-submit-picker {
  width: 100%;
  height: 260px;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--border-radius);
  background: var(--color-neutral-100);
}

.entangle-map-submit-coords {
  margin: 6px 0 0;
  font-size: var(--font-xs);
  opacity: 0.7;
}

.entangle-map-hint {
  margin: 4px 0 6px;
  font-size: var(--font-xs);
  opacity: 0.7;
}

/* ── Modal loading & success states ────────────────── */

.entangle-map-modal-loading {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(255,255,255,0.9);
  font-size: var(--font-base);
  color: var(--color-base);
  border-radius: var(--border-radius);
}

.entangle-map-modal-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-neutral-200);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: entangle-spin 0.8s linear infinite;
}

@keyframes entangle-spin {
  to { transform: rotate(360deg); }
}

.entangle-map-modal-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  text-align: center;
  flex: 1 1 auto;
  min-height: 200px;
}

.entangle-map-modal-success-icon .material-symbols-outlined {
  font-size: 64px;
  color: #15803d;
}

.entangle-map-modal-success-message {
  margin-top: var(--space-4);
  font-size: var(--font-base);
  line-height: 1.5;
  color: var(--color-base);
  max-width: 360px;
}

/* ── Image upload ──────────────────────────────────── */

.entangle-map-upload-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.entangle-map-upload-previews:empty {
  margin-bottom: 0;
}

.entangle-map-upload-preview {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.entangle-map-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entangle-map-upload-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.entangle-map-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px dashed var(--color-neutral-300);
  border-radius: var(--border-radius);
  background: transparent;
  cursor: pointer;
  font-size: var(--font-sm);
  color: var(--color-base);
  transition: border-color 0.15s, background 0.15s;
}

.entangle-map-upload-btn:hover {
  border-color: var(--color-primary);
  background: rgba(0,0,0,0.02);
}

.entangle-map-upload-btn .material-symbols-outlined {
  font-size: 20px;
  color: var(--color-primary);
}

.entangle-map-req {
  color: #c0392b;
}

.entangle-map-gdpr {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 400;
}
.entangle-map-gdpr input {
  margin-top: 4px;
}

.entangle-map-honeypot {
  position: absolute;
  left: -9999px;
}

/* ============================================================
   ODBĚR NOVINEK — the block [entangle_subscribe] (Subscribe\Form)
   ============================================================
   A panel the whole width of what it stands in (the owner, 18. 11.: it was a 640px box in the middle of the page,
   its words centred, its field and button drawn by a sheet of its own): on its start side WHAT is offered, set as a
   heading of the page with a sentence under it; on its end side the form — a label, the field and the button in
   one row, the consent under them. The field and the button are the ones of every form of this sheet
   (`.entangle-container input[type="email"]`, `.send-form`); here they only take one height. In a narrow window
   the two sides stand under each other. The ground is the widgets' surface, so a theme that names its own
   (--entangle-surface) gets its own. */
.entangle-container.entangle-subscribe {
  max-width: none;
}

.entangle-subscribe__box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5) var(--space-8);
  padding: clamp(24px, 4vw, 56px);
  border-radius: var(--border-radius);
  background: var(--ent-surface);
  text-align: start;
}

@media (min-width: 56em) {
  .entangle-subscribe__box {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
  }
}

.entangle-container .entangle-subscribe__heading {
  margin: 0;
  font-size: calc(var(--entangle-em) * 1.75);
  line-height: 1.2;
  text-wrap: balance;
}

.entangle-container .entangle-subscribe__subheading {
  max-width: 34em;
  margin: var(--space-3) 0 0;
  color: var(--ent-muted);
  line-height: 1.55;
  text-wrap: pretty;
}

/* The label of the one field is not seen — the field says the same inside itself (below) — but it is there for a
   screen reader. */
.entangle-subscribe__label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.entangle-subscribe__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.entangle-container .entangle-subscribe__email {
  flex: 1 1 14em;
  width: auto;
  min-width: 0;
  min-height: 48px;
}

/* The hint in the field: the quiet colour of this sheet at its full strength (a browser's own is too faint to read). */
.entangle-container .entangle-subscribe__email::placeholder {
  color: var(--ent-muted);
  opacity: 1;
}

.entangle-container .entangle-subscribe__submit {
  flex: 0 0 auto;
  min-height: 48px;
  /* A <button> does not take the face of the page by itself. */
  font-family: inherit;
  font-weight: 600;
  white-space: nowrap;
}

/* On a phone the button is the width of the field above it. */
@media (max-width: 30em) {
  .entangle-container .entangle-subscribe__submit {
    flex: 1 1 100%;
  }
}

.entangle-subscribe__submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* The consent: a tick box of this sheet's kind (18px, the strong line, the colour of action when ticked) and its
   words beside it, small and quiet — a condition of the form, not a second message. */
.entangle-subscribe__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: var(--space-3) 0 0;
  color: var(--ent-muted);
  font-size: var(--font-sm);
  line-height: 1.45;
  cursor: pointer;
}

.entangle-container .entangle-subscribe__consent input[type="checkbox"] {
  position: relative;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0.1em 0 0;
  border: 1px solid var(--ent-line-strong);
  border-radius: 4px;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.entangle-container .entangle-subscribe__consent input[type="checkbox"]:checked {
  border-color: var(--color-primary);
  background: var(--color-primary);
}

.entangle-container .entangle-subscribe__consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2l2.4 2.4 4.6-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.entangle-container .entangle-subscribe__consent input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.entangle-subscribe__consent a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entangle-subscribe__hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.entangle-subscribe__message {
  margin-top: var(--space-3);
  font-size: var(--font-sm);
  font-weight: 600;
}

.entangle-subscribe__message.is-error {
  color: #b91c1c;
}

.entangle-subscribe__message.is-success {
  color: #047857;
}
