/**
 * Recology Yuba-Sutter service day lookup.
 *
 * Why this file overrides as much as it does (spec 019-yuba-sutter-service-day-lookup)
 * ------------------------------------------------------------------------------------
 * This is a public utility page for a broad, older-skewing, largely mobile audience, and
 * WCAG 2.1 AA is a hard requirement rather than an aspiration. Two theme defaults make
 * that impossible without intervention:
 *
 *   1. css/content.css:158 sets `* { outline: none }` sitewide — a WCAG 2.4.7 (Focus
 *      Visible) failure. Nothing here can rely on the browser's default focus ring, so
 *      every focusable element declares its own.
 *
 *   2. COLOUR, AND A DELIBERATE ACCESSIBILITY TRADE-OFF.
 *
 *      Recology blue #00a0dc measures 2.97:1 against white. That is below WCAG AA for
 *      body text (4.5:1) and below the 3:1 floor for large text and UI components.
 *
 *      It is used anyway, on the client's explicit instruction, so this page matches the
 *      rest of recology.com -- which already paints white on brand blue (main.css:49,
 *      #11A0DC at 2.96:1). Consistency with the surrounding site was judged to matter more
 *      than this page clearing AA on its own.
 *
 *      Known consequence, recorded so nobody has to rediscover it: links, filled buttons
 *      and the focus ring sit at 2.97:1. The automated contrast test permits exactly this
 *      colour and still fails anything else below AA, so the exception cannot quietly
 *      spread.
 *
 *      Everything that does NOT have to be brand blue is kept well clear:
 *          #1c1c1c body ink on white .. 15.8:1
 *          #5b5b5b muted on white ..... 7.0:1
 *          #111 on #71BF45 ............ 8.31:1  (green only ever as a background)
 *          #C4161C on white ........... 6.04:1  (error text; the theme's #ed2124 is 4.34:1)
 *
 * The theme also sets body { font-weight: 300 } at 18px, dropping to 15px under 767px.
 * Lato Light at 15px is the wrong choice for this audience, so the scale is reset here.
 *
 * House style is matched deliberately: flat, square, near-zero radius, uppercase accents.
 * Modernity comes from space and type scale, not a new visual vocabulary.
 */

[v-cloak] { display: none !important; }

.sdl {
	--sdl-ink:      #1c1c1c;
	--sdl-muted:    #5b5b5b;
	--sdl-line:     #d8d9da;
	--sdl-bg:       #f2f2f2;
	--sdl-brand:    #00a0dc; /* Recology blue */
	--sdl-blue:     #00a0dc; /* Recology blue -- see the contrast note in the header */
	--sdl-blue-dk:  #0089bd; /* hover: brand blue darkened just enough to register */
	--sdl-green:    #71bf45;
	--sdl-red:      #c4161c; /* 6.04:1 on white */
	--sdl-focus:    #00a0dc;

	font-weight: 400;
	font-size: 1.0625rem;
	line-height: 1.55;
	color: var(--sdl-ink);
	max-width: 44rem;
	margin: 0 auto 3rem;
	padding: 0 1rem;
}

.sdl *,
.sdl *::before,
.sdl *::after { box-sizing: border-box; }

/* Re-assert a visible focus ring: the theme removes it globally. */
.sdl :focus-visible {
	outline: 3px solid var(--sdl-focus);
	outline-offset: 2px;
	border-radius: 2px;
}
/* Bootstrap's default focus shadow is ~2.96:1 and fails 1.4.11. */
.sdl .sdl-input:focus,
.sdl .sdl-btn:focus,
.sdl .sdl-select:focus { box-shadow: none; }

.sdl-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- Header ---------- */

.sdl-title {
	font-size: 2rem;
	line-height: 1.2;
	font-weight: 700;
	margin: 0 0 .75rem;
	color: var(--sdl-ink);
}

.sdl-lede {
	font-size: 1.125rem;
	margin: 0 0 1.75rem;
	color: var(--sdl-ink);
}

/* ---------- Search ---------- */

.sdl-search {
	background: var(--sdl-bg);
	border: 1px solid var(--sdl-line);
	padding: 1.25rem;
	margin-bottom: 1.75rem;
}

/* A persistent visible label, never a placeholder-as-label and never the theme's float
   label (main.css:1380 is dead CSS — it contains an invalid `//position: relative`). A
   label that vanishes on focus is the wrong affordance for someone who pauses mid-entry. */
