/* Service As A Product — public directory.
 *
 * Hues Agency kit, same as the holding page: gold #e3b73f, ink #2d2d2d, white,
 * #444 for secondary text. Contrast measured (WCAG 2.1): ink on gold 7.29:1,
 * ink on white 13.77:1, #444 on white 9.74:1, #5a5a5a on white 7.0:1,
 * white on ink 13.77:1. WHITE ON GOLD IS 1.89:1 AND IS NEVER USED — gold is a
 * background for ink, or a rule, never a fill behind white text.
 *
 * Desktop target is 1280 for the public pages and 1680 for the provider app,
 * which is behind a login and therefore internal. Phone widths are ASK FIRST and
 * bottom out at 360x800 — see ~/Developer/claudecode/docs/UI-UX-STANDARDS.md. Body is
 * 18px, secondary text 16px, and no text element carries a max-width: the
 * container's fluid side padding bounds the measure instead.
 *
 * This sheet is the shared base: the provider app loads it too, then app.css on
 * top. Chrome (header, footer, page frame) is therefore fixed in ONE place.
 */

.saap-page, .saap-page * { box-sizing: border-box; }
.saap-page {
	margin: 0;
	color: #2d2d2d;
	background: #ffffff;
	line-height: 1.55;
	font-size: 18px;
	font-family: "Segoe UI", Candara, system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;

	/* Hold the footer at the bottom of short pages. Without this the dark bar
	 * floats mid-screen with white under it whenever the content is shorter
	 * than the viewport, e.g. the empty Quote requests screen. Every .saap-page
	 * template has <main> as a direct child of <body>, so main takes the slack.
	 * The footer's own margin-top is part of the flex sizing, so this adds no
	 * scrollbar: header + nav + main + footer + margin sum to exactly 100vh.
	 *
	 * The admin bar is subtracted rather than ignored. The app hides it on its
	 * own routes (SAAP_Provider_App::maybe_hide_admin_bar), but a signed-in
	 * administrator browsing the PUBLIC directory still gets one, and core sets
	 * html{margin-top:32px}, which would otherwise buy a 32px scrollbar on every
	 * short page. Core also publishes the height as a custom property and keeps
	 * it correct, so read that; the 0px fallback makes this identical to a plain
	 * 100dvh wherever the property is absent. */
	min-height: 100vh;
	min-height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px));
	display: flex;
	flex-direction: column;
}
.saap-page > main { flex: 1 0 auto; }
.saap-page img { max-width: 100%; height: auto; }
.saap-container { padding-left: clamp(1.25rem, 6vw, 8rem); padding-right: clamp(1.25rem, 6vw, 8rem); }

