/*
 * public-portal.css
 * Components for the redesigned public patient flow. Load AFTER public-tokens.css,
 * both from <head>. Every rule is scoped under `.pf`.
 *
 * Two constraints shape this file:
 *
 * 1. Two of the three chrome variants still extend templates/base.html, which loads
 *    Bootstrap 3. `{% block extra_css %}` sits after those <link>s, so equal
 *    specificity wins -- but only if component selectors stay at ONE class. Bootstrap
 *    sets body font, `a` colour, `label` weight and heading sizes globally, so
 *    anything it would otherwise win is restated here rather than assumed.
 * 2. Mobile-first, two breakpoints: 640px and 1024px. NOT Bootstrap's 767/991, and
 *    no hidden-xs/visible-xs in new markup -- those helpers do not exist on the
 *    standalone shell. Most grids need no breakpoint at all because the design
 *    specifies auto-fit minmax().
 *
 * Interactive borders use --pf-line-strong (3:1+), decorative rules use --pf-line.
 * See the token file for why those are two tokens.
 */

/* ---------- Shell ---------- */

.pf-shell {
    max-width: var(--pf-shell);
    margin: 0 auto;
    background: var(--pf-card);
    border: 1px solid var(--pf-card-line);
    border-radius: var(--pf-radius);
    overflow: hidden;
    box-shadow: var(--pf-shadow);
}

.pf-body {
    margin: 0;
    /* Unconditional, as in the mockup: ~11px of ground around the card at 375px. */
    padding: clamp(0px, 3vw, 40px);
    background: var(--pf-ground);
}

/* ---------- Header ---------- */

.pf-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 2px solid var(--pf-line);
    background: var(--pf-card);
}

.pf-header__identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

/* The logo's home link. It wraps only the logo/initial box, so it must not pick up the header's
   own spacing or the underline `.pf a:hover` adds -- there is no text here to underline, and a rule
   under a 44px image reads as a rendering fault. `flex: none` keeps it from being squeezed when the
   organisation name is long. */
.pf-header__home {
    display: inline-flex;
    align-items: center;
    flex: none;
    border-radius: var(--pf-radius-s);
}

.pf-header__logo {
    max-height: 44px;
    max-width: 180px;
    width: auto;
    object-fit: contain;
    flex: none;
}

/* 2 of 2 359 providers have a logo, so this initial box is the DEFAULT state of the
   header, not a fallback for an edge case. Sized to match the logo slot. */
.pf-header__mark {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: var(--pf-radius-s);
    background: var(--pf-p100);
    color: var(--pf-p700);
    display: grid;
    place-items: center;
    font: 800 18px/1 var(--pf-font);
}

.pf-header__name {
    font: 800 17px/1.2 var(--pf-font);
    letter-spacing: -0.02em;
    margin: 0;
    min-width: 0;
}

/* `flex-wrap: wrap` is KEPT deliberately. With the short SLO/ENG option labels and the 10px pill
   padding below, the two nav pills and the language box fit one row from ~360px up, which is what
   the mobile artboard draws. Below that they wrap rather than overflow -- and wrapping is the
   right failure here, because `.pf-shell` has `overflow: hidden`, so `nowrap` would CLIP the
   language control off the side of the page with no way to reach it. */
.pf-header__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pf-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    /* `1 1 auto` with `min-width: 0`: the pills grow into spare room but may also SHRINK, so the
       nav no longer claims a whole row and push the language box off it. */
    flex: 1 1 auto;
    min-width: 0;
}

.pf-nav__link {
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--pf-tap);
    /* 10px, not the desktop 16px, and it is what buys the mobile header its single row.
       Measured against this sheet's padding chain at a 390px viewport: the header's content box is
       ~332px, and the two pills plus the language box came to ~339px with 16px pillpadding -- so
       the language box wrapped to a third row. 10px each side frees ~24px. The 640px block puts
       16px back. Only horizontal padding shrinks; `min-height` stays 48px, so the tap target is
       untouched (WCAG 2.5.8 asks 24x24). */
    padding: 0 10px;
    border-radius: var(--pf-radius-s);
    /* --pf-line-strong: the mobile nav pill is a control, so 1.4.11 applies to its border. */
    border: 2px solid var(--pf-line-strong);
    background: var(--pf-card);
    color: var(--pf-ink);
    font: 600 17px/1.2 var(--pf-font);
    text-align: center;
}

.pf-nav__link:hover {
    text-decoration: underline;
}

.pf-nav__link.is-current {
    background: var(--pf-p50);
    border-color: var(--pf-p700);
    color: var(--pf-p700);
    font-weight: 700;
}

@media (min-width: 640px) {
    .pf-header {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 14px clamp(16px, 4vw, 44px);
    }

    .pf-header__name {
        font-size: clamp(18px, 2.4vw, 21px);
    }

    .pf-header__tools {
        margin-left: auto;
    }

    .pf-nav__link {
        flex: none;
        /* Back to the desktop artboard's 16px; the 10px in the base rule is the mobile
           single-row budget and has no reason to apply once there is room. */
        padding: 0 16px;
        /* The mockup's desktop nav is plain padded anchors -- the bordered pill shape
           is the mobile treatment only. */
        border-color: transparent;
        background: transparent;
    }
}

/* ---------- Language selector ----------
 * The two artboards differ MORE here than anywhere else in the header, and the base
 * rules below are the MOBILE control (icon only, tight): gap 6, padding 0 8px, a 20px
 * globe, a 44px 16px select, radius 10. The 640px block swaps in the desktop control:
 * a wider pill, the word "Jezik", a 22px globe and a 40px 18px select. Running the
 * mobile metrics at desktop width is what made the bordered box read as too small for
 * the control inside it.
 *
 * The BORDER is on .pf-lang__box (the <label>), not on .pf-lang (the <form>). See the
 * comment in _lang_select.html: as a label the whole pill is the select's click target,
 * which is what both artboards draw and what a 2px box around a control implies.
 */

.pf-lang {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    /* Never the control that gives way when the header row is tight: it is the smallest of the
       three, and shrinking a <select> makes its label unreadable before it makes the row fit.
       `.pf-nav` carries `min-width: 0` and absorbs the squeeze instead. */
    flex: none;
}

.pf-lang__box {
    display: inline-flex;
    align-items: center;
    gap: 6px;                     /* mobile artboard line 312: gap:6px */
    padding: 0 8px;               /* mobile artboard: padding:0 8px */
    min-height: var(--pf-tap);    /* both artboards: min-height:48px */
    /* --pf-line-strong, NOT --pf-line. This border is the only thing that marks the
       control's bounds, so WCAG 1.4.11 asks for 3:1 and #cfd9d8 is 1.44:1. The weight
       stays the artboards' 2px; only the colour darkens (#6f8382, 4.00:1 on white). */
    border: 2px solid var(--pf-line-strong);
    border-radius: 10px;          /* mobile artboard: border-radius:10px */
    background: var(--pf-card);
    margin: 0;
    cursor: pointer;
}

.pf-lang__box:hover {
    border-color: var(--pf-p700);
}

/* The ring goes on the BOX. The select carries no border of its own, so
   :focus-visible on the select drew a small rectangle inside the pill -- a focus
   indicator has to surround the control a keyboard user can see, and that is the pill. */
.pf-lang__box:focus-within {
    outline: 3px solid var(--pf-p700);
    outline-offset: 3px;
}

.pf-lang__globe {
    flex: none;                   /* both artboards: style="flex:none" */
    width: 20px;
    height: 20px;
    color: var(--pf-p700);
}

.pf-lang__select {
    min-height: 44px;             /* mobile artboard: min-height:44px */
    border: 0;                    /* both artboards: border:none */
    background: transparent;
    color: var(--pf-p700);
    font: 700 16px/1.2 var(--pf-font);
    cursor: pointer;
}

