/*
    eAukcije — the 2026-10 look, as a layer.

    ──────────────────────────────────────────────────────────────────────────
    WHAT THIS FILE IS, AND WHY IT IS A SEPARATE FILE
    ──────────────────────────────────────────────────────────────────────────

    `eaukcije.css` is untouched. This file loads after it (base.html.twig,
    `{% block stylesheets %}`) only when `UI_THEME=refresh`, so rolling the new
    look back is an environment variable and a restart — not a rebuild, not a
    registry push, not a deploy. A rollback that needs the image pipeline is
    the wrong critical path for "visitors hate it, put it back", and that is
    the entire reason this is a layer rather than an edit.

    If the look is kept, this folds into `eaukcije.css` and the flag goes. If
    it is dropped, delete this file and the four-line block in base.html.twig.

    ──────────────────────────────────────────────────────────────────────────
    THE RULES IT FOLLOWS
    ──────────────────────────────────────────────────────────────────────────

    1. NO `:root` TOKEN IS REDEFINED. `--brand`, `--accent`, `--urgent`,
       `--surface` and the rest are read by `account.css`, `sell.css` and the
       sell wizard, none of which were designed for this look. Redefining one
       here would silently reskin pages nobody reviewed. New names below are
       all `--rf-*`, which nothing else reads.

    2. Specificity is matched, not escalated. `.card__cta .card__cta--primary`
       is (0,2,0) in the base file — deliberately, per its own comment — so the
       override is (0,2,0) too and wins on source order. No `!important`
       except where the base file used one first (`.btn-sell` colour).

    3. The masthead is shared with the member area and the sell wizard. That is
       intended: a dark masthead on some pages and a white one on others is
       worse than either. Nothing else in this file reaches outside the public
       catalogue pages.
*/

:root {
    /* Navigation ink — darker than --brand so the masthead reads as a frame
       around the page rather than a large blue element competing with it. */
    --rf-navy: var(--navy-900);
    --rf-navy-soft: #8fb2ce;
    --rf-navy-text: #c7d7e6;

    /* The display face. Body copy and figures stay on the system stack: this
       is one 68 KB font for headings, not a typographic rebuild. */
    --rf-display: var(--font-sans);   /* Manrope since the 2026-10 redesign */

    /*
        The accent, darkened, and this one is not taste.

        `--accent` is #e8590c, which carries white text at 3.58:1 — under the
        4.5:1 WCAG AA needs for body-sized text. In the classic theme that
        affects `.btn-sell`, `.btn--sell` and `.btn--bin`; this theme then put
        white-on-orange on two MORE controls ("Traži" on every page, "Licitiraj"
        on every lot), which is what turned a pre-existing fault into the main
        thing an audit of this redesign reports.

        #c2410c is the same hue at 5.18:1, and #9a3412 at 7.31:1 for hover.
        `--accent` itself is deliberately left alone: it is read by `sell.css`,
        and this file does not reach into stylesheets it did not design.
    */
    --rf-accent: var(--orange-600);
    --rf-accent-dark: #9a3412;
}

