/* Fuel Prices — component styles. Design tokens are declared by the theme;
   the fallbacks below keep the blocks readable inside any other theme. */

.fp-board,
.fp-nearby,
.fp-chart,
.fp-calc,
.fp-table-wrap,
.fp-brands {
	--fp-sign: var(--fp-color-sign, #0B5A3A);
	--fp-sign-2: var(--fp-color-sign-2, #0E6B45);
	--fp-amber: var(--fp-color-amber, #F2B400);
	--fp-ink: var(--fp-color-ink, #0F1A14);
	--fp-ink-2: var(--fp-color-ink-2, #4B5B51);
	--fp-ink-3: var(--fp-color-ink-3, #7A887F);
	--fp-line: var(--fp-color-line, #D3DCD4);
	--fp-surface: var(--fp-color-surface, #fff);
	--fp-surface-2: var(--fp-color-surface-2, #E8EDE7);
	--fp-up: var(--fp-color-up, #C0410E);
	--fp-down: var(--fp-color-down, #0B7285);
	--fp-display: var(--fp-font-display, "Barlow Condensed", "Arial Narrow", sans-serif);
	--fp-mono: var(--fp-font-mono, ui-monospace, Menlo, monospace);
}

.fp-num { font-variant-numeric: tabular-nums; }
.fp-eyebrow { font-family: var(--fp-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--fp-ink-3); margin: 0; }
.fp-empty { padding: 16px; background: var(--fp-surface-2); border-radius: 10px; }

/* Price board ------------------------------------------------------------- */
.fp-board {
	background: var(--fp-sign); color: #fff; border-radius: 16px; padding: 20px 22px 16px;
	border: 3px solid #fff; box-shadow: 0 0 0 2px var(--fp-sign), 0 18px 40px -18px rgb(6 40 26 / .55);
}
.fp-board__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid rgb(255 255 255 / .22); }
.fp-board__head .fp-eyebrow { color: #A9CDB9; }
.fp-board__title { font-family: var(--fp-display); font-size: 26px; margin: 2px 0 0; line-height: 1.05; }
.fp-live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--fp-mono); font-size: 11.5px; color: #A9CDB9; white-space: nowrap; }
.fp-live i { width: 7px; height: 7px; border-radius: 50%; background: #7CF0B0; box-shadow: 0 0 0 3px rgb(124 240 176 / .25); }
.fp-board__row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px dashed rgb(255 255 255 / .18); }
.fp-board__row:last-of-type { border-bottom: 0; }
.fp-grade { display: grid; place-items: center; min-width: 48px; height: 40px; padding: 0 6px; border-radius: 6px; background: #fff; color: var(--fp-sign); font-family: var(--fp-display); font-weight: 700; font-size: 20px; }
.fp-grade.is-diesel { background: #111; color: #fff; }
.fp-grade-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.fp-price { display: block; font-family: var(--fp-display); font-weight: 700; font-size: clamp(40px, 6vw, 58px); line-height: .9; color: var(--fp-amber); font-variant-numeric: tabular-nums; text-align: right; }
.fp-conv { display: block; text-align: right; font-family: var(--fp-mono); font-size: 11.5px; color: #A9CDB9; margin-top: 4px; }
.fp-board__foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: #A9CDB9; }
.fp-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 999px; white-space: nowrap; margin-left: 6px; }
.fp-delta--up { color: #FFC2A3; background: rgb(255 170 130 / .18); }
.fp-delta--down { color: #A6ECF5; background: rgb(140 230 240 / .16); }
.fp-delta--flat { color: #A9CDB9; background: rgb(255 255 255 / .12); }
@media (max-width: 480px) {
	.fp-board__row { grid-template-columns: auto 1fr; }
	.fp-price-wrap { grid-column: 1 / -1; }
	.fp-price, .fp-conv { text-align: left; }
}

/* Outside the dark board (tables, brand rows) the badges need light-mode colours. */
.fp-table .fp-delta--up, .fp-brands .fp-delta--up { color: var(--fp-up); background: #FBE7DC; }
.fp-table .fp-delta--down, .fp-brands .fp-delta--down { color: var(--fp-down); background: #DDF1F4; }

/* Search and station list -------------------------------------------------- */
.fp-search { display: flex; background: var(--fp-surface); border: 1.5px solid var(--fp-line); border-radius: 12px; padding: 6px; gap: 6px; max-width: 560px; }
.fp-search:focus-within { border-color: var(--fp-sign-2); }
.fp-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 12px; font-size: 16px; color: inherit; }
.fp-search input:focus { outline: none; }
.fp-btn { border: 0; cursor: pointer; background: var(--fp-sign); color: #fff; font-weight: 600; padding: 10px 18px; border-radius: 8px; white-space: nowrap; }
.fp-btn:hover { background: var(--fp-sign-2); }
.fp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fp-chip { border: 1px solid var(--fp-line); background: transparent; border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--fp-ink-2); cursor: pointer; }
.fp-chip[aria-pressed="true"] { background: var(--fp-ink); color: var(--fp-surface); border-color: var(--fp-ink); }
.fp-nearby__status { margin: 12px 0 0; color: var(--fp-ink-2); font-size: 14px; }
.fp-stations { list-style: none; margin: 14px 0 0; padding: 0; border: 1px solid var(--fp-line); border-radius: 14px; overflow: hidden; background: var(--fp-surface); }
.fp-station { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--fp-line); }
.fp-station:last-child { border-bottom: 0; }
.fp-station__rank { font-family: var(--fp-display); font-weight: 700; font-size: 20px; color: var(--fp-ink-3); text-align: center; }
.fp-station h4 { margin: 0; font-size: 15px; font-weight: 600; }
.fp-station__meta { font-size: 12.5px; color: var(--fp-ink-2); }
.fp-station__price { font-family: var(--fp-display); font-weight: 700; font-size: 26px; text-align: right; line-height: 1; }
.fp-station__price small { display: block; font-family: var(--fp-mono); font-size: 11px; font-weight: 400; color: var(--fp-ink-3); margin-top: 3px; }
.fp-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 4px; background: var(--fp-sign); color: #fff; margin-left: 6px; }

/* Chart -------------------------------------------------------------------- */
.fp-chart__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.fp-chart__canvas svg { width: 100%; height: auto; display: block; }
.fp-seg { display: inline-flex; background: var(--fp-surface-2); border-radius: 8px; padding: 3px; gap: 2px; }
.fp-seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 6px; font-weight: 600; font-size: 13.5px; color: var(--fp-ink-2); cursor: pointer; }
.fp-seg button[aria-pressed="true"] { background: var(--fp-surface); color: var(--fp-ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }

/* Tables ------------------------------------------------------------------- */
.fp-table-wrap { overflow-x: auto; background: var(--fp-surface); border: 1px solid var(--fp-line); border-radius: 14px; }
.fp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fp-table th { font-family: var(--fp-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--fp-ink-3); font-weight: 500; text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--fp-line); white-space: nowrap; }
.fp-table td { padding: 11px 12px; border-bottom: 1px solid var(--fp-line); white-space: nowrap; }
.fp-table tr:last-child td { border-bottom: 0; }
.fp-table .fp-r { text-align: end; }
.fp-table .is-selected { background: color-mix(in srgb, var(--fp-amber) 13%, transparent); }
.fp-table a { text-decoration: none; color: inherit; }
.fp-table a:hover { text-decoration: underline; }
.fp-sub { display: block; font-size: 11px; color: var(--fp-ink-3); }
.fp-plate { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 5px; border-radius: 5px; background: var(--fp-sign); color: #fff; font-family: var(--fp-display); font-weight: 700; font-size: 15px; border: 1.5px solid #fff; box-shadow: 0 0 0 1px var(--fp-sign); margin-inline-end: 10px; vertical-align: middle; }
.fp-cov { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; }
.fp-cov--stations { background: #DDF1F4; color: var(--fp-down); }
.fp-cov--average { background: var(--fp-surface-2); color: var(--fp-ink-2); }
.fp-bar { display: block; height: 6px; border-radius: 3px; background: var(--fp-surface-2); position: relative; min-width: 70px; }
.fp-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 3px; background: var(--fp-sign-2); }

/* Brands ------------------------------------------------------------------- */
.fp-brands { display: grid; gap: 12px; }
.fp-brand-row { display: grid; grid-template-columns: 130px minmax(0, 1fr) 70px; gap: 12px; align-items: center; font-size: 14px; }
.fp-brand-row .fp-track { height: 22px; background: var(--fp-surface-2); border-radius: 5px; position: relative; overflow: hidden; }
.fp-brand-row .fp-track i { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--fp-sign-2); border-radius: 5px; }
.fp-brand-row.is-motorway .fp-track i { background: var(--fp-up); }
.fp-brand-row b { font-family: var(--fp-display); font-size: 20px; text-align: end; }
@media (max-width: 480px) { .fp-brand-row { grid-template-columns: 96px minmax(0, 1fr) 62px; } }

/* Calculator --------------------------------------------------------------- */
.fp-calc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fp-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--fp-ink-2); margin-bottom: 5px; }
.fp-field input, .fp-field select { width: 100%; border: 1px solid var(--fp-line); background: var(--fp-surface); border-radius: 8px; padding: 10px 12px; font-size: 16px; color: inherit; }
.fp-inline { display: flex; gap: 6px; }
.fp-inline input { flex: 1; min-width: 0; }
.fp-inline select { width: auto; flex: 0 0 auto; }
.fp-calc__out { grid-column: 1 / -1; background: var(--fp-sign); color: #fff; border-radius: 12px; padding: 16px 18px; display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; min-height: 76px; }
.fp-calc__out b { font-family: var(--fp-display); font-size: 42px; line-height: .9; color: var(--fp-amber); }
.fp-calc__out .fp-alt { font-family: var(--fp-mono); font-size: 12px; color: #A9CDB9; }
@media (max-width: 560px) { .fp-calc { grid-template-columns: 1fr; } }

/* Historical observations retain source cadence and geographic coverage. */
.fp-history-countries { display:flex; flex-wrap:wrap; gap:8px; margin-top:24px; }
.fp-history-countries a { display:inline-block; text-decoration:none; }
.fp-history-note { color:var(--fp-color-ink-2); font-size:13px; margin-top:14px; line-height:1.6; }
.fp-history-legend { font-size:13px; margin:12px 0; }
.fp-grade { overflow-wrap:anywhere; }