/* Suppressed because .pf-lang__box:focus-within already draws the ring around the whole
   control. Without this the two indicators nest -- and they DID: written as
   `.pf-lang__select:focus-visible` this was (0,2,0) against the token file's
   `.pf select:focus-visible` at (0,2,1), so the primitive won on specificity whatever the load
   order, and the select kept its own 3px ring inset well inside the pill (it has no border, sits
   at 44px inside a 48px box, and is pushed right by the globe and the label). Including the type
   selector makes this (0,3,1). */
.pf select.pf-lang__select:focus-visible {
    outline: none;
}

/* Text label on desktop, icon-only on mobile -- the two artboards differ here. The
   select keeps an aria-label so hiding this does not leave it unnamed on a phone. */
.pf-lang__label {
    display: none;
    font-size: 17px;              /* desktop artboard line 313: font-size:17px */
    font-weight: 600;             /* desktop artboard: font-weight:600 */
    margin: 0;
}

@media (min-width: 640px) {
    .pf-lang__box {
        gap: 10px;                        /* desktop artboard: gap:10px */
        padding: 6px 14px 6px 12px;       /* desktop artboard: same */
        border-radius: var(--pf-radius-s);/* desktop artboard: border-radius:12px */
    }

    .pf-lang__globe {
        width: 22px;                      /* desktop artboard: 22x22 */
        height: 22px;
    }

    .pf-lang__label {
        display: inline;
    }

    .pf-lang__select {
        min-height: 40px;                 /* desktop artboard: min-height:40px */
        padding: 6px 8px;                 /* desktop artboard: padding:6px 8px */
        font: 700 18px/1.2 var(--pf-font);/* desktop artboard: font:700 18px */
    }
}

/* Hidden by public-portal.js once auto-submit is wired. Do NOT display:none it in CSS --
   a visitor without JS needs it. */
.pf-lang__go {
    min-height: 40px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--pf-radius-s);
    background: var(--pf-p50);
    color: var(--pf-p700);
    font: 700 15px/1.2 var(--pf-font);
    cursor: pointer;
}

/* ---------- Back link ---------- */

/* `.pf-crumbs` lived here. The breadcrumb is gone from all three chromes, along with the
   `back_link` block and every fill of it -- see the note in booking/public/base.html.
   `.pf-back` below is a DIFFERENT control and stays: it is the clinic page's own
   "Nazaj na vse ambulante" link in public/_clinic_identity.html. */

.pf-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: var(--pf-tap);
    font: 700 18px/1.2 var(--pf-font);
}

/* ---------- Messages ----------
 * There is no thank-you page in this flow: an order's success flash IS the
 * confirmation, rendered on the clinic page the patient is redirected to. So this
 * region has to be prominent and above the fold -- not a quiet strip. */

/* `:not(:empty)` CANNOT gate this, so the wrapper is gated in the template instead.
   A rendered Django include leaves whitespace text nodes behind -- measured on a page with no
   flash message, the element's innerHTML is "\A  \A \A \A \A " -- and `:empty` does not match an
   element containing whitespace. So `:not(:empty)` was always true and every page in the flow
   carried 16px of padding above a band with nothing in it. booking/public/base.html now renders
   the wrapper only when there is something to put in it, which also keeps an empty
   `id="messages"` container out of the DOM, where the pre-redesign chrome's selectors look. */
.pf-messages {
    padding: 16px clamp(16px, 4vw, 44px) 0;
}

.pf-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    margin: 0 0 12px;
    border: 2px solid var(--pf-line);
    border-radius: var(--pf-radius-m);
    background: var(--pf-card);
    font-size: 17px;
    line-height: 1.55;
}

.pf-alert--success {
    border-color: var(--pf-p700);
    background: var(--pf-p50);
}

/* The BASE alert is white on white -- `background: var(--pf-card)` is the shell's own colour --
   with only a 1.44:1 outline to find it by, and `messages.info(...)` reaches it in production (the
   referral-company route and the existing-patients-only notice both use it). Tinted as its own
   modifier rather than by retinting the base: the base is also where an untagged and a
   `debug`-tagged message land, and giving those a wash would make a neutral notice read as a
   success. Matches `.pf-notice`, which carries the same shape of information. */
.pf-alert--info {
    border-color: var(--pf-p200);
    background: var(--pf-p50);
}

.pf-alert--error {
    border-color: #a3242b;
    background: #fdf1f0;
}

.pf-alert--warning {
    border-color: #8a5a00;
    background: #fff8e6;
}

