/* Petrol.cy map app — design system (ported from the CY Petrol design prototype).
   Light theme, Inter, mobile-first; on desktop the app is a centered phone column. */

/* Colour tokens live in tokens.css (loaded before this file). */

* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--c-ink);
    background: radial-gradient(120% 120% at 50% 0%, #1B2330 0%, #11161F 55%, #0B0E14 100%);
}
button, input, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 0; height: 0; }

@keyframes fwSlideUp { from { transform: translateY(40px); } to { transform: translateY(0); } }
@keyframes fwFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fwToast { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes fwPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes fwSlideLeft { from { transform: translateX(40px); opacity: .6; } to { transform: translateX(0); opacity: 1; } }

/* ---------- phone frame ---------- */
.fw-stage { position: fixed; inset: 0; display: grid; place-items: center; padding: 22px; }
.fw-frame {
    position: relative;
    width: min(420px, 100vw);
    height: min(900px, 100vh);
    height: min(900px, 100dvh);
    background: var(--c-cloud);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 50px 100px -20px rgba(16,32,51,0.55), 0 0 0 1px rgba(255,255,255,0.06);
}
.fw-app { position: absolute; inset: 0; overflow: hidden; }
[x-cloak] { display: none !important; }

@media (max-width: 480px) {
    .fw-stage { padding: 0; }
    .fw-frame { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
}

/* ---------- map container (Leaflet) ---------- */
/* z-index:0 confines Leaflet's internal pane z-indexes below the UI chrome. */
.fw-map { position: absolute; inset: 0; overflow: hidden; z-index: 0; background: #dfe7ec; }
.leaflet-container { font: inherit; background: #aadaff; }
.leaflet-control-attribution { font-size: 10px; }

/* Leaflet price markers (divIcon) */
.fw-mk-wrap { width: 0; height: 0; }
.fw-mk { position: absolute; transform: translate(-50%, -100%); transform-origin: bottom center;
    display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.fw-mk.fw-mk--selected { transform: translate(-50%, -100%) scale(1.12); }
.fw-mk__pill { display: inline-flex; align-items: center; gap: 4px; background: var(--c-white);
    color: var(--c-ink); font-weight: 800; font-size: 13.5px; padding: 6px 9px; border-radius: 11px;
    box-shadow: 0 3px 10px rgba(16,32,51,0.22); white-space: nowrap; }
.fw-mk__low { font-size: 9.5px; font-weight: 800; opacity: .8; }
.fw-mk__tail { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent;
    border-top: 7px solid var(--c-white); filter: drop-shadow(0 2px 1px rgba(16,32,51,0.15)); }
.fw-mk__dot { width: 7px; height: 7px; border-radius: 999px; background: var(--c-ink); margin: 1px auto 0; box-shadow: 0 0 0 2px #fff; }
.fw-mk--best .fw-mk__pill { background: var(--c-green); color: #fff; }
.fw-mk--best .fw-mk__tail { border-top-color: var(--c-green); }
.fw-mk--cheap .fw-mk__pill { background: var(--c-yellow); color: #5C3D00; }
.fw-mk--cheap .fw-mk__tail { border-top-color: var(--c-yellow); }
.fw-mk--outdated .fw-mk__pill { background: #EDEFF2; color: var(--c-muted); }
.fw-mk--outdated .fw-mk__tail { border-top-color: #EDEFF2; }
.fw-mk--selected .fw-mk__pill { box-shadow: 0 0 0 3px var(--c-white), 0 0 0 5px var(--c-primary), 0 8px 18px rgba(16,32,51,0.22); }
.fw-mk--selected .fw-mk__dot { background: var(--c-primary); }

/* Leaflet user-location dot */
.fw-userdot-wrap { width: 0; height: 0; }
.fw-userdot { position: absolute; transform: translate(-50%, -50%); }
.fw-userdot__pulse { position: absolute; left: -14px; top: -14px; width: 44px; height: 44px; border-radius: 999px; background: rgba(47,128,237,0.18); }
.fw-userdot__dot { position: relative; display: block; width: 16px; height: 16px; border-radius: 999px;
    background: var(--c-info); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }

/* ---------- (legacy) stylised map decorations — kept for reference ---------- */
.fw-map--stylised { background: linear-gradient(160deg,#DCEAF2 0%,#E8EFEA 60%,#F0ECDD 100%); }
.fw-map__sea { position: absolute; left: -10%; bottom: -12%; width: 70%; height: 46%;
    background: #BFDDEA; border-radius: 46% 54% 60% 40% / 60% 40% 50% 50%; opacity: .9; }
.fw-map__sea2 { position: absolute; right: -14%; top: -10%; width: 46%; height: 40%;
    background: #C6E1ED; border-radius: 50%; opacity: .7; }
.fw-map__park { position: absolute; left: 54%; top: 58%; width: 30%; height: 26%;
    background: #CFE3C2; border-radius: 40% 60% 50% 50%; opacity: .8; }
.fw-map__roads { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- user location ---------- */
.fw-user { position: absolute; transform: translate(-50%,-50%); z-index: 5; }
.fw-user__pulse { position: absolute; inset: -14px; border-radius: 999px; background: rgba(47,128,237,0.18); }
.fw-user__dot { width: 16px; height: 16px; border-radius: 999px; background: var(--c-info);
    border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25); position: relative; }

/* ---------- price marker ---------- */
.fw-marker { position: absolute; transform: translate(-50%,-100%); transform-origin: bottom center;
    transition: transform .15s ease; border: none; background: none; cursor: pointer; padding: 0; z-index: 10; }
.fw-marker--badge { z-index: 20; }
.fw-marker--selected { z-index: 30; transform: translate(-50%,-100%) scale(1.12); }
.fw-marker__pill { display: inline-flex; align-items: center; gap: 4px; background: var(--c-white);
    color: var(--c-ink); font-weight: 800; font-size: 13.5px; padding: 6px 9px; border-radius: 11px;
    box-shadow: 0 3px 10px rgba(16,32,51,0.22); white-space: nowrap; }
.fw-marker__low { font-size: 9.5px; font-weight: 800; opacity: .8; }
.fw-marker__tail { width: 0; height: 0; margin: 0 auto; border-left: 5px solid transparent;
    border-right: 5px solid transparent; border-top: 7px solid var(--c-white);
    filter: drop-shadow(0 2px 1px rgba(16,32,51,0.15)); }
.fw-marker__dot { width: 7px; height: 7px; border-radius: 999px; background: var(--c-ink);
    margin: 1px auto 0; box-shadow: 0 0 0 2px #fff; }
.fw-marker--best .fw-marker__pill { background: var(--c-green); color: #fff; }
.fw-marker--best .fw-marker__tail { border-top-color: var(--c-green); }
.fw-marker--cheap .fw-marker__pill { background: var(--c-yellow); color: #5C3D00; }
.fw-marker--cheap .fw-marker__tail { border-top-color: var(--c-yellow); }
.fw-marker--outdated .fw-marker__pill { background: #EDEFF2; color: var(--c-muted); }
.fw-marker--outdated .fw-marker__tail { border-top-color: #EDEFF2; }
.fw-marker--selected .fw-marker__pill {
    box-shadow: 0 0 0 3px var(--c-white), 0 0 0 5px var(--c-primary), 0 8px 18px rgba(16,32,51,0.22); }
.fw-marker--selected .fw-marker__dot { background: var(--c-primary); }

/* ---------- top controls ---------- */
.fw-top { position: absolute; top: 14px; left: 0; right: 0; z-index: 60; padding: 0 14px;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.fw-search { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--c-white);
    border-radius: 15px; padding: 13px 15px; box-shadow: 0 6px 20px rgba(16,32,51,0.14);
    cursor: pointer; border: none; width: 100%; text-align: left; }
.fw-search__text { color: var(--c-muted); font-size: 15.5px; font-weight: 500; flex: 1; }
.fw-chiprow { display: flex; gap: 8px; pointer-events: auto; }
.fw-chip { display: inline-flex; align-items: center; gap: 7px; background: var(--c-white);
    border: none; border-radius: 13px; padding: 10px 14px; font-weight: 700; font-size: 14.5px;
    color: var(--c-ink); cursor: pointer; box-shadow: 0 4px 14px rgba(16,32,51,0.12); }
.fw-chip.is-active { background: var(--c-primary); color: #fff; }
.fw-chip__count { background: #fff; color: var(--c-primary); border-radius: 999px; font-size: 12px; padding: 1px 7px; }
.fw-chip .fw-i-primary { color: var(--c-primary); }

/* Demo-data notice (FUELWISE_DATA_SOURCE=static): a pill under the chips on
   phones, top-left over the map on desktop. Text only, never takes clicks. */
.fw-demo { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
    background: var(--c-white); color: var(--c-ink); border-left: 4px solid var(--c-warning);
    border-radius: 11px; padding: 7px 12px; font-size: 13px; font-weight: 600; line-height: 1.3;
    box-shadow: 0 4px 14px rgba(16,32,51,0.12); pointer-events: none; }
.fw-demo svg { color: var(--c-warning); flex: none; }
.fw-demo--dt { position: absolute; top: 16px; left: 16px; z-index: 20; max-width: calc(100% - 32px); }

/* ---------- floating buttons ---------- */
.fw-fabs { position: absolute; right: 14px; bottom: 242px; display: flex; flex-direction: column; gap: 10px; z-index: 65; }
.fw-iconbtn { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
    border: 1px solid var(--c-line); background: var(--c-white); color: var(--c-ink); cursor: pointer;
    box-shadow: 0 2px 8px rgba(16,32,51,0.08); flex: none; }
.fw-iconbtn.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ---------- bottom sheet ---------- */
.fw-sheet { position: absolute; left: 0; right: 0; background: var(--c-white);
    border-radius: 22px 22px 0 0; box-shadow: 0 -8px 30px rgba(16,32,51,0.16); z-index: 70;
    display: flex; flex-direction: column; transition: transform .32s cubic-bezier(.32,.72,0,1);
    /* Where app.js puts the collapsed sheet (navH 58, peek 178, 90% of the area above the nav),
       so its first inline style moves nothing: no layout shift while the scripts load. */
    bottom: 58px; height: calc((100% - 58px) * 0.9); transform: translateY(calc(100% - 178px)); }
.fw-sheet.is-dragging { transition: none; }
.fw-sheet__grab { padding: 10px 0 6px; cursor: grab; flex: none; touch-action: none; }
.fw-sheet__handle { width: 40px; height: 5px; border-radius: 999px; background: #D5DBE3; margin: 0 auto; }
.fw-sheet__body { flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.fw-sheet__pad { padding: 0 14px 24px; }
.fw-rec { margin-bottom: 14px; }
.fw-rec__head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.fw-rec__sub { font-size: 13px; color: var(--c-muted); font-weight: 600; }
.fw-secthead { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 10px; }
.fw-secthead__title { font-size: 17px; font-weight: 700; color: var(--c-ink); }
.fw-secthead__count { font-size: 13px; font-weight: 600; color: var(--c-primary); }
.fw-list { display: flex; flex-direction: column; gap: 10px; }

/* ---------- fuel chips (segmented) ---------- */
.fw-fuelchips { display: flex; gap: 6px; background: #EEF1F5; padding: 4px; border-radius: 13px; }
.fw-fuelchips__btn { flex: 1; border: none; cursor: pointer; border-radius: 10px; padding: 8px 6px;
    font-weight: 700; font-size: 13.5px; min-height: 36px; background: transparent; color: var(--c-muted);
    text-decoration: none; text-align: center; transition: all .15s; }
.fw-fuelchips__btn.is-active { background: var(--c-white); color: var(--c-primary);
    box-shadow: 0 1px 4px rgba(16,32,51,0.12); }

/* ---------- station card ---------- */
.fw-card { background: var(--c-white); border-radius: 20px; padding: 14px; border: 1px solid var(--c-line);
    box-shadow: 0 1px 2px rgba(16,32,51,0.04); display: flex; flex-direction: column; gap: 10px; }
.fw-card--clickable { cursor: pointer; }
.fw-card__top { display: flex; align-items: flex-start; gap: 10px; }
.fw-card__head { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.fw-card__name { font-size: 16px; font-weight: 700; color: var(--c-ink); line-height: 1.2; }
.fw-card__addr { font-size: 13px; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-card__fav { border: none; background: none; cursor: pointer; color: var(--c-muted); padding: 2px; flex: none; }
.fw-card__fav.is-fav { color: var(--c-error); }
.fw-card__main { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.fw-price { display: flex; align-items: baseline; gap: 6px; }
.fw-price__val { font-size: 26px; font-weight: 800; color: var(--c-ink); letter-spacing: -0.01em; }
.fw-price__unit { font-size: 13px; font-weight: 600; color: var(--c-muted); }
.fw-card__trip { text-align: right; }
.fw-card__trip-d { font-size: 14px; font-weight: 700; color: var(--c-ink); }
.fw-card__save { font-size: 13px; font-weight: 700; color: var(--c-green); }
.fw-card__meta { display: flex; align-items: center; justify-content: space-between; }
.fw-card__actions { display: flex; gap: 8px; }

/* ---------- badges ---------- */
.fw-badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 12px;
    line-height: 1; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.fw-badge--mini { font-size: 11px; padding: 4px 7px; }
.fw-badge--best_value { background: var(--c-green-soft); color: var(--c-green-ink); }
.fw-badge--cheapest { background: var(--c-yellow-soft); color: #8A5B00; }
.fw-badge--nearest { background: var(--c-primary-soft); color: var(--c-primary); }
.fw-badge--nearby { background: #EEF1F5; color: var(--c-slate); }
.fw-badge--outdated { background: #F0F2F5; color: var(--c-muted); }
.fw-badge--favorite { background: var(--c-error-soft); color: var(--c-error); }

/* ---------- buttons ---------- */
.fw-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700;
    font-size: 15.5px; border: none; cursor: pointer; border-radius: 14px; padding: 13px 18px; min-height: 44px;
    transition: transform .08s ease, background .15s ease; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fw-btn:active { transform: scale(0.97); }
.fw-btn--small { font-size: 14px; padding: 9px 14px; }
.fw-btn--full { width: 100%; }
.fw-btn--primary { background: var(--c-primary); color: #fff; box-shadow: 0 6px 16px rgba(11,79,138,0.28); }
.fw-btn--secondary { background: var(--c-white); color: var(--c-primary); border: 1.5px solid var(--c-line); }
.fw-btn--ghost { background: transparent; color: var(--c-muted); }
.fw-btn--green { background: var(--c-green); color: #fff; box-shadow: 0 6px 16px rgba(23,166,114,0.28); }
.fw-btn--danger { background: var(--c-error-soft); color: var(--c-error); }

/* ---------- freshness ---------- */
.fw-fresh { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 500; color: var(--c-muted); }
.fw-fresh--stale { color: var(--c-warning); }

/* ---------- savings box ---------- */
.fw-savings { background: var(--c-green-soft); border-radius: 14px; padding: 12px 14px;
    display: flex; flex-direction: column; gap: 2px; }
.fw-savings__label { font-size: 12.5px; font-weight: 700; color: var(--c-green-ink);
    text-transform: uppercase; letter-spacing: .04em; }
.fw-savings__amount { font-size: 22px; font-weight: 800; color: var(--c-green-ink); }
.fw-savings__sub { font-size: 13px; color: #2A7D5E; }

/* ---------- facilities ---------- */
.fw-facs { display: flex; flex-wrap: wrap; gap: 8px; }
.fw-fac { display: inline-flex; align-items: center; gap: 6px; background: var(--c-cloud);
    border: 1px solid var(--c-line); color: var(--c-slate); font-size: 13px; font-weight: 600;
    padding: 7px 11px; border-radius: 10px; }

/* ---------- bottom nav ---------- */
.fw-nav { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.94);
    backdrop-filter: blur(12px); border-top: 1px solid var(--c-line); display: flex; z-index: 80; }
.fw-nav__btn { flex: 1; border: none; background: none; cursor: pointer; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 3px; color: var(--c-muted); padding: 8px 0 10px; }
.fw-nav__btn.is-active { color: var(--c-primary); }
.fw-nav__label { font-size: 11px; font-weight: 500; }
.fw-nav__btn.is-active .fw-nav__label { font-weight: 700; }

/* ---------- toast ---------- */
.fw-toast { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--c-ink);
    color: #fff; padding: 11px 16px; border-radius: 13px; font-size: 14px; font-weight: 600; display: flex;
    align-items: center; gap: 8px; box-shadow: 0 10px 26px rgba(16,32,51,0.34); z-index: 200; white-space: nowrap;
    animation: fwToast .25s ease; }
.fw-toast .fw-i-green { color: var(--c-green); }

/* ---------- station preview ---------- */
.fw-preview { position: absolute; left: 12px; right: 12px; z-index: 90; background: var(--c-white);
    border-radius: 22px; padding: 16px; box-shadow: 0 16px 44px rgba(16,32,51,0.28);
    animation: fwSlideUp .28s cubic-bezier(.32,.72,0,1); }
.fw-preview__top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.fw-preview__head { flex: 1; }
.fw-preview__name { font-size: 18px; font-weight: 700; color: var(--c-ink); }
.fw-preview__addr { font-size: 13px; color: var(--c-muted); }
.fw-preview__close { border: none; background: var(--c-cloud); border-radius: 999px; width: 32px; height: 32px;
    display: grid; place-items: center; cursor: pointer; color: var(--c-muted); flex: none; }
.fw-preview__price { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.fw-preview__fuel { font-size: 12.5px; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.fw-preview__val { font-size: 32px; font-weight: 800; color: var(--c-ink); letter-spacing: -0.02em; }
.fw-preview__unit { font-size: 14px; font-weight: 600; color: var(--c-muted); }
.fw-preview__trip { text-align: right; }
.fw-preview__actions { display: flex; gap: 10px; }

/* ---------- overlays / modals ---------- */
.fw-overlay { position: absolute; inset: 0; background: var(--c-white); display: flex; flex-direction: column;
    z-index: 120; animation: fwFade .2s ease; }
.fw-overlay__head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 12px 10px; border-bottom: 1px solid var(--c-line); flex: none; }
.fw-overlay__title { font-size: 16px; font-weight: 700; color: var(--c-ink); }
.fw-overlay__body { flex: 1; overflow-y: auto; padding: 12px 16px 28px; }
.fw-iconbtn-plain { width: 40px; height: 40px; border-radius: 12px; border: none; background: none;
    display: grid; place-items: center; cursor: pointer; color: var(--c-ink); flex: none; }
.fw-iconbtn-plain.is-fav { color: var(--c-error); }

.fw-modal { position: absolute; inset: 0; z-index: 130; }
.fw-modal__scrim { position: absolute; inset: 0; background: rgba(16,32,51,0.4); animation: fwFade .2s ease; }
.fw-modal__panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92%; background: var(--c-white);
    border-radius: 22px 22px 0 0; display: flex; flex-direction: column; animation: fwSlideUp .3s cubic-bezier(.32,.72,0,1); }
.fw-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.fw-modal__title { font-size: 19px; font-weight: 700; color: var(--c-ink); }
.fw-modal__body { overflow-y: auto; padding: 4px 18px 8px; }
.fw-modal__foot { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--c-line); align-items: center; }

/* ---------- section label, radio/check rows ---------- */
.fw-section { font-size: 13px; font-weight: 700; color: var(--c-muted); text-transform: uppercase;
    letter-spacing: .05em; margin: 0 0 9px; }
.fw-row { display: flex; align-items: center; gap: 12px; width: 100%; border: none; background: none;
    padding: 11px 2px; cursor: pointer; text-align: left; }
.fw-row__label { font-size: 15.5px; color: var(--c-ink); }
.fw-radio { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--c-line);
    display: grid; place-items: center; flex: none; }
.fw-row.is-checked .fw-radio { border-color: var(--c-primary); }
.fw-radio__dot { width: 11px; height: 11px; border-radius: 999px; background: var(--c-primary); display: none; }
.fw-row.is-checked .fw-radio__dot { display: block; }
.fw-row.is-checked .fw-row__label { font-weight: 600; }
.fw-check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--c-line); background: transparent;
    display: grid; place-items: center; flex: none; color: #fff; }
.fw-row.is-checked .fw-check { border-color: var(--c-primary); background: var(--c-primary); }
.fw-check > svg { display: none; }
.fw-row.is-checked .fw-check > svg { display: block; }

/* ---------- details ---------- */
.fw-detail__title { font-size: 25px; font-weight: 800; color: var(--c-ink); margin: 0; letter-spacing: -0.01em; }
.fw-detail__addr { font-size: 14.5px; color: var(--c-muted); margin-top: 4px; }
.fw-detail__sec { margin-top: 18px; }
.fw-mainprice { background: var(--c-primary); border-radius: 20px; padding: 18px; color: #fff; }
.fw-mainprice__label { font-size: 13px; font-weight: 700; opacity: .8; text-transform: uppercase; letter-spacing: .05em; }
.fw-mainprice__row { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 10px; }
.fw-mainprice__val { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; }
.fw-mainprice__unit { font-size: 16px; opacity: .85; }
.fw-mainprice__chips { display: flex; gap: 14px; font-size: 13.5px; flex-wrap: wrap; }
.fw-chip-inv { display: inline-flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.16); padding: 5px 10px; border-radius: 9px; }
.fw-chip-inv--plain { background: none; opacity: .85; padding: 5px 0; }
.fw-otherfuels { background: var(--c-white); border: 1px solid var(--c-line); border-radius: 16px; overflow: hidden; }
.fw-otherfuels__row { display: flex; justify-content: space-between; align-items: center; padding: 13px 15px; border-top: 1px solid var(--c-line); }
.fw-otherfuels__row:first-child { border-top: none; }
.fw-otherfuels__name { font-size: 15px; color: var(--c-ink); font-weight: 500; }
.fw-otherfuels__price { font-size: 16px; font-weight: 700; color: var(--c-ink); }
.fw-chart { background: var(--c-white); border: 1px solid var(--c-line); border-radius: 16px; padding: 14px; }
.fw-chart__top { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: var(--c-muted); }
.fw-chart__trend { font-weight: 700; color: var(--c-green); }
.fw-chart__trend--up { color: var(--c-error); }
.fw-srcnote { display: flex; gap: 10px; background: var(--c-cloud); border-radius: 14px; padding: 14px; color: var(--c-slate); }
.fw-srcnote__text { font-size: 13.5px; line-height: 1.4; }
.fw-srcnote__link { margin-top: 8px; border: none; background: none; color: var(--c-primary); font-weight: 700;
    font-size: 14px; cursor: pointer; padding: 0; display: block; }

/* ---------- search overlay ---------- */
.fw-searchbar { flex: 1; display: flex; align-items: center; gap: 9px; background: var(--c-cloud);
    border-radius: 13px; padding: 11px 13px; }
.fw-searchbar input { border: none; outline: none; background: none; flex: 1; font-size: 16px; color: var(--c-ink); }
.fw-quickgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; }
.fw-quickbtn { display: flex; align-items: center; gap: 9px; background: var(--c-cloud); border: 1px solid var(--c-line);
    border-radius: 14px; padding: 14px; font-size: 15px; font-weight: 700; color: var(--c-ink); cursor: pointer; }
.fw-quickbtn .fw-i-primary { color: var(--c-primary); }
.fw-rowbtn { display: flex; align-items: center; gap: 12px; width: 100%; border: none; background: none;
    padding: 13px 2px; cursor: pointer; text-align: left; border-bottom: 1px solid var(--c-line); }
.fw-rowbtn .fw-i-primary { color: var(--c-primary); }
.fw-rowbtn .fw-i-muted { color: var(--c-muted); }
.fw-rowbtn__t { font-size: 15.5px; color: var(--c-ink); }
.fw-empty { text-align: center; padding: 50px 20px; color: var(--c-muted); }
.fw-empty__big { padding: 60px 24px; }

/* ---------- route preview ---------- */
.fw-routestats { display: flex; gap: 10px; margin-bottom: 14px; }
.fw-routestat { flex: 1; background: var(--c-cloud); border-radius: 13px; padding: 10px 12px; }
.fw-routestat__label { font-size: 12px; color: var(--c-muted); font-weight: 600; }
.fw-routestat__val { font-size: 17px; font-weight: 800; color: var(--c-ink); margin-top: 2px; }
.fw-mapapps { display: flex; gap: 8px; }
.fw-mapapp { flex: 1; border: 1.5px solid var(--c-line); background: var(--c-white); border-radius: 13px;
    padding: 11px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
    font-size: 13px; font-weight: 700; color: var(--c-ink); }
.fw-mapapp .fw-i-primary { color: var(--c-primary); }
.fw-routecard { position: absolute; left: 12px; right: 12px; bottom: 16px; background: var(--c-white);
    border-radius: 22px; padding: 18px; box-shadow: 0 16px 44px rgba(16,32,51,0.26); z-index: 20; }
.fw-routecard__to { font-size: 13px; font-weight: 700; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; }
.fw-routecard__name { font-size: 20px; font-weight: 800; color: var(--c-ink); margin: 2px 0 12px; }
.fw-routecard__save { background: var(--c-green-soft); border-radius: 12px; padding: 10px 13px; margin-bottom: 14px;
    font-size: 14px; font-weight: 700; color: var(--c-green-ink); }
.fw-float-back { position: absolute; top: 14px; left: 14px; z-index: 20; }

/* ---------- simple screens (list / favorites / settings) ---------- */
.fw-screen { position: absolute; inset: 0; background: var(--c-cloud); display: flex; flex-direction: column; }
.fw-screen__head { padding: 16px 16px 8px; flex: none; }
.fw-screen__title { font-size: 26px; font-weight: 800; color: var(--c-ink); margin: 0; }
.fw-screen__body { flex: 1; overflow-y: auto; padding: 8px 16px 24px; }
.fw-screen__controls { display: flex; gap: 8px; margin: 10px 0; }
.fw-settings-group { background: var(--c-white); border: 1px solid var(--c-line); border-radius: 16px;
    overflow: hidden; margin-bottom: 16px; }
.fw-settings-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 15px;
    border-top: 1px solid var(--c-line); }
.fw-settings-row:first-child { border-top: none; }
.fw-settings-row__k { font-size: 15px; color: var(--c-ink); }
.fw-settings-row__v { font-size: 15px; color: var(--c-muted); font-weight: 600; }
.fw-langrow { display: flex; gap: 8px; }
.fw-lang { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--c-line); background: var(--c-white);
    color: var(--c-ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.fw-lang.is-active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

/* ---------- onboarding ---------- */
.fw-onb { position: absolute; inset: 0; z-index: 140; display: flex; flex-direction: column;
    padding: 22px 22px 26px; background: linear-gradient(180deg,#fff 0%, var(--c-cloud) 100%); }
.fw-onb__brand { display: flex; align-items: center; gap: 9px; justify-content: center; margin-bottom: 6px; flex: none; }
.fw-onb__brandname { font-size: 17px; font-weight: 800; color: var(--c-ink); }
.fw-onb__content { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
.fw-onb__step { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.fw-onb__step--center { text-align: center; align-items: center; }
.fw-onb__title { font-size: 26px; font-weight: 800; color: var(--c-ink); margin: 0 0 10px; letter-spacing: -0.01em; }
.fw-onb__body { font-size: 16px; color: var(--c-muted); line-height: 1.5; margin: 0 16px; }
.fw-onb__icon { width: 64px; height: 64px; border-radius: 18px; background: var(--c-primary-soft); display: grid; place-items: center; margin: 0 auto 18px; }
.fw-onb__locicon { width: 80px; height: 80px; border-radius: 999px; background: var(--c-primary-soft); display: grid; place-items: center; margin: 0 auto 20px; }
.fw-onb__opts { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; width: 100%; }
.fw-onb__opt { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 15px 16px;
    border-radius: 15px; border: 2px solid var(--c-line); background: var(--c-white); cursor: pointer;
    font-size: 16px; font-weight: 700; color: var(--c-ink); }
.fw-onb__opt.is-sel { border-color: var(--c-primary); background: var(--c-primary-soft); }
.fw-onb__radio { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--c-line); display: grid; place-items: center; flex: none; }
.fw-onb__opt.is-sel .fw-onb__radio { border-color: var(--c-primary); }
.fw-onb__radiodot { width: 11px; height: 11px; border-radius: 999px; background: var(--c-primary); display: none; }
.fw-onb__opt.is-sel .fw-onb__radiodot { display: block; }
.fw-onb__art { flex: 1; display: grid; place-items: center; padding: 10px 0 24px; }
.fw-onb__map { position: relative; width: 220px; height: 190px; border-radius: 28px; overflow: hidden;
    background: linear-gradient(160deg,#DCEAF2,#E8EFEA 60%,#F0ECDD); box-shadow: 0 14px 40px rgba(16,32,51,0.16); }
.fw-onb__mk { position: absolute; display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 13px;
    padding: 6px 9px; border-radius: 10px; box-shadow: 0 4px 12px rgba(16,32,51,0.2); white-space: nowrap; }
.fw-onb__mk--best { background: var(--c-green); color: #fff; }
.fw-onb__mk--cheap { background: var(--c-yellow); color: #5C3D00; }
.fw-onb__mk--plain { background: #fff; color: var(--c-ink); }
.fw-onb__foot { flex: none; margin-top: 18px; }
.fw-onb__dots { display: flex; gap: 7px; justify-content: center; margin-bottom: 20px; }
.fw-onb__dot { width: 8px; height: 8px; border-radius: 999px; background: var(--c-line); transition: all .25s; }
.fw-onb__dot.is-on { width: 22px; background: var(--c-primary); }
.fw-onb__btns { display: flex; flex-direction: column; gap: 8px; }

/* filled heart when favourited (CSS fill overrides the svg fill="none") */
.is-fav .fw-i-heart, .fw-nav__btn.is-active .fw-i-heart, .fw-iconbtn.is-active .fw-i-heart { fill: currentColor; }

/* ---------- source attribution ---------- */
.fw-srcbar { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 6px 8px 2px;
    font-size: 11.5px; color: var(--c-muted); text-align: center; }

/* ---------- PWA safe areas (notch / home indicator) when launched standalone ---------- */
@supports (padding: env(safe-area-inset-top)) {
    .fw-top { top: calc(14px + env(safe-area-inset-top, 0px)); }
    .fw-nav { padding-bottom: env(safe-area-inset-bottom, 0px); }
    .fw-onb { padding-top: calc(22px + env(safe-area-inset-top, 0px)); padding-bottom: calc(26px + env(safe-area-inset-bottom, 0px)); }
    .fw-overlay__head { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
}

/* ---------- system states (full-screen) ---------- */
.fw-state { position: absolute; inset: 0; z-index: 125; background: var(--c-cloud); display: flex;
    flex-direction: column; align-items: center; justify-content: center; padding: 0 36px; text-align: center; }
.fw-state__icon { width: 80px; height: 80px; border-radius: 999px; display: grid; place-items: center; margin-bottom: 20px; }
.fw-state__icon--warning { background: #FFF3E0; color: var(--c-warning); }
.fw-state__icon--primary { background: var(--c-primary-soft); color: var(--c-primary); }
.fw-state__icon--error { background: var(--c-error-soft); color: var(--c-error); }
.fw-state__title { font-size: 22px; font-weight: 800; color: var(--c-ink); margin: 0 0 10px; line-height: 1.25; }
.fw-state__body { font-size: 15.5px; color: var(--c-muted); line-height: 1.5; margin: 0 0 24px; max-width: 320px; }
.fw-state__actions { display: flex; flex-direction: column; gap: 9px; width: 100%; max-width: 280px; }
[data-theme="dark"] .fw-state__icon--warning { background: rgba(255,176,32,0.16); }

/* loading skeleton */
.fw-skeleton { position: absolute; inset: 0; z-index: 126; overflow: hidden;
    background: linear-gradient(160deg,#DCEAF2,#E8EFEA); }
[data-theme="dark"] .fw-skeleton { background: #0b1320; }
.fw-skeleton__text { position: absolute; top: 24px; left: 0; right: 0; text-align: center;
    color: var(--c-slate); font-weight: 600; font-size: 14px; }
.fw-skeleton__pin { position: absolute; width: 56px; height: 28px; border-radius: 10px;
    background: rgba(255,255,255,0.7); animation: fwPulse 1.3s ease-in-out infinite; }
[data-theme="dark"] .fw-skeleton__pin { background: rgba(255,255,255,0.12); }
.fw-skeleton__sheet { position: absolute; left: 0; right: 0; bottom: 0; background: var(--c-white);
    border-radius: 22px 22px 0 0; padding: 18px; height: 200px; box-shadow: 0 -8px 30px rgba(16,32,51,0.14); }
.fw-skeleton__bar { border-radius: 12px; background: var(--c-cloud); margin-bottom: 12px; animation: fwPulse 1.3s ease-in-out infinite; }

/* ---------- dark theme (tokens flip; a few hardcoded surfaces fixed) ---------- */
/* Dark palette tokens live in tokens.css. */
[data-theme="dark"] body { background: radial-gradient(120% 120% at 50% 0%, #10151F 0%, #0A0E16 60%, #05080E 100%); }
[data-theme="dark"] .fw-frame { box-shadow: 0 50px 100px -20px rgba(0,0,0,0.7); }
[data-theme="dark"] .fw-fuelchips { background: #0E1521; }
[data-theme="dark"] .fw-sheet__handle { background: #39434F; }
[data-theme="dark"] .fw-nav { background: rgba(24,33,46,0.94); }
[data-theme="dark"] .fw-marker__pill, [data-theme="dark"] .fw-mk__pill { box-shadow: 0 3px 10px rgba(0,0,0,0.45); }
[data-theme="dark"] .fw-marker__dot, [data-theme="dark"] .fw-mk__dot { box-shadow: 0 0 0 2px #18212E; }
[data-theme="dark"] .fw-marker--outdated .fw-marker__pill, [data-theme="dark"] .fw-mk--outdated .fw-mk__pill { background: #2A3340; color: var(--c-muted); }
[data-theme="dark"] .fw-marker--outdated .fw-marker__tail, [data-theme="dark"] .fw-mk--outdated .fw-mk__tail { border-top-color: #2A3340; }
[data-theme="dark"] .fw-badge--nearby, [data-theme="dark"] .fw-badge--outdated { background: #28323F; color: var(--c-slate); }
[data-theme="dark"] .fw-onb { background: linear-gradient(180deg,#18212E 0%, var(--c-cloud) 100%); }
[data-theme="dark"] .leaflet-container { background: #0b1320; }
[data-theme="dark"] .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.95); }
[data-theme="dark"] .leaflet-control-attribution { background: rgba(24,33,46,0.8) !important; }
[data-theme="dark"] .leaflet-control-attribution, [data-theme="dark"] .leaflet-control-attribution a { color: #93A0B4 !important; }

/* ---------- desktop / iPad split view (>= 900px) ---------- */
.fw-desktop { display: none; }
.fw-dt-header { display: flex; align-items: center; gap: 14px; padding: 14px 22px; background: var(--c-white);
    border-bottom: 1px solid var(--c-line); flex: none; z-index: 30; }
.fw-dt-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.fw-dt-brandname { font-size: 18px; font-weight: 800; color: var(--c-ink); white-space: nowrap; }
.fw-dt-searchwrap { position: relative; flex: 1; max-width: 420px; margin-left: 10px; }
.fw-dt-search { display: flex; align-items: center; gap: 9px; background: var(--c-cloud);
    border: none; border-radius: 13px; padding: 11px 14px; text-align: left; }
.fw-dt-search input { border: none; outline: none; background: none; flex: 1; min-width: 0;
    font-size: 15px; color: var(--c-ink); font-family: inherit; }
.fw-dt-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--c-white);
    border: 1px solid var(--c-line); border-radius: 14px; box-shadow: 0 16px 40px rgba(16,32,51,0.18);
    max-height: 60vh; overflow-y: auto; padding: 8px 14px 12px; z-index: 50; }
[data-theme="dark"] .fw-dt-results { box-shadow: 0 16px 40px rgba(0,0,0,0.5); }
.fw-dt-langs { display: flex; gap: 6px; }
.fw-dt-split { flex: 1; display: flex; overflow: hidden; }
.fw-dt-sidebar { width: 360px; flex: none; border-right: 1px solid var(--c-line); background: var(--c-cloud);
    display: flex; flex-direction: column; overflow: hidden; }
.fw-dt-sidebar__head { padding: 16px 18px 10px; flex: none; }
.fw-dt-sort { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; background: none; border: none;
    cursor: pointer; padding: 0; font-size: 13.5px; }
.fw-dt-sidebar__list { flex: 1; overflow-y: auto; padding: 0 16px 18px; display: flex; flex-direction: column; gap: 11px; }
.fw-dt-selected { outline: 2px solid var(--c-primary); }
.fw-dt-maparea { position: relative; flex: 1; overflow: hidden; }
.fw-dt-maparea .fw-map { position: absolute; inset: 0; }
.fw-dt-fabs { position: absolute; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 10px; z-index: 20; transition: right .25s; }
.fw-dt-fabs--shift { right: 372px; }
.fw-dt-detail { position: absolute; top: 16px; right: 16px; bottom: 16px; width: 340px; background: var(--c-white);
    border-radius: 20px; box-shadow: 0 16px 50px rgba(16,32,51,0.24); display: flex; flex-direction: column;
    overflow: hidden; z-index: 40; animation: fwSlideUp .28s cubic-bezier(.32,.72,0,1); }
.fw-dt-detail__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
    border-bottom: 1px solid var(--c-line); flex: none; }
.fw-dt-detail__body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }

@media (min-width: 900px) {
    .fw-stage { padding: 0; }
    .fw-frame { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; }
    .fw-mobileonly { display: none !important; }
    .fw-desktop { display: flex; flex-direction: column; position: absolute; inset: 0; background: var(--c-cloud); }
    /* onboarding reads as a centred card on large screens */
    .fw-onb__brand, .fw-onb__content, .fw-onb__foot { max-width: 440px; margin-left: auto; margin-right: auto; width: 100%; }
    /* filters become a right-docked slide-over panel (not a bottom sheet) */
    .fw-modal--side .fw-modal__panel {
        top: 0; bottom: 0; right: 0; left: auto; width: 380px; height: 100%; max-height: none;
        border-radius: 0; box-shadow: -16px 0 50px rgba(16,32,51,0.18);
        animation: fwSlideLeft .28s cubic-bezier(.32,.72,0,1);
    }
    [data-theme="dark"] .fw-modal--side .fw-modal__panel { box-shadow: -16px 0 50px rgba(0,0,0,0.5); }
}

/* Telegram bot link and app store placeholders in the map settings (same look as site.css). */
.site-getapps { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.site-tg { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: #1878AA; /* Telegram blue, darkened for white text (4.9:1) */
    color: #fff; font-weight: 700; font-size: 14.5px; text-decoration: none; }
.site-store { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 10px;
    background: #111; color: #fff; border: 1px solid #3a3a3a; opacity: .6; cursor: default; user-select: none; line-height: 1.15; }
.site-store__text { display: flex; flex-direction: column; font-size: 15px; font-weight: 700; }
.site-store__text small { font-size: 10px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }

/* ---------- partner pins, "Services" layer (stage 3.3b) ---------- */
.fw-pp-wrap { width: 0; height: 0; }
.fw-pp { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.fw-pp__b { width: 34px; height: 34px; border-radius: 50%; background: var(--c-yellow); border: 3px solid #fff; box-shadow: 0 2px 6px rgba(16,32,51,.35);
    display: flex; align-items: center; justify-content: center; color: #5B3A00; }
.fw-pp__b svg { width: 18px; height: 18px; }
.fw-pp__t { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid #fff; margin-top: -2px; }
.fw-ppop .leaflet-popup-content-wrapper { border-radius: 14px; background: var(--c-white); color: var(--c-ink); }
.fw-ppop .leaflet-popup-content { margin: 14px 14px 12px; }
.fw-ppop .leaflet-popup-tip { background: var(--c-white); }
.fw-pcard { font-family: 'Inter', system-ui, sans-serif; color: var(--c-ink); width: 268px; max-width: 100%; }
.fw-pcard__hd { display: flex; gap: 10px; align-items: center; }
.fw-pcard__hd img, .fw-pcard__ic { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.fw-pcard__ic { display: flex; align-items: center; justify-content: center; background: var(--c-yellow); color: #5B3A00; }
.fw-pcard__ic svg { width: 24px; height: 24px; }
.fw-pcard__nm { font-weight: 800; font-size: 15px; line-height: 1.2; }
.fw-pcard__tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--c-yellow-ink);
    background: var(--c-yellow-soft); border-radius: 5px; padding: 2px 6px; margin-top: 3px; }
.fw-pcard__sub { font-size: 12.5px; color: var(--c-muted); margin: 9px 0 2px; }
.fw-pcard__row { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12.5px; margin: 6px 0 0; }
.fw-pcard__open { color: var(--c-green-ink); font-weight: 700; }
.fw-pcard__closed { color: var(--c-muted); font-weight: 700; }
.fw-pcard__offer { margin: 9px 0 0; background: var(--c-yellow-soft); border: 1px solid rgba(255,194,71,.55); border-radius: 8px; padding: 6px 8px; font-size: 12px; }
.fw-pcard__btns { display: flex; gap: 6px; margin-top: 10px; }
.fw-pcard__btns a { flex: 1; text-align: center; font-weight: 700; font-size: 12.5px; border-radius: 9px; padding: 7px 0; border: 1px solid var(--c-primary);
    color: var(--c-primary); text-decoration: none; }
.fw-pcard__btns a.is-primary { background: var(--c-primary); color: #fff; }
.fw-pcard__note { font-size: 10.5px; color: var(--c-muted); margin-top: 8px; }
.fw-svc { position: absolute; top: 16px; left: 16px; z-index: 20; display: inline-flex; align-items: center; gap: 6px;
    border: 0; cursor: pointer; font: 700 13px 'Inter', system-ui, sans-serif; padding: 8px 14px; border-radius: 999px; background: var(--c-white);
    color: var(--c-ink); box-shadow: 0 2px 8px rgba(16,32,51,.18); }
.fw-svc.is-on { background: var(--c-yellow); color: #5B3A00; }
.fw-demo--dt ~ .fw-svc { top: 60px; }
.fw-svcrow { display: flex; justify-content: center; }
.fw-svc--m { position: static; pointer-events: auto; }
