/* Redesign 2026-10-15, second handover: guide_fees. Built from tokens.css; shared components live in ui.css. */

/* ═══════════════════════════════════════════════════════════════════════
   Kako licitirati, additions (KakoLicitirati.dc.html, 86) and the phone
   version (KakoLicitiratiMobile.dc.html, 88). The base layout is in ui.css.
   ═══════════════════════════════════════════════════════════════════════ */

/* Desktop-only and phone-only copies of the same thing. */
.guide--phone { display: none; }

/* Every jump chip is a full touch target. */
.guidechips a, .guidechips a:visited { min-height: var(--touch-target); }

/* Sliders and inline links in running text get a full touch target without
   moving the text around them. */
.guidesim__range input { min-height: var(--touch-target); }

/* The sliders as the design draws them: a solid blue thumb, the track blue
   up to it and grey after. `--fill` is set by bid_simulator_controller.js;
   the input itself stays 44 px tall, so the hit area does not shrink. */
.guidesim__range input[type="range"] {
    -webkit-appearance: none; appearance: none; display: block; height: var(--touch-target); padding: 0;
    background: transparent; cursor: pointer;
}
.guidesim__range input[type="range"]::-webkit-slider-runnable-track {
    height: 6px; border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--blue-700) var(--fill, 50%), var(--border-strong) var(--fill, 50%));
}
.guidesim__range input[type="range"]::-moz-range-track { height: 6px; border-radius: var(--radius-pill); background: var(--border-strong); }
.guidesim__range input[type="range"]::-moz-range-progress { height: 6px; border-radius: var(--radius-pill); background: var(--blue-700); }
.guidesim__range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin-top: -6px;
    border: 0; border-radius: 50%; background: var(--blue-700); box-shadow: none;
}
.guidesim__range input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border: 0; border-radius: 50%; background: var(--blue-700); box-shadow: none; }
.guidesim__range input[type="range"]:focus-visible { outline: 2px solid var(--blue-700); outline-offset: 2px; border-radius: var(--radius-sm); }
.guidefaq p a, .feesteps__after a { display: inline-block; padding: 12px 0; margin: -12px 0; }

/* The increments table as a bordered card: a collapsed table drops its radius. */
.guide--bidding .guidetable, .feetable { border-collapse: separate; border-spacing: 0; }

/* Simulator: the values in their bar colours, bars, the result card, the steps. */
.guidesim__range--mine b { color: var(--blue-700); }
.guidesim__range--other b { color: var(--orange-600); }
.guidesim__rangehead b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.guidesim__result { display: flex; flex-direction: column; gap: var(--space-4); }
.guidesim__bars { display: flex; flex-direction: column; gap: var(--space-3); }
.guidesim__bar { margin: 0; display: flex; flex-direction: column; gap: var(--space-1); font: 700 12px/1.3 var(--font-sans); color: var(--ink-2); }
.guidesim__bar span { display: block; height: 14px; border-radius: var(--radius-pill); background: var(--tone-slate); overflow: hidden; }
.guidesim__fill { display: block; width: 0; height: 100%; border-radius: var(--radius-pill); transition: width var(--duration-slow) var(--ease-out); }
.guidesim__fill--mine { background: var(--blue-700); }
.guidesim__fill--other { background: var(--orange-600); }
.guidesim__card { padding: var(--space-4); border-radius: var(--radius-md); background: var(--surface); }
.guidesim__card .guidesim__pay { margin: 0; font-size: 13px; }
.guidesim__card .guidesim__price { margin: var(--space-1) 0; font-size: 32px; line-height: 38px; letter-spacing: -0.02em; white-space: nowrap; }
.guidesim__result .guidesim__why { margin: 0; padding-left: var(--space-5); font: 500 13px/1.7 var(--font-sans); color: var(--ink-2); }
/* The site resets every `li` to no marker; these three lines are numbered. */
.guidesim__result .guidesim__why li { list-style: decimal; }
.guidesim__note { margin: 0; font: 500 12px/1.5 var(--font-sans); color: var(--muted); }

/* Anti-sniping: the text beside a worked timeline. */
.guidesnipe { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); align-items: center; }
.guidetimeline { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--space-3); }
.guidetimeline li { display: grid; grid-template-columns: 112px minmax(0, 1fr) 52px; align-items: center; gap: var(--space-3); font: 700 13px/1.3 var(--font-sans); }
.guidetimeline__label { color: var(--blue-100); }
.guidetimeline b { text-align: right; font-variant-numeric: tabular-nums; }
/* The example's scale runs from 10:44 to 10:57 (13 minutes): the planned end
   (10:54) sits at 10/13, the first new end (10:55) at 11/13, the second
   (10:57) at the end. RenderBiddingGuide::DEFAULT_WINDOW_MINUTES is 3. */