.pf-alert__close {
    margin-left: auto;
    flex: none;
    min-width: var(--pf-tap);
    min-height: var(--pf-tap);
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

/* ---------- Sections ---------- */

.pf-section {
    padding: clamp(22px, 3.4vw, 32px) clamp(16px, 4vw, 44px);
}

.pf-section--tint {
    background: var(--pf-p50);
    border-bottom: 1px solid var(--pf-line);
}

.pf-section__head {
    font-size: clamp(24px, 3.6vw, 30px);
    font-weight: 800;
}

.pf-section__intro {
    margin: 10px 0 0;
    font-size: 19px;
    line-height: 1.55;
    color: var(--pf-ink2);
    /* The mockup's measure. It keeps the directory's two-sentence intros readable rather than
       letting them run the full 1180px of the shell. */
    max-width: 52ch;
}

/* The one intro that opts OUT of the measure. "Izberite storitev. Vse lahko uredite od doma, brez
   klica v ambulanto." is 68 characters, so a 52ch cap folded it onto a second line with most of the
   row empty beside it. Uncapped it sets on one line wherever there is room and wraps on its own on a
   phone, where the column width is the only constraint that matters.

   A modifier rather than dropping `max-width` from the shared rule: the other three intros keep the
   measure the mockup gives them. (0,1,0) each, so this has to come AFTER the base rule to win --
   it does, immediately. */
.pf-section__intro--full {
    max-width: none;
}

.pf-subhead {
    margin: 26px 0 12px;
    font-size: 20px;
    font-weight: 700;
}

/* ---------- Hero ---------- */

.pf-hero {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* The column flex lives HERE, not only in the 640px block, and that is what makes
   `.pf-hero__cta { align-self: stretch }` below do anything. `align-self` is a flex/grid ITEM
   property: with no flex container it is inert, so the mobile artboard's edge-to-edge primary CTA
   rendered ~239px wide in a 333px column at 390px -- correct height, visibly wrong width, and
   disagreeing with `.pf-promo__cta` on the same screen, which is full-width because `.pf-promo`
   really is a column flex container at mobile. The 640px block keeps only the row-layout terms. */
.pf-hero__main {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pf-hero__title {
    font-size: clamp(28px, 4.4vw, 38px);
    font-weight: 800;
    margin: 0;
}

.pf-hero__tagline {
    margin: 0;
    font-size: clamp(18px, 2.4vw, 21px);
    line-height: 1.5;
    color: var(--pf-ink2);
    max-width: 34ch;
}

.pf-hero__cta {
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 0 30px;
    border-radius: var(--pf-radius-s);
    background: var(--pf-p700);
    color: var(--pf-onp);
    font: 700 20px/1.2 var(--pf-font);
}

.pf-hero__cta:hover {
    text-decoration: underline;
}

.pf-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pf-meta__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 18px;
    color: var(--pf-ink);
}

a.pf-meta__item {
    min-height: var(--pf-tap);
    align-items: center;
    font-weight: 700;
}

.pf-icon {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 3px;
}

a.pf-meta__item .pf-icon {
    margin-top: 0;
}

@media (min-width: 640px) {
    .pf-hero {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: clamp(18px, 3vw, 40px);
    }

    .pf-hero__main {
        flex: 1 1 380px;
        min-width: 0;
    }

    .pf-hero__cta {
        align-self: flex-start;
        min-height: 56px;
    }

    .pf-meta {
        flex: 0 1 320px;
    }
}

/* ---------- Location picker ---------- */

.pf-locgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.pf-loccard {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    min-height: 76px;
    /* --pf-line-strong: the whole card is one <a>; its border is its only bounds. */
    border: 2px solid var(--pf-line-strong);
    border-radius: 14px;
    background: var(--pf-card);
    color: inherit;
    transition: box-shadow 0.18s, border-color 0.18s;
}

.pf-loccard:hover {
    border-color: var(--pf-p500);
    box-shadow: var(--pf-shadow-hover);
    text-decoration: none;
    color: inherit;
}

.pf-loccard.is-active {
    border-color: var(--pf-p700);
    background: var(--pf-p50);
}

/* A location with no bookable clinics is still listed -- it has contact data the
   #kontakt block shows -- but it is not a filter you can apply.
   `pointer-events: none` only stops a MOUSE. The card is an <a href>, so a keyboard user still
   tabbed to it and Enter still followed the link, and public-portal.js's click handler bails on
   `is-empty` -- so the two input methods behaved differently and the keyboard one reached a
   filtered-empty page. The template marks the same card `aria-disabled="true"` and drops it from
   the tab order; this is the visual half. */
.pf-loccard.is-empty {
    opacity: 0.7;
    pointer-events: none;
}

.pf-loccard__check {
    width: 26px;
    flex: none;
    display: grid;
    place-items: center;
    font: 800 20px/1 var(--pf-font);
    color: var(--pf-p700);
}

.pf-loccard__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-loccard__name {
    font-size: 19px;
    font-weight: 700;
}

.pf-loccard__meta {
    font-size: 17px;
    color: var(--pf-ink2);
}

/* The mockup splits address and clinic count onto two lines on mobile and joins them
   with a middot on desktop. One wrapper plus a generated separator gives both without
   the template emitting different markup per breakpoint.
   The escape is \B7 (two hex digits + a terminating space), not the zero-padded form,
   which needs six digits and rendered as literal text. */
.pf-loccard__metas {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

@media (min-width: 640px) {
    .pf-loccard__metas {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
    }

    .pf-loccard__meta + .pf-loccard__meta::before {
        /* Each escape is terminated by the next backslash, so all three characters
           survive. A trailing space would be eaten as the escape's terminator --
           which is what left "2 ·Ambulante" with no space after the middot. */
        content: "\A0\B7\A0";
    }
}

.pf-activeloc {
    margin: 20px 0 0;
    font-size: 18px;
    color: var(--pf-ink2);
}

.pf-activeloc strong {
    color: var(--pf-ink);
}

/* ---------- Clinic cards ---------- */

.pf-grouphead {
    font-size: clamp(20px, 3vw, 24px);
    font-weight: 800;
    padding-bottom: 12px;
    margin: 30px 0 16px;
    border-bottom: 2px solid var(--pf-line);
}

.pf-clinicgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
}

.pf-cliniccard {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    min-height: 150px;
    /* --pf-line-strong: the whole card is one <a>; its border is its only bounds. */
    border: 2px solid var(--pf-line-strong);
    border-radius: var(--pf-radius-m);
    background: var(--pf-card);
    color: inherit;
    transition: box-shadow 0.18s, border-color 0.18s;
}

.pf-cliniccard:hover {
    border-color: var(--pf-p500);
    box-shadow: var(--pf-shadow-hover);
    text-decoration: none;
    color: inherit;
}

.pf-cliniccard__badge {
    width: 50px;
    height: 50px;
    flex: none;
    border-radius: 14px;
    background: var(--pf-p50);
    color: var(--pf-p700);
    display: grid;
    place-items: center;
    font: 800 20px/1 var(--pf-font);
}

.pf-cliniccard__name {
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.pf-cliniccard__doctor {
    font-size: 17px;
    color: var(--pf-ink2);
}

.pf-cliniccard__cta {
    margin-top: auto;
    padding-top: 8px;
    font-size: 18px;
    font-weight: 700;
    color: var(--pf-p700);
}

/* ---------- Gospodar zdravja promo band ---------- */

.pf-promo {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
    padding: 20px 22px;
    border: 2px solid var(--pf-p200);
    border-radius: var(--pf-radius-m);
    background: var(--pf-p50);
}

.pf-promo__logo {
    height: 28px;
    width: auto;
    display: block;
}

/* Below 640px this had no rule at all, so the title and the body copy -- two inline-level spans
   in a column flex container -- ran together as one line of text. The 640px block sets this up
   for desktop; the base case needs it too. */
.pf-promo__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.pf-promo__title {
    font-size: 19px;
    font-weight: 700;
}

.pf-promo__text {
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
    color: var(--pf-ink2);
}

.pf-promo__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 28px;
    border-radius: var(--pf-radius-s);
    background: var(--pf-p700);
    color: var(--pf-onp);
    font: 700 19px/1.2 var(--pf-font);
}

.pf-promo__cta:hover {
    text-decoration: underline;
}

@media (min-width: 640px) {
    .pf-promo {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        flex-wrap: wrap;
    }

    .pf-promo__body {
        flex: 1 1 320px;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
}

/* ---------- Buttons ---------- */

.pf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 22px;
    border: 2px solid transparent;
    border-radius: var(--pf-radius-s);
    font: 700 18px/1.2 var(--pf-font);
    text-align: center;
    cursor: pointer;
}

.pf-btn--primary {
    background: var(--pf-p700);
    color: var(--pf-onp);
}

.pf-btn--primary:hover {
    text-decoration: underline;
}

.pf-btn--ghost {
    border-color: var(--pf-p700);
    background: var(--pf-card);
    color: var(--pf-p700);
}

.pf-btn--ghost:hover {
    text-decoration: underline;
}

.pf-btn--muted {
    border-color: var(--pf-line-strong);
    background: var(--pf-card);
    color: var(--pf-ink);
}

.pf-btn--muted:hover {
    text-decoration: underline;
}

/* ---------- Contact block ---------- */

.pf-contact {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 18px;
    border: 2px solid var(--pf-line);
    border-radius: 18px;
    overflow: hidden;
}

.pf-contact__body {
    padding: clamp(20px, 3vw, 30px);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pf-contact__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pf-contact__group + .pf-contact__group {
    padding-top: 18px;
    border-top: 2px solid var(--pf-line);
}

.pf-contact__desc {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: var(--pf-ink2);
}

.pf-loclist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 18px;
    line-height: 1.55;
    color: var(--pf-ink2);
}

.pf-loclist strong {
    color: var(--pf-ink);
    font-weight: 700;
}

/* ONE COLUMN, ALWAYS. "Pokličite: …" and "Pišite nam" never share a row, at any width.

   This was `repeat(auto-fit, minmax(200px, 1fr))`, which stacked them only when the column got
   narrow and otherwise sat them side by side. Single-column is the simpler answer and it keeps the
   earlier requirement for free: two 1fr rows in one column are the SAME width by construction,
   which is what a wrapping flex row could not give (as flex items they were sized by their own
   content, and "Pokličite: 01 123 45 67" is roughly twice the width of "Pišite nam").

   Dropping the 200px track floor also removes this container from the `.pf-shell { overflow:
   hidden }` clipping question entirely -- a 1fr track cannot exceed its container, so there is
   nothing to clip at 320px or below. */
.pf-contact__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: stretch;
}

@media (min-width: 1024px) {
    .pf-contact {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* ---------- Map panel ---------- */

/* THE UNLOADED MAP, drawn to the supplied design: a pale grid over near-white, two soft teal discs,
   and a wide diagonal band running lower-left to upper-right -- a stylised map rather than the bare
   graph paper the artboards used. It is also what the panel looks like with no address and no API
   key configured, so it has to read as deliberate in that state too.

   LAYER ORDER IS THE POINT. In `background` the FIRST layer paints on top, and the design shows the
   grid lines crossing both discs and the band, so the two grid gradients come first and the base
   colour last. The band is semi-transparent, so where it crosses a disc the two tints add and the
   overlap lightens -- which is what the design shows, and why it is a band over discs rather than a
   flat shape knocked out of them.

   All four tints are `color-mix` off --pf-p500, so the SoaPrevent theme scope re-tints the whole
   illustration with the rest of the palette and no literal has to be forked.

   Percentages, not pixels, for the discs and the band: this panel is a grid cell whose aspect ratio
   swings from a 190px-tall strip on a phone to a 320px-tall column at desktop, and the design shows
   the band steeper in the tall crop than in the wide one. Percentage stops reproduce that for free.
   The grid stays at a fixed 26px pitch, as the artboards have it. */
.pf-map {
    position: relative;
    min-height: 240px;
    border-top: 2px solid var(--pf-line);
    background:
        /* grid, on top of everything */
        linear-gradient(0deg, color-mix(in srgb, var(--pf-p500) 13%, transparent) 1px, transparent 1px) 0 0 / 100% 38px,
        linear-gradient(90deg, color-mix(in srgb, var(--pf-p500) 13%, transparent) 1px, transparent 1px) 0 0 / 38px 100%,
        /* THE BAND RUNS BOTTOM-LEFT TO TOP-RIGHT -- a "/", as in the design.
           A CSS gradient angle is measured CLOCKWISE FROM "TO TOP" and names the AXIS along which
           the colour changes; the bands of constant colour lie PERPENDICULAR to that axis. Work it
           through and the whole thing collapses to one rule:

               stripe angle above the horizontal  =  -A  (mod 180)

           so a positive-slope "/" needs A between 90 and 180, and the intuitive-looking `58deg`
           draws its stripe at -58 degrees -- a steep "\", the opposite diagonal. That was the bug.
           The design's stripe sits about 61 degrees above the horizontal, so A = -61 mod 180 = 119.
           Sanity check against the value everyone knows: a 45-degree "/" is 135deg. */
        linear-gradient(119deg,
            transparent 41%,
            color-mix(in srgb, var(--pf-p500) 8%, transparent) 43%,
            color-mix(in srgb, var(--pf-p500) 8%, transparent) 51%,
            transparent 53%),
        /* Two soft ELLIPSES, anchored past the top-right and bottom-left corners so each bleeds off
           the panel rather than sitting inside it as a disc. The long feather (62% to 100%) is what
           keeps the edge from reading as a drawn circle. */
        radial-gradient(ellipse 48% 46% at 86% 6%,
            color-mix(in srgb, var(--pf-p500) 10%, transparent) 0 62%,
            transparent 100%),
        radial-gradient(ellipse 44% 40% at 4% 94%,
            color-mix(in srgb, var(--pf-p500) 10%, transparent) 0 62%,
            transparent 100%),
        /* Near-white, not --pf-p50. The design's ground is barely tinted; p50 (#f0f8f8) is a
           visible pale teal and flattened the contrast between the ground and the shapes on it. */
        color-mix(in srgb, var(--pf-p500) 3%, #ffffff);
    display: flex;
    flex-direction: column;
}

.pf-map__frame {
    flex: 1 1 auto;
    min-height: 240px;
    border: 0;
    width: 100%;
    display: block;
}

/* The click-to-load placeholder: pin, button, caption, centred on the illustration above. */
.pf-map__consent {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    /* Symmetric. This carried 80px of bottom padding to clear `.pf-map__nav`, the absolutely
       positioned "Odprite navigacijo" button in the corner; that button was removed, so the
       stack centres in the panel as the design draws it. */
    padding: 24px;
}

/* Decorative, and sized down from the 24px _icon.html default: in the design it is a quiet marker
   above the button, not a second focal point beside it. */
.pf-map__pin {
    width: 22px;
    height: 22px;
    flex: none;
    color: var(--pf-ink2);
}

/* Below the button, and smaller than body copy -- it is a caption naming the third party, which is
   what makes pressing the button an informed choice. --pf-ink2 is 8.99:1 on white and 8.39:1 on
   --pf-p50, so it clears AA at this size with room to spare. */
.pf-map__note {
    margin: 0;
    max-width: 40ch;
    font-size: 15px;
    line-height: 1.5;
    color: var(--pf-ink2);
}


@media (min-width: 1024px) {
    .pf-map {
        border-top: 0;
        border-left: 2px solid var(--pf-line);
        min-height: 320px;
    }
}

/* ---------- 112 ---------- */

.pf-sos {
    display: inline-flex;
    align-items: center;
    /* Centred, not leading. `.pf-sos` is blockified to `display: flex` by its column-flex parent
       (.pf-duo__group / .pf-contact__group), so it stretches the full column width while its one
       line of text is much narrower -- which left the sentence hugging the left edge of a
       full-width red box. `text-align` as well as `justify-content`, so the second line is centred
       too when the sentence wraps on a phone. */
    justify-content: center;
    text-align: center;
    gap: 10px;
    min-height: var(--pf-tap);
    padding: 8px 14px;
    border: 2px solid #a3242b;
    border-radius: var(--pf-radius-s);
    background: var(--pf-card);
    color: #a3242b;
    font: 700 17px/1.3 var(--pf-font);
}

.pf-sos:hover {
    color: #a3242b;
    background: #fdf1f0;
    text-decoration: none;
}

/* ---------- Footer ---------- */

.pf-footer {
    background: var(--pf-p900);
    color: #fff;
    padding: 24px clamp(16px, 4vw, 44px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* `:hover` and `:focus` are not optional companions here. `.pf a:hover` in the token file is
   (0,2,1) and this rule is (0,1,1), so without them every link in the p900 footer turned
   --pf-p600 on hover: 1.85:1, i.e. near-invisible against the band. The artboards do not hit this
   because their footer links carry an inline `color:#fff`, which no selector can beat.

   Declared ONCE. There was an identical second copy 600 lines further down, in the
   anchor-override block -- so a reader fixing one of them would have left the other standing. */
.pf-footer a,
.pf-footer a:hover,
.pf-footer a:focus {
    color: #fff;
}

.pf-footer__brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.pf-footer__mark {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: var(--pf-radius-s);
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
    font: 800 16px/1 var(--pf-font);
    color: #fff;
}

.pf-footer__name {
    font: 800 19px/1.2 var(--pf-font);
}

.pf-footer__nav {
    display: flex;
    flex-direction: column;
}

.pf-footer__nav a {
    display: inline-flex;
    align-items: center;
    min-height: var(--pf-tap);
    font-size: 17px;
}

/* The "Želim brezplačno urejati podatke izvajalca" link. It had no class at all, so it inherited
   nothing but a colour: a ~29px inline target in a column where every sibling is 48px, and the
   acquisition funnel for the ~2 357 providers nobody manages. */
.pf-footer__cta {
    display: inline-flex;
    align-items: center;
    min-height: var(--pf-tap);
    font-size: 17px;
}

.pf-footer__powered {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 17px;
    color: rgba(255, 255, 255, 0.92);
}

/* The organisation's own logo. Was sharing .pf-footer__gz with the Gospodar zdravja
   pill below, which gave it that pill's flex box and padding and forced an inline
   style in the template to undo them. */
.pf-footer__logo {
    height: 34px;
    width: auto;
    display: block;
    padding: 4px 8px;
    border-radius: 8px;
    background: #fff;
    flex: none;
}

.pf-footer__gz {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    background: #fff;
}

/* The PILL is the link, not a box around it. With the padding on the wrapping <span>
   the <a> was only as tall as the 22px logo inside it -- under WCAG 2.5.8's 24px
   minimum, and unlike the "Omogoča Gospodar zdravja" text link beside it this one has
   no inline-in-a-sentence exemption to fall back on. Padding moved onto the anchor, so
   the whole white area is the target. */
.pf-footer__gz a {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    min-height: 34px;
}

.pf-footer__gz img {
    height: 22px;
    width: auto;
    display: block;
}

@media (min-width: 640px) {
    .pf-footer__nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px 8px;
        margin-left: auto;
    }

    .pf-footer__powered span:first-child {
        margin-left: auto;
    }
}

/* ---------- Clinic identity band ---------- */

.pf-clinicid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pf-clinicid__badge {
    width: 56px;
    height: 56px;
    flex: none;
    border-radius: 15px;
    background: var(--pf-card);
    border: 2px solid var(--pf-p200);
    color: var(--pf-p700);
    display: grid;
    place-items: center;
    font: 800 23px/1 var(--pf-font);
}

.pf-clinicid__name {
    font-size: clamp(26px, 4.2vw, 34px);
    font-weight: 800;
    margin: 0;
}

.pf-clinicid__line {
    margin: 0;
    font-size: 18px;
    line-height: 1.5;
    color: var(--pf-ink2);
}

@media (min-width: 640px) {
    .pf-clinicid {
        flex-direction: row;
        align-items: flex-start;
        gap: 18px;
        flex-wrap: wrap;
    }

    .pf-clinicid__badge {
        width: 62px;
        height: 62px;
        font-size: 26px;
    }

    .pf-clinicid__body {
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-width: 0;
    }
}

/* ---------- Clinic notice ---------- */

.pf-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px 22px;
    border: 2px solid var(--pf-p200);
    border-radius: var(--pf-radius-m);
    background: var(--pf-p50);
}

.pf-notice__icon {
    flex: none;
    width: 24px;
    height: 24px;
    margin-top: 3px;
}

.pf-notice__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.pf-notice__title {
    font-size: 20px;
    font-weight: 800;
}

/* Provider-authored HTML lands here via |safe. Keep the reset narrow. */
.pf-notice__body p {
    margin: 0 0 0.5em;
}

.pf-notice__body p:last-child {
    margin-bottom: 0;
}

/* ---------- Service cards ---------- */

.pf-svcgrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 14px;
}

@media (max-width: 400px) {
    /* minmax()'s 330px floor overflows a 375px viewport once padding is counted.
       The 320px floors on .pf-clinicgrid and .pf-providerlist overflow for the same reason, ~15px
       further down, and they need the same collapse: .pf-shell has `overflow: hidden` for its
       radius, so the overhang is CLIPPED rather than scrolled -- there is no horizontal scrollbar
       to reach it with. Measured against this sheet's own padding chain (body clamp(0,3vw,40px),
       shell 1px border, section clamp(16px,4vw,44px)), the container is 318.5px at a 375px
       viewport and 266.8px at 320px, so a 320px track loses 1.5px at 375px (the card's border),
       15.6px at 360px (border plus part of the 22px padding) and 53.2px at 320px -- 31px of which
       is the text column. 320px is the width WCAG 1.4.10 is defined against, and it is also what
       400% zoom resolves to on a 1280px desktop, so the clipped case is a conformance failure
       rather than an edge case. */
    .pf-svcgrid,
    .pf-clinicgrid {
        grid-template-columns: 1fr;
    }
}
/* .pf-providerlist gets the same collapse next to its own rule, NOT in the block above: it is
   declared ~900 lines further down, and a media query adds no specificity -- so at (0,1,0) each,
   the later base rule would have won on source order and the collapse would have been silently
   dead. */

.pf-svccard {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    min-height: 88px;
    /* --pf-line-strong: the whole tile is one <a>; its border is its only bounds. */
    border: 2px solid var(--pf-line-strong);
    border-radius: var(--pf-radius-m);
    background: var(--pf-card);
    color: inherit;
    transition: box-shadow 0.18s, border-color 0.18s;
}

.pf-svccard:hover {
    border-color: var(--pf-p500);
    box-shadow: var(--pf-shadow-hover);
    text-decoration: none;
    color: inherit;
}

.pf-svccard.is-active {
    border-color: var(--pf-p700);
    background: var(--pf-p700);
    color: var(--pf-onp);
}

/* The mockup's active card carries class="card" too, so hovering it changes the
   border and adds the shadow and leaves the fill alone. */
.pf-svccard.is-active:hover {
    background: var(--pf-p700);
    border-color: var(--pf-p500);
    color: var(--pf-onp);
}

.pf-svccard__icon {
    flex: none;
    width: 26px;
    height: 26px;
    color: var(--pf-p700);
}

.pf-svccard.is-active .pf-svccard__icon {
    color: currentColor;
}

.pf-svccard__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-svccard__title {
    font-size: 20px;
    font-weight: 700;
}

.pf-svccard__sub {
    font-size: 17px;
    color: var(--pf-ink2);
}

.pf-svccard.is-active .pf-svccard__sub {
    color: inherit;
    opacity: 0.92;
}

.pf-svccard__chev {
    flex: none;
    font-size: 22px;
    font-weight: 700;
    color: var(--pf-p700);
}

.pf-svccard.is-active .pf-svccard__chev {
    color: currentColor;
}

/* No service enabled at all is a real state (dispensaries 21 and 22 on the dev DB
   rendered an empty container before this existed). */
.pf-svcempty {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px 22px;
    border: 2px dashed var(--pf-line-strong);
    border-radius: var(--pf-radius-m);
    font-size: 18px;
    line-height: 1.55;
    color: var(--pf-ink2);
}

/* ---------- Booking tile / panel ----------
 *
 * ONE <details> that is the first item of .pf-svcgrid. Closed it is an ordinary service tile --
 * its <summary> carries `.pf-svccard`, so every rule above styles it and there is no second copy
 * of the tile's look to keep in step. Open it spans the row and becomes the booking panel.
 *
 * The `grid-column: 1 / -1` is what pushes the other tiles down: the panel is the first grid item,
 * so taking the full row reflows the rest beneath it at every breakpoint. No mobile-specific
 * ordering rule is needed, and none exists.
 *
 * WHAT ANIMATES AND WHAT CANNOT. The height of the body is animated by public-portal.js (see
 * wireBookingPanel), and the summary morphs from an 88px tile into a 48px header strip through the
 * transition on `.pf-svccard` plus the ones below. `grid-column` is NOT an animatable property, so
 * the width change from one cell to the full row is a step -- unavoidable in grid, and it lands at
 * the start of the open (before the height grows) and at the end of the close (after it shrinks),
 * which is the order that reads best. */

.pf-svcpanel {
    /* No border of its own while closed: the <summary>'s `.pf-svccard` draws the tile. */
    min-width: 0;
    border-radius: var(--pf-radius-m);
    transition: border-color 0.2s;
}

.pf-svcpanel[open] {
    grid-column: 1 / -1;
    border: 2px solid var(--pf-p700);
    overflow: hidden;
}

/* Closed, this is a tile and inherits everything from .pf-svccard. Only the bits <summary> needs
   are set here. */
.pf-svcpanel__head {
    cursor: pointer;
    list-style: none;
    /* `padding` and `min-height` join the inherited transition so the tile does not jump into the
       header strip -- .pf-svccard transitions box-shadow and border-color only. */
    transition: box-shadow 0.18s, border-color 0.18s, background-color 0.2s,
        padding 0.2s, min-height 0.2s, border-radius 0.2s;
}

/* Hide the native disclosure triangle; the chevron carries the state visually and <summary>
   carries it semantically. */
.pf-svcpanel__head::-webkit-details-marker {
    display: none;
}

.pf-svcpanel__head::marker {
    content: '';
}

/* Open: the tile flattens into the panel's header strip. Its own border goes, because the
   <details> now draws the outline, and the bottom rule separates head from body. */
.pf-svcpanel[open] .pf-svcpanel__head {
    padding: 14px 20px;
    min-height: var(--pf-tap);
    border: 0;
    border-bottom: 2px solid var(--pf-p700);
    border-radius: 0;
    background: var(--pf-p50);
    box-shadow: none;
}

.pf-svcpanel[open] .pf-svcpanel__head:hover {
    box-shadow: none;
}

.pf-svcpanel[open] .pf-svccard__title {
    font-size: 20px;
    font-weight: 800;
}

/* One control, two labels, driven by the element's own state, so the label can never disagree with
   whether the panel is open. `display: none` also removes the inactive one from the accessibility
   tree, so the summary has exactly one accessible name at a time. */
.pf-svcpanel[open] .pf-svcpanel__closed,
.pf-svcpanel:not([open]) .pf-svcpanel__open {
    display: none;
}

/* THE RING IS DRAWN INSIDE, and the negative offset is the whole point.
   An outline is painted OUTSIDE the border box and IS clipped by an ancestor's `overflow`.
   `.pf-svcpanel[open]` carries `overflow: hidden` for its radius and the head fills that padding
   box exactly, so the default `outline-offset: 3px` from public-tokens.css survived as a single 3px
   line under a header that already has a 2px bottom rule -- no readable focus indicator at all on
   the primary control of the whole flow.

   A negative offset is painted inside the border box, so nothing can clip it, and it still reads as
   a ring because the head has a filled background. It is applied ONLY while open: closed, the tile
   is not inside an overflow container and deserves the normal outset ring like its eight
   neighbours.

   THE TYPE SELECTOR AND THE `.pf` ARE LOAD-BEARING, for the same reason they are on
   `.pf select.pf-lang__select:focus-visible` above. public-tokens.css's primitive is
   `.pf summary:focus-visible`, i.e. (0,2,1); a bare `.pf-svcpanel__head:focus-visible` is (0,2,0)
   and LOSES on specificity whatever the load order, so the 3px offset would have stayed and this
   rule would have done nothing. This is (0,4,1). */
.pf .pf-svcpanel[open] summary.pf-svcpanel__head:focus-visible {
    outline-offset: -3px;
}

.pf-svcpanel__body {
    background: var(--pf-card);
    /* The height animation writes an inline `height` here, so the content has to be clipped to it
       while it runs. wireBookingPanel clears both when the transition ends. */
    overflow: hidden;
}

/* FALLBACK GEOMETRY ONLY. The frame's real height is pushed in by the SPA over postMessage and
   applied as an inline `height` by booking-iframe-autosize.js, which also adds
   .pf-bookingframe--autosized below. Everything in this block and the media query under it is what
   renders BEFORE that first message -- and permanently against a SPA build that sends none, which
   is a live case because the two halves deploy on separate pipelines.

   Height from WIDTH, because a cross-origin child cannot be measured from here. The design draws a
   square; min-height keeps it usable on a phone, where a true 1:1 box would give a multi-step
   third-party form ~375px of viewport. */
.pf-bookingframe {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 700px;
    border: 0;
}

/* DESKTOP'S FALLBACK CAPS THE FRAME AT 65% OF ITS SQUARE HEIGHT, by request. A cap only for as long
   as the fallback is in force: once a height message arrives the rule above releases it, which is
   the intent -- the cap existed to stop a width-derived guess from running away, and a measured
   height needs no ceiling.
   Expressed as an aspect-ratio rather than a `max-height`, because the height here is derived from
   the width: a percentage `max-height` resolves against the containing block's height, which is
   `auto`, so `max-height: 65%` computes to `none` and would do nothing at all.
   20/13 is exactly 0.65, so the frame is 0.65x its own width -- 1086px wide inside the 1180px
   shell gives 706px instead of 1086px.
   `min-height` scales by the same factor (700 -> 455) so the floor cannot claw the reduction back
   on a narrower desktop: at a 1024px viewport the panel is ~900px, 65% of which is 585px, and an
   unscaled 700px floor would have made that a 78% reduction target instead of 65%.
   Mobile and tablet keep the 1:1 square and the 700px floor -- the base rule's own note explains
   why a phone needs that floor, and nothing below 1024px is "desktop". */
@media (min-width: 1024px) {
    .pf-bookingframe {
        aspect-ratio: 20 / 13;
        /* 840px, not the 455px this used to be, because it is no longer an arbitrary floor: it is
           the SPA's own `--hl-flow-min-height` -- the measured height of the reservation form, and
           the height every step of the flow now reports from `sm` up. Matching it means the frame
           is already the right size before the first postMessage arrives, so the panel does not
           visibly resize once on open. The two repos deploy separately and cannot share a
           constant; if one moves, move the other. */
        min-height: 840px;
    }
}

/* Added by booking-iframe-autosize.js on the first valid height message, and never removed.
   Both declarations are load-bearing rather than tidy-up: `aspect-ratio` keeps deriving a height
   from the width no matter what the inline `height` says, and the `min-height` floor wins outright
   over any reported height below it -- which is exactly the short-step case the handoff exists to
   fix (a confirmation screen is nowhere near 455px, let alone 700px).

   IT MUST STAY BELOW THE MEDIA QUERY. This selector and `.pf-bookingframe` have the same
   specificity (0,1,0) and a media query adds none, so source order is the whole of the tie-break:
   placed above, the desktop rule re-applied the aspect-ratio and the 455px floor to an autosized
   frame and only the phone breakpoint appeared to work. */
.pf-bookingframe--autosized {
    aspect-ratio: auto;
    min-height: 0;
}

/* ---------- Schedule + contact duo ---------- */

.pf-duo {
    display: grid;
    grid-template-columns: 1fr;
    border: 2px solid var(--pf-line);
    border-radius: 18px;
    overflow: hidden;
}

.pf-duo__body {
    padding: clamp(20px, 3vw, 30px);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.pf-duo__group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pf-duo__group + .pf-duo__group {
    padding-top: 20px;
    border-top: 2px solid var(--pf-line);
}

.pf-duo__head {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
}

@media (min-width: 1024px) {
    .pf-duo {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* Styles the SHARED dispensary/_working_hours_table.html rather than forking it --
   the doctor-side editor reads its data-* attributes, so the markup must not move. */
/* WRITTEN AGAINST WHAT dispensary/_working_hours_table.html ACTUALLY EMITS, which is not what
   these rules first assumed:
   * it emits NO `<th>` -- every cell is a `<td>` -- so the `.pf-hours th` rules matched nothing
     and the weekday names picked up the times' `font-weight: 700; text-align: right` instead;
   * it NESTS `<table>` two and three deep inside the second cell, so descendant `td` rules hit
     those inner cells too, doubling every row's padding and drawing a separator line inside a
     row rather than between rows.
   The weekday cell is addressed by `.padding-right-10`, which the partial puts on it (and which
   had no effective rule anywhere, so the two columns had no separation either). */
.pf-hours table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
}

.pf-hours td {
    padding: 11px 0;
    border-bottom: 1px solid var(--pf-line);
    vertical-align: top;
    font-weight: 700;
    text-align: right;
}

.pf-hours tr:last-child > td {
    border-bottom: 0;
}

/* The weekday label: the partial's own class, left, unemphasised, with real column separation. */
.pf-hours td.padding-right-10 {
    font-weight: 400;
    color: var(--pf-ink2);
    text-align: left;
    padding-right: 16px;
    white-space: nowrap;
}

/* The inner tables are layout for one row's times -- no separators, no row padding of their own. */
.pf-hours table table td {
    padding: 0;
    border-bottom: 0;
}

.pf-hours__note {
    font-size: 17px;
    line-height: 1.55;
    color: var(--pf-ink2);
}

.pf-addr {
    margin: 0;
    font-size: 18px;
    line-height: 1.6;
    color: var(--pf-ink2);
}

/* ---------- Utilities ---------- */

.pf-muted {
    color: var(--pf-ink2);
}

/* A phone number is one token even though it is written with spaces. Slovenian numbers are spaced
   ("01 123 45 67"), and every one of those spaces was a break opportunity -- so a narrow "Pokličite:
   01 123 45 67" button split the NUMBER across two lines. With this, the only break opportunity
   left in the label is the space after the colon, so a tight button breaks before the number and
   keeps it whole. */
.pf-phone {
    white-space: nowrap;
}

/* ---------- Cookie notice ----------
 * Replaces cookieCuttr, which needs jQuery + jquery.cookie. Built by
 * public-portal.js and appended to <body>, so it sits outside .pf-shell. */

.pf-cookiebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px clamp(16px, 4vw, 44px);
    background: var(--pf-p900);
    color: #fff;
    font-size: 17px;
    line-height: 1.55;
}

.pf-cookiebar__text {
    margin: 0;
    max-width: 80ch;
}

.pf-cookiebar a,
.pf-cookiebar a:hover,
.pf-cookiebar a:focus {
    color: #fff;
    text-decoration: underline;
}

.pf-cookiebar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.pf-cookiebar .pf-btn--muted {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

.pf-cookiebar .pf-btn--primary {
    background: #fff;
    color: var(--pf-p900);
}

@media (min-width: 640px) {
    .pf-cookiebar {
        flex-direction: row;
        align-items: center;
    }

    .pf-cookiebar__actions {
        margin-left: auto;
        flex: none;
    }
}

/* ---------- Prose (legal / notice pages) ---------- */

.pf-prose {
    max-width: 72ch;
    font-size: 18px;
    line-height: 1.65;
}

.pf-prose h2 {
    margin-top: 1.4em;
}

/* ---------- Anchor-component colour overrides ----------
 * `.pf a { color }` is (0,1,1) and beats every single-class component rule, so an
 * <a> styled as a button or a card renders in the link colour -- which made the
 * hero CTA dark-on-dark and invisible. Same cascade trap public-modern.css
 * documents for `.rp-page a`, hit again here.
 *
 * These selectors are `a.pf-…`, i.e. (0,1,1) -- a TIE with `.pf a`, won by coming
 * later in the file. Any new anchor component needs an entry here; a component that
 * inherits its colour needs one too, because `inherit` at (0,1,0) also loses.
 */

/* The logo home link holds an image or an initial box, never text, so the only thing `.pf a:hover`
   can do to it is draw an underline under a 44px graphic. (0,1,1), tying `.pf a:hover` and winning
   on file order, exactly as the note above describes. */
.pf a.pf-header__home:hover {
    text-decoration: none;
}

.pf a.pf-hero__cta,
.pf a.pf-promo__cta,
.pf a.pf-btn--primary {
    color: var(--pf-onp);
}

.pf a.pf-hero__cta:hover,
.pf a.pf-promo__cta:hover,
.pf a.pf-btn--primary:hover {
    color: var(--pf-onp);
}

.pf a.pf-btn--ghost,
.pf a.pf-btn--ghost:hover {
    color: var(--pf-p700);
}

/* Cards cancel the global underline; the mockup's `.card:hover` does exactly this.
   `.pf-sos` belongs here too: its own :hover sets text-decoration:none at (0,1,0) and
   was losing, so the 112 button underlined on hover -- and `.pf-providercard` was
   missing from this block entirely, being the last component added. */
.pf a.pf-loccard:hover,
.pf a.pf-cliniccard:hover,
.pf a.pf-svccard:hover,
.pf a.pf-providercard:hover,
.pf a.pf-sos:hover {
    text-decoration: none;
}

.pf a.pf-btn--muted,
.pf a.pf-btn--muted:hover,
.pf a.pf-nav__link,
.pf a.pf-loccard,
.pf a.pf-loccard:hover,
.pf a.pf-cliniccard,
.pf a.pf-cliniccard:hover,
.pf a.pf-svccard,
.pf a.pf-svccard:hover,
.pf a.pf-providercard,
.pf a.pf-providercard:hover {
    color: var(--pf-ink);
}

.pf a.pf-nav__link.is-current,
.pf a.pf-back,
.pf a.pf-meta__item {
    color: var(--pf-p700);
}

/* The filled service card and the filled nav state carry their own text colour. */
.pf a.pf-svccard.is-active,
.pf a.pf-svccard.is-active:hover {
    color: var(--pf-onp);
}

.pf a.pf-sos,
.pf a.pf-sos:hover {
    color: #a3242b;
}

/* ---------- Forms ----------
 * Vertical, not Bootstrap's col-sm-3 / col-sm-8 horizontal grid: the standalone
 * shell loads no Bootstrap, and a label above its field is what reflows to 375px
 * without a second layout. */

/* No max-width. The card used to stop at 760px inside an 1178px section while the clinic notice
   directly above it spans the full width, so on a desktop the form read as a narrow column with
   ~400px of nothing beside it. The short identity fields use that width through .pf-field-row
   below rather than by stretching each input to a metre. */
.pf-formcard {
    background: var(--pf-card);
    border: 2px solid var(--pf-line);
    border-radius: var(--pf-radius-m);
    padding: clamp(18px, 3vw, 28px);
}

.pf-formcard__title {
    font-size: clamp(22px, 3.2vw, 26px);
    font-weight: 800;
    margin: 0 0 6px;
}

.pf-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 18px;
    border: 0;
    padding: 0;
}

.pf-field__label {
    font-size: 17px;
    font-weight: 600;
    color: var(--pf-ink);
    /* <legend> defaults differ from <label>; normalise so a radio group's legend and a
       text field's label sit identically. */
    float: none;
    width: auto;
    padding: 0;
    margin: 0;
    line-height: 1.35;
}

.pf-field__req {
    color: #a3242b;
    font-weight: 700;
}

/* Bare inputs ARE identified by their border, so this is where --pf-line-strong
   earns its 3:1 (see the token file). */
.pf-input {
    width: 100%;
    min-height: var(--pf-tap);
    padding: 10px 14px;
    border: 2px solid var(--pf-line-strong);
    border-radius: var(--pf-radius-s);
    background: var(--pf-card);
    color: var(--pf-ink);
    font: 400 18px/1.4 var(--pf-font);
}

/* `input.pf-input` / the type selector, for the same specificity reason as the language
   select above: `.pf-input:focus` is (0,2,0) and the token file's `.pf input:focus-visible` is
   (0,2,1), so the tighter 1px offset this rule asks for was being overridden by the primitive's
   3px. Browsers match :focus-visible on a text input for both pointer and keyboard focus, so the
   two rules really do compete on every click into a field. */
.pf input.pf-input:focus,
.pf textarea.pf-input:focus,
.pf select.pf-input:focus {
    border-color: var(--pf-p700);
    outline: 3px solid var(--pf-p700);
    outline-offset: 1px;
}

textarea.pf-input {
    min-height: 120px;
    resize: vertical;
}

/* NO `appearance: none` here. It was written with the comment "native chevron only",
   which is the opposite of what the property does: it removes the native chevron, and
   with no background-image arrow to replace it a <select> renders as a plain text box.
   The provider directory's "Zdravstveno področje" and "Območna enota" were both
   indistinguishable from text inputs. The native control is drawn by the platform, is
   already 3:1 against the field, and needs no asset. */
select.pf-input {
    padding-right: 10px;
    /* The chevron is the browser's, so leave room for it and let the text truncate
       rather than run under it. */
    text-overflow: ellipsis;
}

.pf-field.has-error .pf-input {
    border-color: #a3242b;
}

/* Date fields are native <input type="date"> (patient_dispensary_orders.forms.NativeDateInput).
   Wide enough for a locale-formatted date plus the browser's picker control, and no wider: a
   full-width box for a date tells the patient the field wants more than it does. */
.pf-field--date .pf-input {
    max-width: 16em;
    min-width: 12em;
}

/* Two short fields side by side from 640px up -- first/last name, birth date/sex, GSM/e-mail.
   This is how the form card uses its full width without a first-name box a metre wide. The
   fields keep their own bottom margin, so only the column gap is set here. */
.pf-field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 20px;
}

.pf-field-row > .pf-field {
    min-width: 0;
}

@media (min-width: 640px) {
    .pf-field-row {
        grid-template-columns: 1fr 1fr;
    }
}

.pf-field__hint {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--pf-ink2);
}

.pf-field__error {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 16px;
    line-height: 1.5;
    color: #a3242b;
}

.pf-charcount {
    margin: 0;
    font-size: 15px;
    color: var(--pf-ink2);
}

.pf-charcount.is-over {
    color: #a3242b;
    font-weight: 700;
}

/* ---------- Radios and checkboxes ---------- */

.pf-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.pf-radio,
.pf-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--pf-tap);
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
}

