/* storeShell.css - start
   Shared look for every store page: type scale, spacing, radius, shadow, and a low-specificity baseline for
   links, buttons, form fields and plain tables. Loaded once from commonBody7BodyStart.php, after designTokens.css.

   Every baseline rule is written as "body <element>" with :where() around attributes, so it beats the old bare
   element rules in the legacy stylesheets but never beats a page's own class or id rules. Colours come from the
   store's --brand variables (see store_brand_lib.php), so each store follows its own accent colour. */

:root {
	--font-body: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-heading: var(--font-body);

	--brand: #1b7d9c;
	--brand-hover: #176a85;
	--brand-soft: #e8f2f6;
	--brand-ink: #ffffff;
	--brand-text: #1b7d9c;
	--brand-ring: rgba(27, 125, 156, 0.28);

	--color-text: #1f2a30;
	--color-text-muted: #5b6770;
	--color-border: #e3e8eb;
	--color-surface-alt: #f8fafb;
	--color-surface-sunk: #f3f5f7;
	--color-brand-brown: #1f2a30;
	--color-brand-brown-dark: #121a1f;
	--color-error: #b42318;
	--color-success: #1a7f4b;

	--radius-sm: 8px;
	--radius-md: 12px;
	--radius-lg: 16px;
	--radius-pill: 999px;
	--shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
	--shadow-md: 0 4px 14px rgba(16, 24, 40, 0.10);
	--shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
	--transition: 0.18s ease;
	--container-max: 1280px;
	--gutter: clamp(16px, 3vw, 32px);
}

html {
	scroll-padding-top: 96px;
	-webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
}

body {
	font-family: var(--font-body);
	font-size: 15px;
	line-height: 1.5;
	color: var(--color-text);
	background: #fff;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* ---------- Type scale ---------- */
body :is(h1, h2, h3, h4, h5, h6) {
	font-family: var(--font-heading);
	color: var(--color-brand-brown);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.01em;
}
body h1 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
body h2 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); }
body h3 { font-size: 1.125rem; }
body h4 { font-size: 1rem; }

body p { color: inherit; }

/* ---------- Links ---------- */
body a {
	color: var(--brand-text);
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: color var(--transition);
}
body a:hover { color: var(--brand-hover); }

/* ---------- Focus ring ---------- */
body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--brand);
	outline-offset: 2px;
}

/* ---------- Buttons ---------- */
body :is(button, input:where([type="submit"], [type="button"], [type="reset"])) {
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.2;
	min-height: 40px;
	padding: 9px 18px;
	border: 1px solid var(--brand);
	border-radius: var(--radius-sm);
	background: var(--brand);
	color: var(--brand-ink);
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	transition: background-color var(--transition), border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
body :is(button, input:where([type="submit"], [type="button"], [type="reset"])):hover {
	background: var(--brand-hover);
	border-color: var(--brand-hover);
	box-shadow: var(--shadow-md);
}
body :is(button, input:where([type="submit"], [type="button"], [type="reset"])):active {
	transform: translateY(1px);
}
body :is(button, input:where([type="submit"], [type="button"], [type="reset"])):disabled {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none;
}

/* ---------- Form fields ---------- */
body :is(input:where([type="text"], [type="email"], [type="password"], [type="tel"], [type="number"], [type="url"], [type="search"], [type="date"], [type="time"], [type="datetime-local"]), select, textarea) {
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.4;
	color: var(--color-text);
	background-color: #fff;
	border: 1px solid #ccd4d9;
	border-radius: var(--radius-sm);
	padding: 9px 12px;
	max-width: 100%;
	transition: border-color var(--transition), box-shadow var(--transition);
}
body :is(input:where([type="text"], [type="email"], [type="password"], [type="tel"], [type="number"], [type="url"], [type="search"], [type="date"], [type="time"], [type="datetime-local"]), select, textarea):hover {
	border-color: #aeb9bf;
}
body :is(input:where([type="text"], [type="email"], [type="password"], [type="tel"], [type="number"], [type="url"], [type="search"], [type="date"], [type="time"], [type="datetime-local"]), select, textarea):focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px var(--brand-ring);
}
body :is(input, select, textarea)::placeholder {
	color: #8a959c;
}
body textarea { min-height: 96px; resize: vertical; }
body :is(input:where([type="checkbox"], [type="radio"])) { accent-color: var(--brand); }
body label { font-weight: 600; color: var(--color-text); }

/* ---------- Plain tables (no class, id or role) ---------- */
body table:where(:not([class]):not([id]):not([role])) {
	border-collapse: collapse;
	max-width: 100%;
}
body table:where(:not([class]):not([id]):not([role])) :is(th, td) {
	padding: 10px 12px;
	border-bottom: 1px solid var(--color-border);
	text-align: left;
	vertical-align: middle;
}
body table:where(:not([class]):not([id]):not([role])) th {
	background: var(--color-surface-sunk);
	color: var(--color-text-muted);
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}
body table:where(:not([class]):not([id]):not([role])) tbody tr:hover td {
	background: var(--color-surface-alt);
}
@media (max-width: 640px) {
	body table:where(:not([class]):not([id]):not([role])) {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

/* ---------- Images and media ---------- */
body img:where([height]) { height: auto; }
body :is(video, iframe, canvas, svg) { max-width: 100%; }

/* ---------- Small screens ---------- */
@media (max-width: 520px) {
	body { font-size: 15px; }
	body :is(button, input:where([type="submit"], [type="button"], [type="reset"])) { min-height: 44px; }
	/* 16px keeps iOS from zooming the page when a field gets focus */
	body :is(input:where([type="text"], [type="email"], [type="password"], [type="tel"], [type="number"], [type="url"], [type="search"], [type="date"]), select, textarea) {
		font-size: 16px;
		min-height: 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
/* storeShell.css - end */