/*
    Archivo, self-hosted. Two subsets, because `latin-ext` carries č ć ž š đ
    and `latin` carries everything else — ship only the first and Croatian
    renders half in Archivo and half in the system font, which is worse than
    not loading it at all.

    `font-display: swap` so the first paint is never blocked: the heading
    appears immediately in the fallback and reflows once. The base template's
    rule is "no third-party origin in <head>", and this is our own origin, so
    `font-src 'self'` in ContentSecurityPolicyListener needs no change.
*/
@font-face {
    font-family: Archivo;
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('/fonts/archivo-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
        U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
        U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F,
        U+A720-A7FF;
}

@font-face {
    font-family: Archivo;
    font-style: normal;
    font-weight: 600 700;
    font-display: swap;
    src: url('/fonts/archivo-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
        U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
        U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ═══════════════════════════════════════════════════════════════════════════
   1. MASTHEAD — a frame, not a competitor
   ═══════════════════════════════════════════════════════════════════════════ */

.masthead {
    background: var(--rf-navy);
    border-bottom: 0;
}

.masthead .brand a { color: #fff; }
.masthead .brand__tag { color: var(--rf-navy-soft); }

/*
    The display face, on headings only. The list is explicit rather than a
    blanket `h1, h2, h3`: the member area and the sell wizard share this
    stylesheet's masthead but were not designed around Archivo, and a bare
    element selector would reach every heading in both.
*/
.masthead .brand a,
.pagehead,
.sectionhead h2,
.listing h1,
.listing__desc-heading,
.tabpanel__heading,
.related__head h2,
.card__title {
    font-family: var(--rf-display);
    letter-spacing: -0.02em;
}

/* The search field sits ON the navy rather than in a white well: a white box
   up there reads as the page starting too early. */
.masthead .searchbar {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
}

.masthead .searchbar:focus-within {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.42);
}

.masthead .searchbar__input {
    background: transparent;
    color: #fff;
}

.masthead .searchbar__input::placeholder { color: var(--rf-navy-soft); }

/* Orange here, white for "Prodaj predmet" below: the accent is spent on the
   action a visitor came to perform, and selling is not it on a search box. */
.masthead .searchbar__submit { background: var(--rf-accent); }
.masthead .searchbar__submit:hover { background: var(--rf-accent-dark); }

/*
    The scope select — the "Sve kategorije / Knjige i tisak" control that only
    appears on a category or search page.

    It inherits `--ink-muted` (#5c6780) from the base file, which was right on a
    white bar and is 1.93:1 on this navy one: the chevron showed and the
    category name did not. `category.html.twig` says in its own comment that
    this select "is the only thing telling the visitor their search is
    narrowed" — so an unreadable one is a search that silently returns a subset.
    #c7d7e6 is 7.43:1 here, legible but still quieter than the typed query.

    The `option` rule is not decoration. A <select> whose colour is light hands
    that colour to its own popup list on Chrome and Firefox under Windows and
    Linux, where the list is drawn on white — light-on-light, the same defect as
    the account menu, in a control most of this team will never see because
    macOS draws the popup natively instead. Pin both colours explicitly.
*/
.masthead .searchbar__scope {
    color: var(--rf-navy-text);
    /* 15ch in the base file cut "Knjige i tisak › Antikvarne knjige" down to
       the ancestor. The input beside it is the widest thing in the masthead and
       gives this up without complaint. */
    max-width: 26ch;
}

.masthead .searchbar__scope option {
    color: var(--ink);
    background-color: #fff;
}

/*
    `> a` and not ` a`, and this is not a style preference.
    `.usernav` holds exactly three direct children — the language link, the
    `details.usermenu`, and `.btn-sell` — but the dropdown PANEL is nested
    inside that `details`. A descendant selector therefore also paints every
    link in the open menu, and `.masthead .usernav a:hover` (0,3,1) outranks
    the base file's `.usernav .usermenu__link:hover` (0,3,0), so hovering a
    menu row turned it white on a white panel: invisible. Reported 2026-10-12.

    The child combinator keeps this rule on the dark bar, where white-on-navy
    is what it means, and leaves the panel to the base stylesheet entirely.
*/
.masthead .usernav > a { color: var(--rf-navy-text); }
.masthead .usernav > a:hover { color: #fff; }
.masthead .usernav__sep { color: rgba(255, 255, 255, 0.24); }

/* The base file sets `color: #fff !important` here, so this has to match it. */
.masthead .btn-sell {
    background: #fff;
    color: var(--rf-navy) !important;
}

.masthead .btn-sell:hover { background: #e8eef4; }

.masthead .usermenu__trigger { color: var(--rf-navy-text); }
.masthead .usermenu__avatar {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}
.masthead .usermenu__chevron { color: var(--rf-navy-soft); }

/*
    The panel deliberately has NO rules here. It is a white sheet hanging off a
    dark bar and the base stylesheet already dresses it correctly; every rule
    this file aimed at it was repairing damage this file had caused. Nothing
    above reaches inside it now — keep it that way.
*/

/* ═══════════════════════════════════════════════════════════════════════════
   2. THE CARD — the whole tile is the target
   ═══════════════════════════════════════════════════════════════════════════

   The old grid painted a solid brand-blue "Licitiraj" on every tile. Sixteen
   identical saturated blocks on one screen means none of them is a call to
   action; the eye has no entry point and the grid reads as noise.

   `.card__title a::after` already stretches over the whole card, so the tile
   is the link and the button never had to be one. It becomes an outline that
   fills on hover — present enough to say "this is biddable", quiet enough to
   let the photograph and the price carry the row.
*/

.card {
    border-radius: 12px;
    transition: box-shadow 0.16s ease, transform 0.16s ease;
}

.card:hover {
    box-shadow: 0 6px 20px rgba(16, 24, 40, 0.10);
    transform: translateY(-2px);
}

/* Matches the base file's (0,2,0). */
.card__cta .card__cta--primary {
    background: transparent;
    color: var(--brand);
    border: 1px solid var(--line-strong);
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.card__cta .card__cta--primary:visited { color: var(--brand); }

.card:hover .card__cta--primary,
.card__cta .card__cta--primary:hover,
.card__cta .card__cta--primary:focus-visible {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.card__title { font-weight: 600; }

/* ───────────────────────────────────────────────────────────────────────────
   2b. THE TILE, LESS FLAT (2026-10-13)
   ───────────────────────────────────────────────────────────────────────────

   The grid read as six evenly-weighted rows stacked in a box: title, seller,
   condition, badge, price, button — every one the same size, the same colour
   weight and the same distance apart, so nothing in the tile told the eye where
   to go first. On an auction the two facts that matter are *how much* and *how
   long*, and neither of them led.

   Two decisions in the base file are deliberately NOT undone here, because
   both are alignment arguments and both are right:

     * price above bid count, stacked — not a `space-between` row, which put
       the count in a different place on every card down a column;
     * badges above the price — so a lot with "Kupi odmah" does not show its
       price 33px higher than the lot beside it.

   What changes is weight and rhythm, not order.
   ─────────────────────────────────────────────────────────────────────────── */

/* The photograph is the most valuable thing on the tile and it was being
   treated as a header image. A slow scale on hover (pointer devices only,
   below) and a scrim so an overlay chip sits on something rather than floating
   over whatever the photo happens to be. */
.card__photo::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(10, 20, 35, 0.34), transparent);
    opacity: 0;
    transition: opacity 0.18s ease;
    pointer-events: none;
}

.card:has(.pill) .card__photo::after { opacity: 1; }

/* Countdown and photo count on the same line, at the foot of the picture.
   The clock was top-left and the count bottom-right — two chips on opposite
   diagonals of every tile, which is what made a grid of them look restless. */
.card .pill {
    top: auto;
    bottom: 10px;
    left: 10px;
    z-index: 1;
}

/* Two lines, always. A one-line title made the card below it start 20px higher
   than its neighbour, and that ragged edge across a row is most of why the grid
   looked unconsidered. */
.card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
    font-size: 0.9375rem;
    line-height: 1.3;
}

/* Secondary by weight, not just by size: the handle had an avatar chip, a name
   and a chevron, which is three elements of chrome for the least-read line. */
.card__seller { margin: 2px 0 4px; }
.card__avatar { width: 17px; height: 17px; font-size: 0.75rem; }
.card__sellerchevron { opacity: 0.45; }
.card__meta { margin: 0 0 9px; }

/* The number people scan a column for. Tabular already, via the base file's
   figure group — this only makes it lead. */
.card__price b {
    font-size: 1.4375rem; /* 23px */
    letter-spacing: -0.03em;
}

/* The CTA was ~55px of card height — a full-width outlined box, a 12px margin,
   a 12px padding and a rule above it — for a control that repeats what clicking
   the tile already does. Slimmer, with an arrow so it reads as a direction
   rather than a form button, and the rule above it lightened to a hairline. */
.card__cta {
    margin-top: 10px;
    padding-top: 10px;
    border-top-color: var(--line-soft, #eef0f4);
}

/*
    Above 820px only, and that bound is not cosmetic. `eaukcije.css` gives this
    button `padding: 12px 9px` inside `@media (max-width: 820px)` to keep it a
    44px touch target on a phone. A media query adds no specificity, so an
    unscoped `.card__cta a` here — same (0,1,1), later file — would win on a
    phone too and quietly shrink the tap area to 36px. Slimmer where there is a
    pointer; untouched where there is a thumb.
*/
@media (min-width: 821px) {
    .card__cta a {
        padding: 7px 9px;
        font-size: 0.8125rem;
    }
}

.card__cta .card__cta--primary::after {
    content: " →";
    opacity: 0.55;
}

/*
    The status strip. Always present now (see `_lotcard.html.twig`), carrying
    the badges at the start and the bid count at the end, so the row above the
    price is never an empty slot. One line, never two: a lot with both badges
    and a long count would otherwise wrap and push the price out of line with
    the rest of its row, which is the whole thing this layout protects.
*/
.card__badges {
    align-items: center;
    flex-wrap: nowrap;
    min-height: 22px;
    margin: 8px 0 0;
}

/* "Min. cijena" and "Kupi odmah" are facts about the lot, not warnings. */
.card__badges .badge {
    font-size: 0.75rem;
    padding: 2px 7px;
    white-space: nowrap;
}

/* At the far end, and allowed to shrink before a badge does — the badge is a
   fixed phrase, the count is the one that can be abbreviated by the ellipsis.

   Unless it is alone on the row, which is the common case: a count pushed to
   the right margin with nothing to its left reads as orphaned, and it is the
   only thing on that line on roughly half the grid. With no badge beside it,
   it sits flush left under the location, where every other line in the card
   starts. (`:has()` is already how the base file tints a critical card.) */
.card__badges .card__bids {
    margin-left: auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card__badges:not(:has(.badge)) .card__bids { margin-left: 0; }

/* The price is the only thing on its line now. */
.card__price { gap: 0; }

@media (hover: hover) {
    .card__photo img {
        transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
    }

    .card:hover .card__photo img { transform: scale(1.04); }
}

/* The motion is decoration; anyone who has asked for less of it gets none. */
@media (prefers-reduced-motion: reduce) {
    .card,
    .card__photo img,
    .card__photo::after {
        transition: none;
    }

    .card:hover { transform: none; }
    .card:hover .card__photo img { transform: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. THE COUNTDOWN — red means red
   ═══════════════════════════════════════════════════════════════════════════

   Every lot wore a warm pill, including ones with three days left, so the
   signal carried no information. Now: navy by default, and the alarm palette
   only in the last hour, where it is true.

   The base file's four modifiers are all (0,1,0) and so are these; this file
   loads second, so source order decides. `.card .pill` (0,2,0) sets size in
   the base file and is left alone.
*/

.pill {
    border-radius: 6px;
    background: rgba(11, 42, 69, 0.80);
    color: #fff;
    box-shadow: none;
    font-variant-numeric: tabular-nums;
}

.pill--approaching,
.pill--soon {
    background: rgba(11, 42, 69, 0.80);
    color: #fff;
}

.pill--ended {
    background: rgba(16, 24, 40, 0.55);
    color: #fff;
}

/* The one state that earns the colour. */
.pill--critical {
    background: var(--urgent);
    color: #fff;
    font-weight: 700;
}

/*
    The base file tints the entire card in the final hour
    (`.card:has(.clock--critical)`, (0,2,0)). With a red pill doing that job,
    the full-tile wash is one signal too many — it drags the photograph and
    makes a grid of ending lots look like a grid of errors. The card keeps its
    surface and gets a red hairline instead.
*/
.card:has(.clock--critical) {
    background: var(--surface);
    box-shadow: inset 0 0 0 1px var(--danger-line), var(--shadow);
}

.card:has(.clock--critical):hover {
    box-shadow: inset 0 0 0 1px var(--danger-line), 0 6px 20px rgba(16, 24, 40, 0.10);
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. THE LISTING PAGE — one thing at a time
   ═══════════════════════════════════════════════════════════════════════════

   Price, countdown and bid box all carried about the same weight, so the page
   asked the visitor to work out what mattered. Order of attention here:
   how long is left → what it costs → the button.

   Scoped under `.listing` throughout: `.panel` is declared alongside
   `.accpanel` in the base file, so an unscoped `.panel` rule would restyle the
   member area and the sell wizard as well.
*/

.listing h1 { font-weight: 700; }

/* The clock is the one fact on the page that changes while you look at it. */
.listing .bidbox__clock .clockbox {
    background: var(--rf-navy);
    border-radius: 11px;
    padding: 14px 16px;
    border: 0;
}

.listing .bidbox__clock .clockbox__label { color: var(--rf-navy-soft); }

.listing .bidbox__clock .clock,
.listing .bidbox__clock .clock--big {
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.listing .bidbox__clock .clockbox__absolute { color: var(--rf-navy-text); }

/* Largest thing on the page, and tabular so it does not jump on a live update. */
.listing .bidbox__price .bigprice {
    font-size: 2.25rem;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.listing .bidbox { border-radius: 14px; }

/* The one orange on the page. */
.listing .bidform .btn--bid {
    background: var(--rf-accent);
    --btn-ink: #fff;
    color: #fff;
}

.listing .bidform .btn--bid:hover { background: var(--rf-accent-dark); }

/*
    Every other control the base file paints with `--accent`, brought to the
    same orange so the theme shows ONE accent rather than two a shade apart.
    `.btn-sell` is listed for completeness — in the masthead the rule above
    turns it white, and this catches any other place it appears.
*/
.btn-sell,
.btn--sell,
.btn--bin {
    background: var(--rf-accent);
    border-color: var(--rf-accent);
}

.btn--sell:hover,
.btn--bin:hover {
    background: var(--rf-accent-dark);
    border-color: var(--rf-accent-dark);
}

.listing .sellerbox { border-radius: 14px; }

/* ═══════════════════════════════════════════════════════════════════════════
   5. PHONES
   ═══════════════════════════════════════════════════════════════════════════

   The base file turns the masthead static and sets `--masthead-h: 0px` below
   its phone breakpoint; nothing here changes that geometry, only colour. The
   hover-fill on the card CTA is a pointer affordance and no phone has one, so
   the button goes back to being filled where hover cannot exist — an outline
   nobody can trigger is just a weaker button.
*/

@media (hover: none) {
    .card__cta .card__cta--primary {
        background: var(--brand);
        border-color: var(--brand);
        color: #fff;
    }

    .card__cta .card__cta--primary:visited { color: #fff; }
}

/* Print: the base file already hides the masthead and the card CTA. The navy
   panels would otherwise burn a cartridge for nothing. */
@media print {
    .masthead { background: none; }

    .listing .bidbox__clock .clockbox {
        background: none;
        border: 1px solid var(--line);
    }

    .listing .bidbox__clock .clock,
    .listing .bidbox__clock .clock--big,
    .listing .bidbox__clock .clockbox__label,
    .listing .bidbox__clock .clockbox__absolute {
        color: var(--ink);
    }
}

/*
    ── The footer closes the frame (2026-10-13) ───────────────────────────────

    The masthead's navy is chosen, a few lines above, so that it "reads as a
    frame around the page rather than a large blue element competing with it".
    A frame with only a top edge is not one. The footer was white on a grey
    page behind a hairline, so the page did not end — it stopped.

    Same `--rf-navy` as the masthead rather than a second shade: two dark bars
    in slightly different blues read as a mistake, and the tokens for text on
    this colour already exist because the masthead needed them.

    Kept deliberately quiet. A dark slab puts visual weight on the least
    important content on the page, so nothing here grows: same type size, same
    padding, links in `--rf-navy-text` rather than white. The point is that the
    page has an end and that the legal links are findable in it — Kontakt,
    Uvjeti, Prava potrošača and Prijava sadržaja are exactly what somebody goes
    hunting for, and three of the four are reachable-from-every-page duties.

    Reaches the member area and the sell wizard, like the masthead and for the
    same reason: a dark footer on some pages and a white one on others is worse
    than either. The backoffice has its own shell and is untouched.
*/
.sitefoot {
    border-top: 0;
    background: var(--rf-navy);
    color: var(--rf-navy-text);
}

.sitefoot a,
.sitefoot a:visited {
    color: var(--rf-navy-text);
}

/* White on hover, not `--brand`: the base file's hover colour is #0f4c81, which
   on this navy is all but invisible. */
.sitefoot a:hover,
.sitefoot a:focus-visible {
    color: #fff;
}
