/* Scrappie public look: the building blocks every public page shares
   (metal prices, live offers, vehicle checks). Same style as the live
   offers page: pill tabs with counts, rounded cards, big bold prices and
   small coloured badges. Colours come from Look & logo when it's set;
   otherwise the fallbacks below. */

.scr-pub { font-family: var(--scr-font, inherit); color: var(--scr-ink, #17151f); max-width: 760px; margin: 0 0 1.5em; }
.scr-pub *, .scr-pub *::before, .scr-pub *::after { box-sizing: border-box; }
.scr-pub [hidden] { display: none !important; }

.scr-pub-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.scr-pub-title { margin: 0; font-size: 1.5em; font-weight: 800; line-height: 1.2; }

/* Pill tabs with counts (as live offers' Collection / Delivery). */
.scr-pub-tabs { display: flex; gap: 6px; padding: 4px; background: var(--scr-bg, #f6f5fb); border-radius: var(--scr-radius-sm, 8px); overflow-x: auto; scrollbar-width: none; margin: 0 0 12px; }
.scr-pub-tabs::-webkit-scrollbar { display: none; }
.scr-pub-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: max(0px, calc(var(--scr-radius-sm, 8px) - 4px)); background: transparent; color: var(--scr-muted, #4d4a57); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
.scr-pub-tab[aria-selected="true"] { background: var(--scr-panel, #fff); color: var(--scr-ink, #17151f); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.scr-pub-tab:focus-visible { outline: 2px solid var(--scr-accent, #6528f7); outline-offset: 2px; }
.scr-pub-count { display: inline-block; min-width: 1.6em; padding: 1px 7px; border-radius: var(--scr-radius-sm, 8px); background: var(--scr-line, #e4e1ee); color: var(--scr-ink, #17151f); font-size: .8em; text-align: center; }
.scr-pub-tab[aria-selected="true"] .scr-pub-count { background: var(--scr-accent, #6528f7); color: var(--scr-accent-ink, #fff); }
.scr-pub-tabs.is-units { display: inline-flex; margin-bottom: 14px; }

/* Cards and rows. */
.scr-pub-card { background: var(--scr-panel, #fff); border: 1px solid var(--scr-line, #e4e1ee); border-radius: var(--scr-radius, 12px); padding: 6px 22px; margin: 0 0 16px; }
.scr-pub-card-title { margin: 14px 0 6px; font-size: 1.1em; font-weight: 800; }
.scr-pub-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--scr-line, #e4e1ee); }
.scr-pub-card-title + .scr-pub-row { border-top: 0; }
.scr-pub-row.is-top { margin: 0 -22px; padding: 14px 20px; border: 2px solid var(--scr-accent, #6528f7); border-radius: var(--scr-radius, 12px); }
.scr-pub-row.is-top + .scr-pub-row { border-top: 0; }
.scr-pub-name { font-weight: 700; font-size: 1.05em; }
.scr-pub-sub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.scr-pub-price { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.scr-pub-price strong { font-size: 1.7em; font-weight: 800; line-height: 1; }
.scr-pub-price small { margin-left: 2px; color: var(--scr-muted, #4d4a57); font-size: .85em; }

/* Badges (as live offers' Best price / Licensed / Local). */
.scr-pub-badge { display: inline-flex; align-items: center; gap: 3px; padding: 3px 10px; border-radius: var(--scr-radius-sm, 8px); font-size: .8em; font-weight: 700; background: var(--scr-bg, #f6f5fb); color: var(--scr-muted, #4d4a57); }
.scr-pub-badge.is-top { background: var(--scr-accent, #6528f7); color: var(--scr-accent-ink, #fff); }
.scr-pub-badge.is-up, .scr-pub-badge.is-good { background: var(--scr-good-soft, #e6f4ea); color: var(--scr-good, #0b5a26); }
.scr-pub-badge.is-down { background: var(--scr-bad-soft, #fdf0f0); color: var(--scr-bad, #b32d2e); }

.scr-pub-search { width: 100%; min-height: 48px; padding: 0 16px; margin: 0 0 14px; border: 1px solid var(--scr-line-strong, #cfcbdb); border-radius: var(--scr-radius-sm, 8px); background: var(--scr-panel, #fff); color: inherit; font: inherit; font-size: 16px; }
.scr-pub-search:focus { outline: 2px solid var(--scr-accent, #6528f7); outline-offset: 1px; }

.scr-pub-note { margin: 0 0 14px; padding: 12px 16px; border-radius: var(--scr-radius, 12px); background: var(--scr-bg, #f6f5fb); color: var(--scr-muted, #4d4a57); font-size: .95em; }
.scr-pub-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 0 20px; border: 0; border-radius: var(--scr-radius-sm, 8px); background: var(--scr-accent, #6528f7); color: var(--scr-accent-ink, #fff); font: inherit; font-size: 1.05em; font-weight: 800; text-decoration: none; cursor: pointer; }
.scr-pub-btn:hover, .scr-pub-btn:focus-visible { background: var(--scr-accent-hover, #5420d4); color: var(--scr-accent-ink, #fff); }
.scr-pub-empty { padding: 24px; text-align: center; color: var(--scr-muted, #4d4a57); background: var(--scr-bg, #f6f5fb); border-radius: var(--scr-radius, 12px); }

@media (max-width: 600px) {
	.scr-pub-card { padding: 4px 16px; }
	.scr-pub-row.is-top { margin: 0 -16px; padding: 12px 14px; }
	.scr-pub-price strong { font-size: 1.45em; }
	.scr-pub-tabs.is-units { display: flex; }
	.scr-pub-tabs.is-units .scr-pub-tab { flex: 1 1 0; justify-content: center; }
}

/* Opening hours ([scr_opening_hours]). */
.scr-hours { max-width: 420px; }
.scr-hours-status { margin: 0 0 10px; line-height: 1.4; }
.scr-hours-status strong { display: block; color: var(--scr-bad, #b42318); }
.scr-hours-status.is-open strong { color: var(--scr-good, #13795b); }
.scr-hours-status.is-closing strong { color: var(--scr-warn, #8a5a00); }
.scr-hours-status span { display: block; }
.scr-hours-table { width: 100%; border-collapse: collapse; margin: 0 0 10px; }
.scr-hours-table th, .scr-hours-table td { padding: 7px 10px; border: 0; border-bottom: 1px solid var(--scr-line, #e4e1ee); text-align: left; font-weight: 400; }
.scr-hours-table td { text-align: right; font-variant-numeric: tabular-nums; }
.scr-hours-table tr.is-today th, .scr-hours-table tr.is-today td { font-weight: 800; background: var(--scr-bg, #f6f5fb); }
.scr-hours-closed-title { margin: 12px 0 4px; font-weight: 700; }
.scr-hours-closed { margin: 0; padding-left: 18px; }

/* Themes style inputs and buttons too (e.g. input[type="text"] { border-radius: 0 }).
   These win over them, so every box and button follows Look & logo's corners. */
.scr-pub input.scr-pub-search[type], .scr-pub input.scr-pub-search { border-radius: var(--scr-radius-sm, 8px); }
.scr-pub button.scr-pub-btn, .scr-pub a.scr-pub-btn, .scr-pub button.scr-pub-tab, .scr-pub a.scr-pub-tab, .scr-pub span.scr-pub-tab { border-radius: var(--scr-radius-sm, 8px); }
.scr-pub .scr-pub-tabs > .scr-pub-tab { border-radius: max(0px, calc(var(--scr-radius-sm, 8px) - 4px)); }
.scr-pub button, .scr-pub input, .scr-pub select { font-family: inherit; }