/* Chrome ------------------------------------------------------------- */
.saap-header { background: #e3b73f; padding: 1.25rem 0; }
.saap-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.saap-logo { display: inline-block; line-height: 0; }
.saap-logo img { width: 150px; }
.saap-header__nav { display: flex; align-items: center; gap: 1.5rem; }
.saap-header__link { color: #2d2d2d; font-weight: 600; font-size: 1.05rem; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.saap-header__link:hover, .saap-header__link:focus { text-decoration-thickness: 2px; color: #2d2d2d; }

.saap-footer { background: #2d2d2d; padding: 2rem 0; margin-top: 4rem; }
.saap-footer__inner { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.saap-footer__logo { width: 150px; display: block; }
.saap-footer__copy { margin: 0; color: #ffffff; font-size: 1rem; }
/* Secondary by position, never by being dimmer: the whole point of the line is
   that it can be read at a glance. White on #2d2d2d is 13.77:1. */
.saap-footer__build { margin: 0 0 0 auto; color: #ffffff; font-size: 1rem; font-variant-numeric: tabular-nums; }

/* Page head ---------------------------------------------------------- */
/* The crumbs sit on .saap-container too, so this rule may only ever set
 * padding-TOP. The shorthand `padding: 1.25rem 0 0` shipped in 0.5.0 and, being
 * later in the file at equal specificity, zeroed the container's left/right
 * padding: the trail hung off the viewport edge while every other band on the
 * page was indented by clamp(1.25rem, 6vw, 8rem). Same trap for any future rule
 * that shares an element with .saap-container. */
.saap-crumbs { padding-top: 1.25rem; font-size: 1.05rem; color: #444444; }
.saap-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.saap-crumbs li::after { content: "›"; margin-left: 0.5rem; color: #5a5a5a; }
.saap-crumbs li:last-child::after { content: ""; }
.saap-crumbs a { color: #2d2d2d; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.saap-crumbs [aria-current] { color: #444444; }

.saap-masthead { padding: 1.5rem 0 2rem; border-bottom: 3px solid #e3b73f; }
.saap-masthead__kicker { margin: 0 0 0.5rem; font-weight: 700; font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase; color: #5a5a5a; }
.saap-masthead__title { margin: 0 0 0.75rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.saap-masthead__sub { margin: 0; font-size: 1.15rem; color: #444444; }
.saap-masthead__meta { margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; font-size: 1rem; color: #444444; }

.saap-section { padding: 2.5rem 0 0; }
.saap-section__title { margin: 0 0 1.25rem; font-weight: 700; font-size: clamp(1.4rem, 1.2rem + 0.9vw, 1.9rem); padding-bottom: 0.5rem; border-bottom: 2px solid #d6d6d6; }
.saap-section__note { margin: 0 0 1.25rem; color: #444444; font-size: 1.05rem; }

/* Cards -------------------------------------------------------------- */
.saap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }
.saap-card { border: 2px solid #d6d6d6; border-top: 6px solid #e3b73f; border-radius: 4px; padding: 1.25rem 1.25rem 1.35rem; background: #ffffff; display: flex; flex-direction: column; gap: 0.5rem; }
.saap-card__title { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.saap-card__title a { color: #2d2d2d; text-decoration: none; }
.saap-card__title a:hover, .saap-card__title a:focus { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.saap-card__desc { margin: 0; color: #444444; font-size: 1rem; }
.saap-card__foot { margin-top: auto; padding-top: 0.75rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }

.saap-price { display: inline-block; background: #e3b73f; color: #2d2d2d; font-weight: 700; font-size: 1rem; padding: 0.2rem 0.7rem; border-radius: 3px; }
.saap-price--quote { background: #f1f1f1; color: #3c3c3c; border: 1px solid #b8b8b8; }
.saap-supply { font-size: 1rem; color: #5a5a5a; }
.saap-supply--none { color: #8a1f1a; font-weight: 600; }

/* Provider cards ----------------------------------------------------- */
.saap-providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
/* Column layout so the buttons sit on one line across the row whatever each card
   carries above them; a ragged row of actions reads as a broken grid. */
.saap-provider { border: 2px solid #d6d6d6; border-left: 6px solid #2d2d2d; border-radius: 4px; padding: 1.25rem; background: #ffffff; display: flex; flex-direction: column; }
.saap-provider--claimed { border-left-color: #e3b73f; }
.saap-provider__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.saap-provider__name { margin: 0; font-size: 1.3rem; font-weight: 700; }
.saap-provider__name a { color: #2d2d2d; text-decoration: none; }
.saap-provider__name a:hover, .saap-provider__name a:focus { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.saap-provider__line { margin: 0.5rem 0 0; color: #444444; font-size: 1rem; }
.saap-provider__badges { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.saap-provider__badges li { font-size: 1rem; font-weight: 600; color: #2d2d2d; background: #fdf6e3; border: 1px solid #e3b73f; border-radius: 3px; padding: 0.15rem 0.6rem; }
.saap-provider__actions { margin-top: auto; padding-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

.saap-btn { display: inline-block; background: #2d2d2d; color: #ffffff; text-decoration: none; font-weight: 600; font-size: 1.05rem; padding: 0.75rem 1.5rem; border-radius: 4px; border: 2px solid #2d2d2d; }
.saap-btn:hover, .saap-btn:focus { background: #1c1c1c; color: #ffffff; }
.saap-btn:focus-visible { outline: 3px solid #2d2d2d; outline-offset: 3px; }
.saap-btn--ghost { background: #ffffff; color: #2d2d2d; }
.saap-btn--ghost:hover, .saap-btn--ghost:focus { background: #f6f1e2; color: #2d2d2d; }

/* Detail lists ------------------------------------------------------- */
.saap-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin: 0; }
.saap-fact { border-top: 3px solid #e3b73f; padding-top: 0.75rem; }
.saap-fact__label { margin: 0 0 0.25rem; font-size: 1rem; font-weight: 700; color: #5a5a5a; text-transform: uppercase; letter-spacing: 0.03em; }
.saap-fact__value { margin: 0; font-size: 1.1rem; }

.saap-list { margin: 0; padding-left: 1.4rem; }
.saap-list li { margin-bottom: 0.4rem; }

.saap-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.saap-chips a, .saap-chips span { display: inline-block; padding: 0.4rem 0.9rem; border: 2px solid #d6d6d6; border-radius: 999px; font-size: 1rem; color: #2d2d2d; text-decoration: none; background: #ffffff; }
.saap-chips a:hover, .saap-chips a:focus { border-color: #2d2d2d; background: #f6f1e2; }
.saap-chips .is-current a, .saap-chips .is-current span { border-color: #2d2d2d; background: #e3b73f; font-weight: 700; }

.saap-empty { border: 2px dashed #b8b8b8; border-radius: 4px; padding: 1.5rem; color: #444444; font-size: 1.05rem; background: #fafafa; }

.saap-note { margin: 1.5rem 0 0; padding: 1rem 1.25rem; border-left: 6px solid #e3b73f; background: #fdf6e3; color: #3c3c3c; font-size: 1.05rem; }

/* Quote request form -------------------------------------------------- */
.saap-form { margin-top: 1rem; }
.saap-form__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem 1.5rem; }
.saap-field { display: block; margin: 0; }
.saap-field--wide { grid-column: 1 / -1; margin-top: 1rem; }
.saap-field__label { display: block; font-weight: 700; font-size: 1rem; margin-bottom: 0.35rem; }
.saap-field__label small { font-weight: 400; color: #5a5a5a; }
.saap-field__label em { font-style: normal; font-weight: 600; font-size: 1rem; color: #8a1f1a; margin-left: 0.35rem; }
.saap-field input, .saap-field select, .saap-field textarea {
	width: 100%; font-size: 1.05rem; font-family: inherit; color: #2d2d2d; background: #ffffff;
	padding: 0.6rem 0.7rem; border: 2px solid #8a8a8a; border-radius: 4px; min-height: 46px;
}
/* Ink, not gold. Gold on white measures 1.89:1, so a gold outline is not a
   visible focus indicator; it read as one only because the border changes at
   the same time. Ink is 13.77:1 on white and 7.29:1 on the gold header. */
.saap-field input:focus, .saap-field select:focus, .saap-field textarea:focus {
	outline: 3px solid #2d2d2d; outline-offset: 1px; border-color: #2d2d2d;
}
.saap-field textarea { min-height: 96px; }
.saap-field__hint { margin: 0.5rem 0 0; font-size: 1rem; color: #5a5a5a; }

.saap-fieldset { margin: 1.5rem 0 0; padding: 1.25rem; border: 2px solid #d6d6d6; border-radius: 4px; }
.saap-fieldset legend { padding: 0 0.5rem; font-weight: 700; font-size: 1.15rem; }

.saap-form__actions { margin-top: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

/* The honeypot is hidden from people without display:none, which some bots skip. */
.saap-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.saap-alert { margin: 0; padding: 0.85rem 1.1rem; border-radius: 4px; font-size: 1.05rem; border-left: 6px solid; }
.saap-alert--ok { background: #f1f8f2; color: #1e5a22; border-left-color: #2e7d32; }
.saap-alert--bad { background: #fdf2f1; color: #8a1f1a; border-left-color: #b3261e; }

/* Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
	.saap-providers, .saap-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
	/* Body stays at 18px on a phone. The standard's floor is a floor, not a
	   desktop-only target, and a senior reading this on a phone needs it most. */
	.saap-header__inner { flex-direction: column; align-items: flex-start; gap: 0.85rem; }
	.saap-header__nav { gap: 1rem; }
	.saap-footer__inner { flex-direction: column; align-items: flex-start; }
	.saap-provider__head { flex-direction: column; align-items: flex-start; }
	.saap-btn { width: 100%; text-align: center; }
}
