/*!
Theme Name: Alberta Maple Care
Theme URI: https://albertamaplecare.ca
Author: Alberta Maple Care
Author URI: https://albertamaplecare.ca
Description: Custom block (FSE) theme for Alberta Maple Care — a nursing-led home care provider in Calgary, Alberta. Elementor-free, performance- and SEO-focused. Design system driven by theme.json.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 8.1
Version: 0.4.119
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: abmaplecare
Tags: full-site-editing, block-patterns, custom-colors, custom-menu, healthcare, blog, editor-style
*/

/*
 * This is a block theme: almost all styling is generated from theme.json.
 * Keep this file lean. Add only what the block system cannot express, and
 * document why each rule needs to be here.
 */

/* Respect reduced-motion preferences for any theme-level transitions/animations. */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* Visible keyboard focus for links and interactive elements (accessibility, WCAG 2.4.7). */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

/* Standard WP screen-reader-only utility — the theme uses the class (e.g. nav
   markup) but nothing defined it, so "hidden" labels rendered visibly. */
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/*
 * Details/summary accordions (content-authored: CDHCI, glossary, town pages).
 * ONE accordion language site-wide: this mirrors the FAQ hub's .amc-faq-item —
 * white card, gold chip marker with a rotating plus, gold [open] emphasis —
 * so identical Q&A content behaves identically everywhere. The plus sits on a
 * gold chip with dark ink (~8:1) because a bare gold glyph on white is 2.2:1.
 */
.wp-block-details {
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wp-block-details[open] {
	border-color: rgba(231, 174, 18, 0.6) !important;
	box-shadow: var(--wp--preset--shadow--card);
}
@media (hover: hover) {
	.wp-block-details:hover { border-color: rgba(231, 174, 18, 0.5) !important; }
}

/* NOT flex: a flex summary turns each inline child into its own flex item, and
   the CDHCI <abbr> the theme auto-inserts became one — space-between then
   scattered the question across the line. Block flow + an absolutely
   positioned plus keeps mixed inline content reading as one sentence. */
.wp-block-details > summary {
	color: var(--wp--preset--color--secondary);
	cursor: pointer;
	list-style: none;
	position: relative;
	display: block;
	padding-right: 2.6em;
	font-weight: 600;
}

.wp-block-details > summary::-webkit-details-marker {
	display: none;
}

.wp-block-details > summary::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	translate: 0 -50%;
	width: 1.5em;
	height: 1.5em;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--gold-ink);
	font-size: 1.1em;
	font-weight: 700;
	line-height: 1;
	transition: transform 0.25s ease;
}

.wp-block-details[open] > summary::after {
	transform: rotate(45deg);
}
.wp-block-details[open] > summary {
	color: var(--wp--preset--color--accent);
}

/*
 * "Who it's for" check-lists on service pages: brand-gold check markers.
 */
.amc-check-list {
	list-style: none;
	padding-left: 0;
}

.amc-check-list > li {
	position: relative;
	padding-left: 2.15rem;
	margin-bottom: 0.6rem;
}

/* Soft gold-tinted badge with a deep-green check (Proposal A icon system). */
.amc-check-list > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.1em;
	width: 1.5rem;
	height: 1.5rem;
	border-radius: 50%;
	background: rgba(245, 194, 51, 0.30) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23114E46' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / 1rem no-repeat;
}

/* Fluent Forms brand styling lives in design.css (single source — this file
   previously carried a conflicting copy that always lost the cascade). */

/* Form slot wrapper: hold the form to a comfortable reading width, centered. */
.amc-form-slot {
	max-width: 820px;
	margin-inline: auto;
}

/* Skip link: hidden until focused, then pinned top-left over everything. */
.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 999999;
	padding: 0.75rem 1.25rem;
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--base);
	font-weight: 600;
	text-decoration: none;
}

.skip-link:focus {
	left: 1rem;
	top: 1rem;
}