.pf-check {
    align-items: flex-start;
    line-height: 1.5;
}

.pf-radio input,
.pf-check input {
    /* 24px is the smallest a native control can be and still be a comfortable target
       inside a 48px row. */
    width: 24px;
    height: 24px;
    flex: none;
    margin: 0;
    accent-color: var(--pf-p700);
}

.pf-check input {
    margin-top: 3px;
}

/* ---------- Form actions ---------- */

.pf-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid var(--pf-line);
}

.pf-form-actions .pf-btn {
    flex: 1 1 auto;
}

@media (min-width: 640px) {
    /* NO `flex-direction: row-reverse`. It put the primary "Naročam" button visually LAST while
       it stays first in the DOM, so the visual order and the tab order disagreed -- WCAG 2.4.3 --
       on all seven order forms, which are the only two-button action rows in the flow (the status
       and token pages have one button each). Neither artboard contains a two-button action row or
       any row-reverse, so nothing in the design asked for it. DOM order is now visual order at
       both widths, and primary-first is also where a thumb wants it on a phone. */
    .pf-form-actions {
        justify-content: flex-start;
    }

    .pf-form-actions .pf-btn {
        flex: 0 0 auto;
    }
}

/* ---------- Terminal outcome (token pages) ---------- */

/* The expired / already-cancelled end states of public/_booking_token_action.html. They replace a
   nested `.pf-status .pf-status--rejected`, which drew a second bordered card inside the card.
   Same rule and same offsets as `.pf-form-actions` directly above, on purpose: all three states of
   that card then read identically -- content, rule, then the outcome or the button. There is no
   `.pf-divider` to reuse; a top border on the element that follows is the system's idiom, as
   `.pf-contact__group + .pf-contact__group` and `.pf-duo__group + .pf-duo__group` also do. */