.sdl-label {
	display: block;
	font-weight: 700;
	font-size: 1.0625rem;
	margin: 0 0 .25rem;
	color: var(--sdl-ink);
}

.sdl-hint {
	font-size: .9375rem;
	color: var(--sdl-muted);
	margin: 0 0 .625rem;
}

.sdl-combo { position: relative; }

.sdl-input {
	width: 100%;
	min-height: 56px;
	/* Never below 16px: iOS zooms the viewport on focus, which is a real usability
	   failure for this audience. */
	font-size: 1.125rem;
	font-family: inherit;
	padding: .75rem 3rem .75rem .875rem;
	border: 2px solid #51534f;
	border-radius: 2px;
	background: #fff;
	color: var(--sdl-ink);
}

.sdl-clear {
	position: absolute;
	top: 0; right: 0;
	width: 48px;
	height: 56px;
	border: 0;
	background: transparent;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--sdl-muted);
	cursor: pointer;
}
.sdl-clear:hover { color: var(--sdl-ink); }

.sdl-listbox {
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	z-index: 30;
	left: 0; right: 0;
	top: calc(100% - 2px);
	max-height: 22rem;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--sdl-line);
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.sdl-option {
	display: block;
	min-height: 56px;
	padding: .625rem .875rem;
	border-bottom: 1px solid #eee;
	border-left: 4px solid transparent;
	cursor: pointer;
}
.sdl-option:last-child { border-bottom: 0; }
.sdl-option.is-active {
	background: var(--sdl-bg);
	border-left-color: var(--sdl-brand);
}
.sdl-option-main { display: block; font-weight: 700; }
.sdl-option-sub  { display: block; font-size: .9375rem; color: var(--sdl-muted); }

.sdl-loadnote {
	font-size: .9375rem;
	color: var(--sdl-muted);
	margin: .625rem 0 0;
}

.sdl-progress {
	height: 4px;
	background: #dfe0e1;
	margin-top: .5rem;
	overflow: hidden;
}
.sdl-progress span {
	display: block;
	height: 100%;
	width: 40%;
	background: var(--sdl-brand);
	animation: sdl-slide 1.1s ease-in-out infinite;
}
@keyframes sdl-slide {
	0%   { transform: translateX(-100%); }
	100% { transform: translateX(350%); }
}

/* ---------- Result card ---------- */

.sdl-card {
	background: #fff;
	border: 1px solid var(--sdl-line);
	border-left: 6px solid var(--sdl-brand);
	padding: 1.5rem;
}
.sdl-card--same     { border-left-color: var(--sdl-green); }
.sdl-card--notfound,
.sdl-card--conflict,
.sdl-card--units,
.sdl-card--mixed    { border-left-color: #878787; }
.sdl-card--outofarea{ border-left-color: #878787; }
/* Provisional: a street-level answer is a statement about the street, not about you. */
.sdl-card--street {
	border-left-style: dashed;
	border-left-color: #878787;
}

.sdl-card-heading {
	padding: 0;
	text-transform: none;
	font-size: 1.5rem;
	line-height: 1.25;
	font-weight: 700;
	margin: 0 0 .375rem;
}
.sdl-card-address {
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--sdl-muted);
	margin: 0 0 1.25rem;
}

/* The answer, stacked so it reads the same at 320px and 1440px. */
.sdl-days { margin: 0 0 1.25rem; }
.sdl-day-lead {
	margin: 0;
	font-size: 1rem;
	color: var(--sdl-muted);
}
.sdl-day-new {
	margin: .0625rem 0 .125rem;
	font-size: 2.5rem;
	line-height: 1.05;
	font-weight: 700;
	color: var(--sdl-blue);
	overflow-wrap: break-word;
}
.sdl-day-was {
	margin: 0;
	font-size: 1rem;
	color: var(--sdl-muted);
}
.sdl-day-was s { text-decoration-thickness: 1px; }
.sdl-days--same .sdl-day-new { color: #2f6d13; }

.sdl-street-answer { font-size: 1.125rem; margin: 0 0 1rem; }

.sdl-dates {
	font-size: 1.0625rem;
	margin: 0 0 1rem;
	padding: .875rem 1rem;
	background: var(--sdl-bg);
	border-left: 3px solid var(--sdl-line);
}

.sdl-note   { margin: 0 0 1rem; }
.sdl-verify { font-size: .9375rem; color: var(--sdl-muted); margin: 1.25rem 0 0; }

.sdl-chip {
	display: inline-block;
	background: #ececec;
	border: 1px solid var(--sdl-line);
	font-size: .8125rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: .1875rem .5rem;
	margin-right: .5rem;
}
.sdl-confirm { font-size: 1rem; margin: 0 0 1rem; }

.sdl-tiplist { margin: .5rem 0 1rem 1.25rem; font-size: 1rem; }
.sdl-tips    { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: 0 0 1rem; }
.sdl-hours   { font-size: .9375rem; color: var(--sdl-muted); }

.sdl-tel {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--sdl-blue);
	text-decoration: none;
	border-bottom: 2px solid currentColor;
}
.sdl a { color: var(--sdl-blue); }

.sdl-unitpick { margin: 1rem 0; }
.sdl-select {
	min-height: 48px;
	font-size: 1.0625rem;
	font-family: inherit;
	padding: .5rem;
	border: 2px solid #51534f;
	border-radius: 2px;
	background: #fff;
	width: 100%;
	max-width: 22rem;
}

.sdl-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.25rem 0 0; }

