/*
 * HaywoodTech Docs Widgets: design tokens and shared base.
 *
 * Tokens live on :root so they can be overridden at any level:
 *   site-wide   :root { --hwd-ink: #14213d; }        (Customizer > Additional CSS)
 *   one section a container's Custom CSS: selector { --hwd-amber: #fca311; }
 *   one widget  the widget's Style tab
 * Components read their own --hwd-<component>-* properties first and fall
 * back to these tokens, so the Style tab never fights the site-wide palette.
 */
:root {
	--hwd-ink: #0b3c44;
	--hwd-ink-deep: #082e35;
	--hwd-amber: #f4a938;
	--hwd-amber-bright: #ffc35e;
	--hwd-amber-soft: #fde9c4;
	--hwd-amber-ink: #5c3b00;
	--hwd-text: #1d2e31;
	--hwd-muted: #52666a;
	--hwd-line: #d6e1e2;
	--hwd-tint: #eef4f4;
	--hwd-link: #0b6875;
	--hwd-cream: #f7f1e6;
	--hwd-note-bg: #fff8ec;
	--hwd-font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--hwd-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
	--hwd-sticky-top: 96px;
	--hwd-measure: 70ch;
}

/*
 * Inside an Elementor container, size like Elementor's own widgets: full width
 * in a column, share the space in a row. Without this, widgets that respond to
 * their own width (they have no content width) would collapse in a row.
 */
:is(.e-con, .e-con > .e-con-inner) > .elementor-widget[data-widget_type^="hwd-"] {
	width: var(--container-widget-width, 100%);
	--flex-grow: var(--container-widget-flex-grow, 0);
}

/* Every widget's root element carries .hwd */
.hwd {
	box-sizing: border-box;
	color: var(--hwd-text);
	font-family: var(--hwd-font);
	font-size: 17px;
	font-stretch: 100%;
	font-weight: 400;
	line-height: 1.65;
	text-align: start;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
.hwd *,
.hwd *::before,
.hwd *::after { box-sizing: border-box; }
.hwd :where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, figcaption, pre, table, blockquote) { margin: 0; padding: 0; }
.hwd :where(h1, h2, h3, h4, h5, h6) { color: var(--hwd-ink); font-family: inherit; letter-spacing: normal; text-transform: none; }
/* Kits and themes often set line-height on p (".elementor-kit-N p"); keep the widget's rhythm. */
.hwd.hwd :where(p, li, dd, figcaption) { line-height: inherit; font-size: inherit; }

/* Inline vocabulary shared by every text field */
.hwd :where(strong, b) { font-weight: 650; color: var(--hwd-ink); }
.hwd :where(code, kbd) {
	font-family: var(--hwd-mono);
	font-size: 0.86em;
	background: var(--hwd-tint);
	color: var(--hwd-ink);
	padding: 0.12em 0.4em;
	border-radius: 5px;
	white-space: normal;
	overflow-wrap: anywhere;
}
/* A menu path such as "WooCommerce › Settings". Wrap it in <span class="hwd-path">. */
.hwd .hwd-path { font-weight: 600; color: var(--hwd-ink); }

/* Links inside text. Two classes so theme and kit link colours don't win. */
.hwd.hwd :where(p, li, td, th, dd, figcaption, span) a {
	color: var(--hwd-link);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}
.hwd.hwd :where(p, li, td, th, dd, figcaption, span) a:hover {
	color: var(--hwd-ink);
	text-decoration-thickness: 2px;
}
.hwd :where(a, summary, button):focus-visible {
	outline: 3px solid var(--hwd-amber);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Buttons (hero and help banner) */
.hwd .hwd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border: 0;
	border-radius: 999px;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

/* Visually hidden, still announced */
.hwd .hwd-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.hwd *,
	.hwd *::before,
	.hwd *::after { transition: none !important; animation: none !important; }
}