.pf-outcome {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 2px solid var(--pf-line);
    font-size: 19px;
    font-weight: 700;
}

/* The pill is gone, so the colour carries the signal on its own. Same literal the rejected order
   badge uses, and it is a literal for the same reason: public-tokens.css is re-derived for WCAG
   contrast by booking/tests/test_public_tokens.py, and this is not part of either theme's ramp. */
.pf-outcome--rejected {
    color: #a3242b;
}

/* ---------- Clinic instruction panel ("NAVODILO AMBULANTE") ---------- */

.pf-help-panel {
    margin: 0 0 20px;
    padding: 16px 18px;
    border: 2px solid var(--pf-p200);
    border-radius: var(--pf-radius-m);
    background: var(--pf-p50);
    font-size: 17px;
    line-height: 1.6;
}

.pf-help-panel__label {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
}

/* Collapsed by default when long; the toggle is a real button. */
.pf-help-panel__body {
    overflow: hidden;
}

.pf-help-panel:not(.is-open) .pf-help-panel__body {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.pf-help-panel__more {
    margin-top: 8px;
    min-height: var(--pf-tap);
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--pf-p700);
    font: 700 17px/1.2 var(--pf-font);
    text-decoration: underline;
    cursor: pointer;
}

/* ---------- ZZZS card illustration ---------- */

