/*
 * AACC — Floating Dock & Interactive Overlay Navigation
 * Styles consume Global Styles tokens (--wp--preset--*, --wp--custom--*).
 */

:root {
	--aacc-ink: var(--wp--preset--color--base, #191c1d);
	--aacc-navy: var(--wp--preset--color--ink, #1a1c1e);
	--aacc-accent: var(--wp--preset--color--accent, #c5a059);
	--aacc-gold-deep: var(--wp--preset--color--accent-deep, #a17f3b);
	--aacc-violet: var(--wp--preset--color--violet, #4a6278);
	--aacc-slate: var(--wp--preset--color--slate, #496177);
	--aacc-aqua: var(--wp--preset--color--aqua, #9aa7b0);
	--aacc-paper: var(--wp--preset--color--paper, #f8f9fa);
	--aacc-muted: var(--wp--preset--color--muted, #44474a);
	--aacc-ember: #ba1a1a;
	--aacc-glass: rgba(255, 255, 255, 0.72);
	--aacc-glass-border: rgba(197, 198, 202, 0.4);
	--aacc-rail: max(0.75rem, env(safe-area-inset-bottom));
	--aacc-ease: var(--wp--custom--easing--out, cubic-bezier(0.16, 1, 0.3, 1));
}

/* Give the floating dock breathing room so it never covers content. */
body.has-floating-dock {
	padding-bottom: clamp(4.5rem, 10vh, 7rem);
}

/* =========================================================================
   1. Announcement banner
   ========================================================================= */
.aacc-banner {
	position: relative;
	z-index: 9990;
	background: var(--aacc-navy);
	color: #fff;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.01em;
}

.aacc-banner__inner {
	max-width: var(--wp--style--global--content-size, 72rem);
	margin-inline: auto;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.55rem 1rem;
	text-align: center;
	justify-content: center;
}

.aacc-banner--live { background: linear-gradient(90deg, var(--aacc-gold-deep), var(--aacc-slate)); color: #fff; }
.aacc-banner--event { background: linear-gradient(90deg, var(--aacc-slate), var(--aacc-navy)); }
.aacc-banner--weather { background: linear-gradient(90deg, var(--aacc-violet), var(--aacc-navy)); }

.aacc-banner__badge {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	background: rgba(26, 28, 30, 0.85);
	color: #fff;
	border-radius: var(--wp--custom--radius--pill, 999px);
	padding: 0.1rem 0.55rem;
	font-size: 0.72em;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.aacc-banner__link,
.aacc-banner__text { color: inherit; }

.aacc-banner__link { text-decoration: underline; text-underline-offset: 3px; }

.aacc-banner__close {
	all: unset;
	cursor: pointer;
	margin-inline-start: auto;
	display: inline-flex;
	align-items: center;
	padding: 0.25rem;
	border-radius: var(--wp--custom--radius--pill, 999px);
	opacity: 0.8;
}

.aacc-banner__close:hover { opacity: 1; }

/* =========================================================================
   2. Floating dock
   ========================================================================= */
.aacc-dock {
	position: fixed;
	left: 50%;
	bottom: var(--aacc-rail);
	z-index: 9900;
	transform: translateX(-50%);
	transition: transform 400ms var(--aacc-ease), opacity 300ms ease;
}

.aacc-dock--hidden { transform: translate(-50%, calc(100% + 2rem)); opacity: 0; }

.aacc-dock__rail {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	padding: 0.4rem;
	border-radius: var(--wp--custom--radius--pill, 999px);
	background: var(--aacc-glass);
	-webkit-backdrop-filter: blur(18px) saturate(1.6);
	backdrop-filter: blur(18px) saturate(1.6);
	border: 1px solid var(--aacc-glass-border);
	box-shadow: var(--wp--custom--shadow--lg, 0 20px 48px rgba(25, 28, 29, 0.16));
}

.aacc-dock__item {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.7rem 1rem;
	border-radius: var(--wp--custom--radius--pill, 999px);
	color: var(--aacc-navy);
	font-weight: 600;
	font-size: 0.85rem;
	cursor: pointer;
	transition: background-color 200ms ease, color 200ms ease, transform 180ms var(--aacc-ease), box-shadow 200ms ease;
	white-space: nowrap;
}

.aacc-dock__item:hover,
.aacc-dock__item:focus-visible { background: rgba(73, 97, 119, 0.12); }

.aacc-dock__item:active { transform: scale(0.95); }

.aacc-dock__item:focus-visible { outline: 3px solid var(--aacc-accent); outline-offset: 2px; }

.aacc-dock__item .aacc-dock__label { display: inline-flex; flex-direction: column; line-height: 1.15; text-align: left; }
.aacc-dock__item .aacc-dock__label strong { font-size: 0.8rem; }
.aacc-dock__item .aacc-dock__label span { font-weight: 500; color: var(--aacc-muted); font-size: 0.72rem; }

.aacc-dock__menu {
	background: var(--aacc-navy);
	color: #fff;
	box-shadow: var(--wp--custom--shadow--sm, 0 1px 2px rgba(25, 28, 29, 0.08));
}

.aacc-dock__menu:hover,
.aacc-dock__menu:focus-visible { background: #2e3132; }

.aacc-dock__icon { display: inline-flex; align-items: center; justify-content: center; position: relative; }

/* Live indicator dot */
.aacc-live-dot { display: inline-block; width: 0.55rem; height: 0.55rem; margin-inline-end: 0.25rem; border-radius: 50%; background: var(--aacc-ember); box-shadow: 0 0 0 0 rgba(186, 26, 26, 0.6); animation: aacc-pulse 2s infinite; }

@keyframes aacc-pulse {
	0% { box-shadow: 0 0 0 0 rgba(186, 26, 26, 0.6); }
	70% { box-shadow: 0 0 0 8px rgba(186, 26, 26, 0); }
	100% { box-shadow: 0 0 0 0 rgba(186, 26, 26, 0); }
}

/* =========================================================================
   3. Flyouts (directions / search)
   ========================================================================= */
.aacc-flyout {
	position: fixed;
	inset: 0;
	z-index: 9950;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(26, 28, 30, 0.5);
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
	padding: 1rem;
	transition: opacity 250ms ease;
}

.aacc-flyout[hidden] { display: none; }

.aacc-flyout__panel {
	position: relative;
	width: min(34rem, 100%);
	max-height: 82vh;
	overflow-y: auto;
	background: var(--aacc-paper);
	color: var(--aacc-ink);
	border-radius: var(--wp--custom--radius--xl, 0.75rem);
	box-shadow: var(--wp--custom--shadow--lg, 0 20px 48px rgba(25, 28, 29, 0.16));
	padding: 2rem;
	border: 1px solid rgba(197, 198, 202, 0.5);
}

.aacc-flyout__close {
	all: unset;
	position: absolute;
	top: 1rem;
	right: 1rem;
	cursor: pointer;
	padding: 0.35rem;
	border-radius: 50%;
	color: var(--aacc-muted);
}

.aacc-flyout__close:hover { color: var(--aacc-ink); background: rgba(73, 97, 119, 0.12); }

.aacc-flyout__title {
	font-family: var(--wp--preset--font-family--display, serif);
	font-size: var(--wp--preset--font-size--x-large, 2rem);
	margin: 0 0 0.5rem;
}

.aacc-flyout__map {
	width: 100%;
	height: 14rem;
	border: 0;
	border-radius: var(--wp--custom--radius--md, 0.75rem);
	margin-block: 1rem;
	filter: saturate(0.9);
}

.aacc-flyout__actions { display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; }
.aacc-flyout__kids { margin: 0; color: var(--aacc-muted); font-size: var(--wp--preset--font-size--small); }

/* Search */
.aacc-search-form { display: flex; gap: 0.5rem; }

.aacc-search-form__input {
	flex: 1;
	min-width: 0;
	padding: 0.85rem 1rem;
	border-radius: var(--wp--custom--radius--pill, 999px);
	border: 2px solid transparent;
	background: #fff;
	font-size: 1rem;
}

.aacc-search-form__input:focus {
	outline: none;
	border-color: var(--aacc-accent);
}

.aacc-search-form__submit {
	border-radius: var(--wp--custom--radius--pill, 999px);
	padding: 0.85rem 1.5rem;
	border: 0;
	background: var(--aacc-navy);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}

.aacc-search-form__hints {
	margin-top: 0.75rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--aacc-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.aacc-search-form__hints a {
	color: var(--aacc-slate);
	text-decoration: none;
	border-bottom: 1px dashed currentColor;
}

/* =========================================================================
   4. Full-screen overlay menu
   ========================================================================= */
.aacc-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
}

.aacc-overlay[hidden] { display: none; }

.aacc-overlay__scrim {
	position: absolute;
	inset: 0;
	background: rgba(26, 28, 30, 0.45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.aacc-overlay__shell {
	position: relative;
	height: 100%;
	display: grid;
	grid-template-rows: auto 1fr auto;
	background: var(--aacc-paper);
	color: var(--aacc-ink);
	overflow: hidden;
	animation: aacc-overlay-in 320ms var(--aacc-ease);
}

@keyframes aacc-overlay-in {
	from { transform: translateY(2%); opacity: 0; }
	to { transform: none; opacity: 1; }
}

/* Bar */
.aacc-overlay__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.5rem;
	border-bottom: 1px solid rgba(197, 198, 202, 0.5);
	background: rgba(255, 255, 255, 0.55);
}

.aacc-overlay__brand { display: inline-flex; align-items: center; }
.aacc-overlay__brand .custom-logo { max-height: 3rem; width: auto; }
.aacc-overlay__brand-name {
	font-family: var(--wp--preset--font-family--display, serif);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--aacc-ink);
	text-decoration: none;
}

.aacc-overlay__bar-actions { display: flex; align-items: center; gap: 0.75rem; }

.aacc-overlay__live {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.4rem 0.9rem;
	border-radius: var(--wp--custom--radius--pill, 999px);
	background: rgba(73, 97, 119, 0.14);
	color: var(--aacc-slate);
	font-weight: 700;
	font-size: 0.8rem;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.aacc-overlay__close {
	all: unset;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	background: var(--aacc-ink);
	color: #fff;
	transition: transform 200ms var(--aacc-ease);
}

.aacc-overlay__close:hover { transform: rotate(90deg); }

/* Body: split-screen */
.aacc-overlay__body {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	overflow-y: auto;
	min-height: 0;
}

.aacc-overlay__left {
	padding: 2rem clamp(1.5rem, 4vw, 4rem);
	display: flex;
	flex-direction: column;
	gap: 2rem;
	overflow-y: auto;
	background:
		radial-gradient(circle at 15% 10%, rgba(197, 160, 89, 0.1), transparent 40%),
		var(--aacc-paper);
}

.aacc-overlay__right {
	position: relative;
	display: flex;
	flex-direction: column;
	background:
		radial-gradient(120% 90% at 85% 0%, rgba(73, 97, 119, 0.3), transparent 55%),
		radial-gradient(140% 100% at 0% 100%, rgba(197, 160, 89, 0.16), transparent 50%),
		linear-gradient(160deg, #1a1c1e, #2e3132);
	color: #fff;
	padding: 2rem clamp(1.5rem, 4vw, 4rem);
}

/* Intent links */
.aacc-overlay__intents {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.aacc-intent {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	padding: 1.1rem 0.25rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
	color: #fff;
	text-decoration: none;
	transition: padding-left 240ms var(--aacc-ease), color 200ms ease;
}

.aacc-intent:hover { padding-left: 1rem; color: var(--aacc-gold-soft); }

.aacc-intent__meta {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
	transition: color 200ms ease;
}

.aacc-intent:hover .aacc-intent__meta { color: var(--aacc-gold-soft); }

.aacc-intent__title {
	font-family: var(--wp--preset--font-family--display, serif);
	font-size: clamp(1.6rem, 4vw, 2.6rem);
	font-weight: 600;
	line-height: 1.05;
}

.aacc-intent__arrow {
	position: absolute;
	right: 0.5rem;
	bottom: 1.2rem;
	font-size: 1.4rem;
	opacity: 0;
	transform: translateX(-0.5rem);
	transition: opacity 240ms ease, transform 240ms var(--aacc-ease);
}

.aacc-intent:hover .aacc-intent__arrow { opacity: 1; transform: none; }

/* Hover preview panel */
.aacc-overlay__preview {
	position: absolute;
	inset: auto 1.5rem 1.5rem 1.5rem;
	height: 26%;
	border-radius: var(--wp--custom--radius--lg, 1.25rem);
	opacity: 0.9;
	transform: scale(0.985);
	transition: transform 300ms var(--aacc-ease), opacity 300ms ease;
	pointer-events: none;
	box-shadow: var(--wp--custom--shadow--lg, 0 20px 48px rgba(25, 28, 29, 0.16));
}

.aacc-overlay:hover .aacc-overlay__preview { opacity: 1; transform: none; }

.aacc-overlay__preview.has-preview--watch { background: linear-gradient(135deg, #2e3132, #496177); }
.aacc-overlay__preview.has-preview--connect { background: linear-gradient(135deg, #a17f3b, #496177); }
.aacc-overlay__preview.has-preview--events { background: linear-gradient(135deg, #c5a059, #4a6278); }
.aacc-overlay__preview.has-preview--give { background: linear-gradient(135deg, #a17f3b, #1a1c1e); }
.aacc-overlay__preview.has-preview--ministries { background: linear-gradient(135deg, #496177, #1a1c1e); }

/* Left column widgets */
.aacc-overlay__info h4,
.aacc-wizard__heading,
.aacc-latest-sermon__heading {
	font-family: var(--wp--preset--font-family--display, serif);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--aacc-muted);
	margin: 0 0 0.75rem;
}

.aacc-overlay__times {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.aacc-overlay__times li {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	gap: 0 0.75rem;
}

.aacc-overlay__times-label { font-weight: 600; }
.aacc-overlay__times strong { color: var(--aacc-ink); }
.aacc-overlay__times small { grid-column: 1 / -1; color: var(--aacc-muted); font-size: var(--wp--preset--font-size--small); }

.aacc-overlay__address {
	margin-top: 1rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--aacc-muted);
}

/* Plan-your-visit wizard */
.aacc-wizard__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.aacc-wizard__step {
	background: #fff;
	border: 1px solid rgba(197, 198, 202, 0.55);
	border-radius: var(--wp--custom--radius--lg, 0.5rem);
	overflow: hidden;
	transition: box-shadow 200ms ease;
}

.aacc-wizard__step:hover { box-shadow: var(--wp--custom--shadow--md, 0 8px 24px rgba(25, 28, 29, 0.1)); }

.aacc-wizard__step.is-open { box-shadow: var(--wp--custom--shadow--md, 0 8px 24px rgba(25, 28, 29, 0.1)); }

.aacc-wizard__btn {
	all: unset;
	cursor: pointer;
	width: 100%;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	font-weight: 600;
	color: var(--aacc-navy);
}

.aacc-wizard__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.6rem;
	height: 1.6rem;
	flex: none;
	border-radius: 50%;
	background: var(--aacc-navy);
	color: #fff;
	font-size: 0.8rem;
	font-weight: 800;
}

.aacc-wizard__content {
	padding: 0 1rem 0.9rem 3.35rem;
	color: var(--aacc-muted);
	font-size: var(--wp--preset--font-size--small);
	animation: aacc-fade-in 220ms ease;
}

@keyframes aacc-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Latest sermon widget */
.aacc-latest-sermon__art img {
	width: 3.5rem;
	height: 3.5rem;
	object-fit: cover;
	border-radius: var(--wp--custom--radius--md, 0.75rem);
	float: left;
	margin-inline-end: 0.85rem;
}

.aacc-latest-sermon__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display, serif);
	font-size: 1.05rem;
	line-height: 1.3;
}

.aacc-latest-sermon__title a { color: var(--aacc-ink); text-decoration: none; }
.aacc-latest-sermon__title a:hover { color: var(--aacc-gold-deep); }

.aacc-latest-sermon__passage {
	margin: 0.2rem 0 0;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--aacc-gold-deep);
	font-weight: 600;
}

.aacc-latest-sermon__play { margin-top: 0.85rem; font-size: 0.85rem; }

/* Overlay footer */
.aacc-overlay__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem;
	padding: 1rem 1.5rem;
	background: rgba(25, 28, 29, 0.04);
	border-top: 1px solid rgba(197, 198, 202, 0.5);
	font-size: var(--wp--preset--font-size--small);
}

.aacc-overlay__social {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 1rem;
}

.aacc-overlay__social a {
	color: var(--aacc-muted);
	text-decoration: none;
	font-weight: 600;
}

.aacc-overlay__social a:hover { color: var(--aacc-gold-deep); }

.aacc-overlay__copyright { margin: 0; color: var(--aacc-muted); }

/* =========================================================================
   5. Media modal (shared with media.js)
   ========================================================================= */
.aacc-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(26, 28, 30, 0.82);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	padding: 1.5rem;
}

.aacc-modal[hidden] { display: none; }

.aacc-modal__shell {
	position: relative;
	width: min(60rem, 100%);
	background: #1a1c1e;
	border-radius: var(--wp--custom--radius--xl, 0.75rem);
	overflow: hidden;
	box-shadow: var(--wp--custom--shadow--lg, 0 20px 48px rgba(25, 28, 29, 0.2));
}

.aacc-modal__close {
	all: unset;
	cursor: pointer;
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	z-index: 2;
	width: 2.5rem;
	height: 2.5rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

.aacc-modal__close:hover { background: rgba(255, 255, 255, 0.3); }

.aacc-modal__frame { width: 100%; aspect-ratio: 16 / 9; }
.aacc-modal__frame iframe,
.aacc-modal__frame video,
.aacc-modal__frame audio { width: 100%; height: 100%; border: 0; display: block; }

/* =========================================================================
   6. Accessibility & motion preferences
   ========================================================================= */
.aacc-dock__item:focus-visible,
.aacc-banner a:focus-visible,
.aacc-flyout a:focus-visible,
.aacc-overlay a:focus-visible,
.aacc-overlay button:focus-visible {
	outline: 3px solid var(--aacc-accent);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.aacc-dock__item,
	.aacc-intent,
	.aacc-overlay__close,
	.aacc-overlay__preview,
	.aacc-live-dot,
	.aacc-overlay__shell {
		transition: none !important;
		animation: none !important;
	}
}

/* =========================================================================
   7. Responsive
   ========================================================================= */
@media (max-width: 860px) {
	.aacc-overlay__body { grid-template-columns: 1fr; }
	.aacc-overlay__right { min-height: 24rem; }

	/* Compact dock: icons only on small screens, labels on tap-expand. */
	.aacc-dock__item .aacc-dock__label { display: none; }
	.aacc-dock__item { padding: 0.8rem; }

	.aacc-overlay__preview { display: none; }
}

@media (min-width: 861px) and (max-width: 1100px) {
	.aacc-overlay__left,
	.aacc-overlay__right { padding: 1.5rem; }
}