.guidetimeline__track {
    --track: color-mix(in srgb, var(--blue-700) 45%, var(--navy-900));
    --at: calc(100% * 10 / 13);
    position: relative; height: 12px; border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--track) var(--at), var(--orange-600) var(--at), var(--orange-600) var(--to, 0%), var(--track) var(--to, 0%));
}
.guidetimeline__track--first { --to: calc(100% * 11 / 13); }
.guidetimeline__track--second { --to: 100%; }
.guidetimeline__track--plan { background: var(--track); }
.guidetimeline__track--plan::after { content: ""; position: absolute; left: var(--at); top: -6px; width: 2px; height: 24px; background: var(--peach-200); }

@media (max-width: 900px) {
    .guidesnipe { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
    .guide--desk { display: none !important; }
    .guide--phone { display: revert; }

    .hero--guide .hero__inner--single { padding-top: var(--space-5); padding-bottom: var(--space-6); }
    .hero--guide .hero__lead { margin-top: var(--space-2); font-size: 16px; }
    .guide--bidding { gap: var(--space-6); padding-top: var(--space-4); }
    .guide--bidding .guide__h2 { margin-bottom: var(--space-3); font-size: 20px; line-height: 26px; }

    /* Steps: the number beside the text, one card per step. */
    .guide--bidding .guidesteps { gap: var(--space-3); }
    .guide--bidding .guidesteps__item { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: var(--space-3); padding: var(--space-4); }
    .guide--bidding .guidesteps__n { grid-row: 1 / span 2; color: var(--peach-200); }
    .guide--bidding .guidesteps h3 { margin: 4px 0 var(--space-1); }
    .guide--bidding #koraci > .guide__h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

    /* Simulator: two sliders, the result on its ground, a note under it. */
    .guidesim { gap: var(--space-3); padding: var(--space-4); }
    .guidesim__controls > .guide__lead, .guidesim__range--start, .guidesim__first, .guidesim__bars, .guidesim__result .guidesim__why { display: none; }
    .guidesim__range { margin-top: var(--space-4); }
    .guidesim__result { padding: var(--space-4); }
    .guidesim__card { padding: 0; background: none; }
    .guidesim__card .guidesim__price { font-size: 28px; line-height: 34px; }
    .guidesim__card .guidesim__pay { font-size: 14px; }

    /* Increments: the table without its header. */
    .guide--bidding .guidesplit { gap: 0; }
    .guide--bidding .guidetable thead { display: none; }
    .guide--bidding .guidetable tr:first-child td { border-top: 0; }
    .guide--bidding .guidetable td { font-size: 15px; }

    .guidesnipe { padding: var(--space-4); }
    .guidesnipe .guide__h2 { font-size: 18px; line-height: 24px; margin-bottom: var(--space-2); }
    .guidesnipe p { font-size: 13px; }
    .guidetimeline { display: none; }

    .guide--bidding .guidefaq summary { padding: 0 var(--space-4); }
    .guide--bidding .guidefaq p { padding: 0 var(--space-4) var(--space-4); }

    /* The call to action is the one orange button, full width. */
    .guide--bidding .guidecta { padding: 0; border: 0; background: none; }
    .guide--bidding .guidecta__actions { width: 100%; }
    .guide--bidding .guidecta .btn--primary { width: 100%; min-height: 54px; border-radius: var(--radius-lg); font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .guidesim__fill { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Naknade (Naknade.dc.html, 87)
   ═══════════════════════════════════════════════════════════════════════ */
.fees__notices { display: flex; flex-direction: column; gap: var(--space-3); }
.fees__notices .alert { margin: 0; }
/* The draft banner is a warning here, not an error (README "Upozorenje"). */
.fees__notices .alert-danger { background: var(--amber-100); border-color: #F3DDB4; color: var(--amber-800); }
.fees__notices .alert-danger .muted { color: var(--amber-800); }

/* The three facts. */
.feecards { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.feecards__item { padding: var(--space-6) var(--space-5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.feecards__icon { display: block; color: var(--blue-700); }
.feecards__title { margin: var(--space-3) 0 var(--space-2); font: 800 18px/1.3 var(--font-sans); color: var(--ink); }
.feecards__item p { margin: 0; font: 500 14px/1.6 var(--font-sans); color: var(--ink-2); }

/* "Koliko iznosi naknada": the row headers are ordinary text, the fee on the right. */
.fees__caption { margin-top: var(--space-3); font-size: 13px; color: var(--muted); }
.feetable tbody th { padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); background: var(--surface); font: 500 14px/1.4 var(--font-sans); color: var(--ink); }
.feetable td { vertical-align: middle; }
.feetable td b { font-weight: 800; white-space: nowrap; }
.fees__vat { margin: var(--space-2) 0 0; font: 500 13px/1.5 var(--font-sans); color: var(--muted); }
.feetable__note { display: block; margin-top: 2px; font: 500 12px/1.4 var(--font-sans); color: var(--muted); }

/* An amount the schedule has no answer for: never a made-up number. */
.feeunknown {
    display: inline-flex; align-items: center; min-height: 24px; padding: 0 var(--space-2);
    border: 1.5px dashed var(--orange-600); border-radius: var(--radius-sm); background: var(--amber-100);
    color: var(--amber-800); font: 800 13px/1 var(--font-sans); white-space: nowrap;
}

/* Calculator. */
.feecalc__card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-6); padding: var(--space-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.feecalc__title { margin: 0; }
.feecalc__lead { margin: var(--space-1) 0 var(--space-4); color: var(--muted); }
.feecalc__label { display: block; margin-bottom: var(--space-2); font: 800 13px/1.3 var(--font-sans); color: var(--ink); }
.feecalc__field { position: relative; }
.feecalc__input {
    width: 100%; height: 56px; padding: 0 var(--space-12) 0 var(--space-4);
    border: 1px solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface);
    color: var(--ink); font: 800 20px/1 var(--font-sans); font-variant-numeric: tabular-nums;
}
.feecalc__input:focus-visible { outline: 2px solid var(--blue-700); outline-offset: 2px; }
.feecalc__input[aria-invalid="true"] { border-color: var(--red-700); }
.feecalc__unit { position: absolute; right: var(--space-4); top: 50%; transform: translateY(-50%); font: 700 18px/1 var(--font-sans); color: var(--ink-2); }
.feecalc__error { margin: var(--space-2) 0 0; font: 600 13px/1.45 var(--font-sans); color: var(--red-700); }
.feecalc__error[hidden] { display: none; }
.feecalc__presets { margin-top: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.feecalc__preset { min-height: var(--touch-target); cursor: pointer; font-size: 14px; font-variant-numeric: tabular-nums; }
.feecalc__preset:hover { border-color: var(--blue-700); }
.feecalc__preset.is-current { background: var(--blue-100) !important; border-color: var(--blue-700) !important; color: var(--blue-700) !important; }
.feecalc__result { align-self: stretch; padding: var(--space-5); border-radius: var(--radius-lg); background: var(--ground); }
.feecalc__rows { margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.feecalc__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); font: 500 15px/1.4 var(--font-sans); color: var(--ink-2); }
.feecalc__row dd { margin: 0; color: var(--ink); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.feecalc__row--net { margin-top: var(--space-1); padding-top: var(--space-4); border-top: 1px solid var(--border-strong); align-items: center; }
.feecalc__row--net dt { font-weight: 800; color: var(--ink); }
.feecalc__row--net dd { font: 800 32px/1.1 var(--font-sans); letter-spacing: -0.02em; }
.feecalc__note { margin: var(--space-3) 0 0; font: 500 12px/1.5 var(--font-sans); color: var(--muted); }
/* The worked examples: a note across the foot of the calculator card. */
.feecalc__examples { grid-column: 1 / -1; padding-top: var(--space-4); border-top: 1px solid var(--border); }
.feecalc__examplehead { margin: 0 0 var(--space-1); font: 800 13px/1.4 var(--font-sans); color: var(--ink); }
.feecalc__list { margin: 0; padding-left: var(--space-5); font: 500 13px/1.7 var(--font-sans); color: var(--muted); }
.feecalc__list li { list-style: disc; }

/* How the fee is paid, then the legal paragraphs. */
.feesteps h3 { font-size: 16px; }
.feesteps__after { margin-top: var(--space-4); }
.feesteps__after a { font-weight: 800; }
.fees__rules { margin-top: var(--space-6); max-width: 72ch; }
.fees__rules p { margin: 0 0 var(--space-3); font: 500 15px/1.6 var(--font-sans); color: var(--ink-2); }
.fees [id^="naknade-"] { scroll-margin-top: var(--space-4); }

@media (max-width: 900px) {
    .feecards, .feecalc__card { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
    .fees { gap: var(--space-8); padding-top: var(--space-4); }
    .feecards { gap: var(--space-3); }
    .feecards__item { padding: var(--space-4); }
    .feecalc__card { padding: var(--space-4); gap: var(--space-4); }
    /* The design's phone page has no contents chips; the app bar leads back. */
    .feechips { display: none; }
    .feecalc__row--net dd { font-size: 28px; }
    .feetable td b { white-space: normal; }
}