.pf-zzzs {
    display: block;
    max-width: 320px;
    margin: 0 0 18px;
    border-radius: var(--pf-radius-s);
}

/* ---------- Attachments ---------- */

.pf-attach {
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 2px dashed var(--pf-line-strong);
    border-radius: var(--pf-radius-m);
}

.pf-attach__label {
    display: block;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* ---------- Order status pages ---------- */

.pf-status {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: clamp(18px, 3vw, 28px);
    border: 2px solid var(--pf-line);
    border-radius: var(--pf-radius-m);
    background: var(--pf-card);
    max-width: 760px;
}

.pf-status__badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    font: 700 17px/1.2 var(--pf-font);
    border: 2px solid var(--pf-line-strong);
}

.pf-status--submitted .pf-status__badge {
    border-color: var(--pf-p700);
    background: var(--pf-p50);
    color: var(--pf-p700);
}

.pf-status--accepted .pf-status__badge {
    border-color: var(--pf-p700);
    background: var(--pf-p100);
    color: var(--pf-p700);
}

.pf-status--processed .pf-status__badge {
    border-color: var(--pf-p700);
    background: var(--pf-p700);
    color: var(--pf-onp);
}

.pf-status--rejected .pf-status__badge {
    border-color: #a3242b;
    background: #fdf1f0;
    color: #a3242b;
}