.sdl-btn {
	min-height: 48px;
	padding: .625rem 1.125rem;
	font-size: 1rem;
	font-family: inherit;
	font-weight: 700;
	border: 2px solid var(--sdl-blue);
	border-radius: 2px;
	background: var(--sdl-blue);
	color: #fff;
	cursor: pointer;
}
.sdl-btn:hover { background: var(--sdl-blue-dk); border-color: var(--sdl-blue-dk); }
.sdl-btn--ghost { background: #fff; color: var(--sdl-blue); }
.sdl-btn--ghost:hover { background: var(--sdl-bg); color: var(--sdl-blue-dk); }

.sdl-panel {
	background: #fff;
	border: 1px solid var(--sdl-line);
	border-left: 6px solid #878787;
	padding: 1.5rem;
}
.sdl-panel--error { border-left-color: var(--sdl-red); }
.sdl-panel h2 { font-size: 1.375rem; margin: 0 0 .5rem; }

.sdl-printonly { display: none; }

/* Cap in viewport units, not pixels: with the on-screen keyboard up a phone has roughly
   half its height left, and a fixed max-height buries the suggestions behind it. */
.sdl-listbox { max-height: min(22rem, 45vh); }

@media (max-width: 560px) {
	/* Everything here serves one goal: the search field clears the fold on a 390x844
	   phone. The theme's 18px base plus its heading scale pushed it well below. */
	.sdl { font-size: 1rem; padding: 0 .875rem; }
	.sdl-title { font-size: 1.5rem; line-height: 1.15; margin-bottom: .5rem; }
	.sdl-lede { font-size: 1rem; margin-bottom: 1rem; }
	.sdl-search { padding: .875rem; }
	.sdl-label { font-size: 1rem; margin-bottom: .125rem; }
	.sdl-hint { font-size: .875rem; margin-bottom: .5rem; }

	.sdl-card { padding: 1.125rem .9375rem; }
	.sdl-card-heading { font-size: 1.25rem; }
	.sdl-card-address { margin-bottom: 1rem; }
	.sdl-day-new { font-size: 2.125rem; }
	.sdl-dates { padding: .75rem .875rem; font-size: 1rem; }

	/* Full-width stacked buttons: easier to hit, and no ragged half-width row. */
	.sdl-actions { flex-direction: column; align-items: stretch; gap: .5rem; }
	.sdl-btn { width: 100%; }
	.sdl-tips { gap: .375rem; }
	.sdl-tel { font-size: 1.125rem; }
	.sdl-select { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
	.sdl-progress span { animation: none; width: 100%; }
	.sdl * { transition: none !important; }
}

/* ---------- Print ----------
   This audience prints and screenshots. The message must survive with no colour at all,
   so the change is carried entirely by words. */
@media print {
	.local-nav,
	.navbar,
	.img-block,
	.page-footer,
	.cookie-notice-container,
	.sdl-search,
	.sdl-listbox,
	.sdl-noprint,
	.sdl-lede { display: none !important; }

	.sdl {
		max-width: none;
		margin: 0;
		padding: 0;
		font-size: 12pt;
		color: #000;
	}
	.sdl-card {
		border: 1px solid #000;
		border-left: 1px solid #000;
		padding: 1rem;
		break-inside: avoid;
		page-break-inside: avoid;
	}
	.sdl-day-new b,
	.sdl-day-old b { color: #000; }
	.sdl-dates { background: none; border-left: 1px solid #000; }
	.sdl-printonly { display: block; margin-top: 1rem; font-size: 10pt; }
	.sdl-tel { border: 0; }
}
