/* "Czas wrocic" (rebooking invitations). Built on the app's own tokens and primitives (.card, .card2, .row, .btn, .btn2, .chip, .seg, .opt, .toggle,
   .alert, .kv, .quote, .sheet): same type, same colours, same glass, same 44 px+ controls, dark and light, reduced motion. Nothing here changes
   an existing rule; every class starts with wb-. Reference language: owner's Revolut screens (one decision per screen, white pill + grey pill,
   cards without lines, a quiet micro-label above the hero, an empty state that is designed) and the app's own decision card. */

/* ---- Start card and client card ---- */
.wb-start { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 76px; padding: 12px 16px; text-align: left; border-radius: 24px; }
.wb-start .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wb-count-soft { background: var(--card); color: var(--fg); }
.wb-ago { flex: none; font-size: 15px; font-weight: 600; color: var(--fg2); }
.wb-client { display: flex; flex-direction: column; gap: 8px; width: 100%; text-align: left; align-items: stretch; }
.wb-clhd { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---- the list ---- */
.wb-go { gap: 10px; }
.wb-count { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--on-pill); color: var(--pill); font-size: 14px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.wb-row .ini { flex: none; }
.wb-why { width: 100%; text-align: left; }

/* ---- the card, one decision at a time ---- */
.wb-kicker { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--fg3); padding: 4px 6px 0; }
.wb-pos { font-variant-numeric: tabular-nums; color: var(--fg); } /* C1: --fg2 on the bright top of this screen measured 3.89:1 */
.wb-msg .dmore { min-height: 44px; margin: -13px 0 !important; padding: 0 2px; } /* C1: here it is a real button, so a 44 pt target; the layout keeps its size */
.wb-card { gap: 14px; }
.wb-card:focus { outline: none; }
.wb-reason { display: flex; flex-direction: column; gap: 10px; background: var(--card3); border-radius: 18px; padding: 12px 14px; }
.wb-tl { display: flex; flex-direction: column; gap: 6px; }
.wb-bar { position: relative; height: 8px; border-radius: 4px; background: var(--card2); }
.wb-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); transition: width 420ms var(--ease); }
.wb-tick { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--fg); }
.wb-tlab { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; line-height: 16px; color: var(--fg3); font-weight: 500; }
.wb-tlab b { color: var(--fg); font-weight: 700; }
.wb-basis { display: flex; gap: 12px; align-items: flex-start; padding: 2px 2px 0; }
.wb-basis svg { color: var(--ok); margin-top: 1px; }
.wb-msg { background: var(--field); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.wb-msgmeta { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: baseline; }
.wb-msgmeta .s14 { color: var(--fg); min-width: 0; }
.wb-body { font-size: 15px; line-height: 21px; color: var(--fg2); white-space: pre-line; overflow-wrap: anywhere; }
.clamp3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
#wbText.quote.final { max-height: 28vh; }

/* ---- the sheets of this module (they start with <i class="wb-sheetmark">, so no rule of the other sheets changes) ----
   Nothing inside a sheet shrinks (the app's .btn has a fixed 52px height and used to be squeezed to ~25px in a tall sheet), the sheet scrolls,
   the exact message is shown whole, and the buttons that decide stay pinned to the bottom edge, with a soft fade over what scrolls beneath. */
.sheet:has(> .wb-sheetmark) > * { flex-shrink: 0; }
.sheet:has(> .wb-sheetmark) #wbText.quote.final { max-height: none; }
.wb-actions { position: sticky; bottom: -30px; z-index: 2; display: flex; flex-direction: column; gap: 10px; margin: -18px -16px -30px; padding: 18px 16px 30px; background: linear-gradient(to bottom, transparent 0, var(--sheet) 18px); }
.wb-when { display: flex; gap: 8px; align-items: center; padding: 0 6px; color: var(--fg2); }
.wb-when svg { color: var(--fg3); }
.wb-approve { gap: 10px; }
.wb-done { padding-top: 36px; padding-bottom: 28px; }

/* ---- settings ---- */
.wb-rule { padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.wb-rule + .wb-rule::before { content: ""; position: absolute; left: 16px; right: 0; top: 0; height: .5px; background: var(--sep); }
.wb-rule.is-group { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n t" "s p"; align-items: center; gap: 6px 12px; }
.wb-rule.is-group .wb-n { grid-area: n; min-width: 0; }
.wb-rule.is-group .wb-t { grid-area: t; }
.wb-rule.is-group .wb-t::before { content: ""; position: absolute; inset: -7px -6px -6px; }   /* the 51 x 31 switch keeps its look; its touch area is 63 x 44, and stops short of the stepper below it */
.wb-rule.is-group .wb-s { grid-area: s; min-width: 0; }
.wb-rule.is-group .wb-p { grid-area: p; }
.wb-src .k { flex: none; white-space: nowrap; }
.wb-src select { flex: 1; min-width: 0; max-width: none; }
.wb-rulehd { display: flex; align-items: center; gap: 12px; }
.wb-rulehd .grow { flex: 1; min-width: 0; }
.wb-rulestep { display: flex; justify-content: flex-end; }
.wb-step { display: inline-flex; align-items: center; height: 44px; border-radius: 22px; background: var(--card); box-shadow: var(--rim); }
.wb-step button { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; color: var(--fg); }
.wb-step button:active { background: var(--card2); }
.wb-val { min-width: 84px; text-align: center; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wb-minus, .wb-plus { position: relative; display: block; width: 14px; height: 2px; border-radius: 1px; background: currentColor; }
.wb-plus::after { content: ""; position: absolute; left: 6px; top: -6px; width: 2px; height: 14px; border-radius: 1px; background: currentColor; }

/* ---- sheets ---- */
.wb-mark { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px; padding: 12px 16px; }
.wb-mark + .wb-mark { box-shadow: inset 0 .5px 0 var(--sep); }
.wb-mark .grow { min-width: 0; }
.wb-mbtn { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wb-mbtn .btn2 { width: 100%; padding: 0 12px; font-size: 15px; }
.wb-result .kv .k { font-size: 16px; }
.wb-result .kv { padding-block: 10px; }
.wb-hist .k { flex: none; white-space: nowrap; }
.wb-hist .v { flex: 1; min-width: 0; }

@media (max-width: 360px) { .wb-val { min-width: 70px; } }
@media (prefers-reduced-motion: reduce) { .wb-fill { transition: none !important; } }