.pf-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pf-step {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 17px;
    color: var(--pf-ink2);
}

.pf-step__bar {
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--pf-line-strong);
    display: grid;
    place-items: center;
    font: 700 15px/1 var(--pf-font);
}

.pf-step.is-done {
    color: var(--pf-ink);
    font-weight: 600;
}

.pf-step.is-done .pf-step__bar {
    border-color: var(--pf-p700);
    background: var(--pf-p700);
    color: var(--pf-onp);
}

.pf-step.is-rejected .pf-step__bar {
    border-color: #a3242b;
    background: #a3242b;
    color: #fff;
}

@media (min-width: 640px) {
    .pf-steps {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px 24px;
    }
}

/* ---------- Provider directory (the list before a provider is chosen) ---------- */

.pf-filter {
    margin: 0 0 24px;
    padding: clamp(16px, 3vw, 22px);
    border: 2px solid var(--pf-line);
    border-radius: var(--pf-radius-m);
    background: var(--pf-card);
}

.pf-filter__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0 16px;
}

.pf-filter__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* The map is a redundant shortcut, so it is collapsed by default -- <details>, so it
   costs no JavaScript. The region <select> above it is the primary control. */
.pf-mapselect {
    margin-top: 16px;
}

.pf-mapselect__summary {
    display: inline-flex;
    align-items: center;
    min-height: var(--pf-tap);
    color: var(--pf-p700);
    font: 700 17px/1.2 var(--pf-font);
    cursor: pointer;
}

/* Same clip as .pf-svcpanel__head, from the `overflow-x: auto` below: `overflow-x` on its own
   computes `overflow-y` to `auto` as well, so the summary's ring lost its top, bottom and left
   edges and survived as a 3px tick at the far right of the control. Drawn inside instead.
   (0,3,1), to beat public-tokens.css's `.pf summary:focus-visible` at (0,2,1) -- see the note on
   .pf-svcpanel__head. */
.pf summary.pf-mapselect__summary:focus-visible {
    outline-offset: -3px;
}

.pf-mapselect img {
    display: block;
    margin-top: 10px;
    /* The <area> coordinates are pixel-fixed against the raster, so the image must not
       be scaled or the hotspots drift off their regions. It scrolls instead. */
    max-width: none;
}

.pf-mapselect > img,
.pf-mapselect {
    overflow-x: auto;
}

.pf-providerlist {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
}

/* The 320px floor clips below ~390px exactly as .pf-clinicgrid's does -- see the arithmetic on the
   max-width:400px block further up. Kept here, after the rule it overrides, because a media query
   contributes no specificity. */
@media (max-width: 400px) {
    .pf-providerlist {
        grid-template-columns: 1fr;
    }
}

.pf-providercard {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    min-height: 76px;
    /* --pf-line-strong: the whole card is one <a>; its border is its only bounds. */
    border: 2px solid var(--pf-line-strong);
    border-radius: 14px;
    background: var(--pf-card);
    color: inherit;
    transition: box-shadow 0.18s, border-color 0.18s;
}

.pf-providercard:hover {
    border-color: var(--pf-p500);
    box-shadow: var(--pf-shadow-hover);
    text-decoration: none;
    color: inherit;
}

.pf-providercard__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pf-providercard__name {
    font-size: 19px;
    font-weight: 700;
}

.pf-providercard__city {
    font-size: 17px;
    color: var(--pf-ink2);
}

.pf-providercard__arrow {
    flex: none;
    font-size: 22px;
    font-weight: 700;
    color: var(--pf-p700);
}

.pf-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.pf-pager__current {
    font-size: 17px;
    color: var(--pf-ink2);
}
