/*
 * AFA Voice Guide - visitor widget styles.
 * Large print, high contrast, keyboard friendly. Deliberately NOT gold:
 * the site's single gold button stays the only gold thing on the page.
 */
.afav {
	--afav-ink: #14202b;       /* Main text */
	--afav-bg: #ffffff;        /* Panel background */
	--afav-soft: #eef2f5;      /* Section/caption background */
	--afav-muted: #46525d;     /* Notes */
	--afav-accent: #1f5f8b;    /* Buttons (deep blue) */
	--afav-accent-ink: #ffffff;
	--afav-live: #b3261e;      /* "Live" / End button */
	--afav-focus: #ffbf47;     /* Focus ring - very visible */

	position: fixed;
	bottom: 16px;
	z-index: 99990;
	font-family: inherit;
	font-size: 18px;
	line-height: 1.45;
	color: var(--afav-ink);
}
.afav *, .afav *::before, .afav *::after { box-sizing: border-box; }
.afav--right { right: 16px; }
.afav--left { left: 16px; }

@media (prefers-color-scheme: dark) {
	.afav {
		--afav-ink: #f3f5f7;
		--afav-bg: #121a22;
		--afav-soft: #1d2833;
		--afav-muted: #b9c3cc;
		--afav-accent: #4a9fd8;
		--afav-accent-ink: #0b141c;
		--afav-live: #ff6b5e;
	}
}

/* ---- Floating button --------------------------------------------------- */
.afav-fab {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 10px 20px;
	border: 2px solid var(--afav-bg);
	border-radius: 999px;
	background: var(--afav-ink);
	color: var(--afav-bg);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
}
.afav-fab-icon { font-size: 24px; line-height: 1; }
.afav-is-live .afav-fab { background: var(--afav-live); color: #fff; }
.afav-is-live .afav-fab-icon::after { content: " ●"; font-size: 14px; animation: afav-pulse 1.2s infinite; }
@keyframes afav-pulse { 50% { opacity: .2; } }

/* ---- Panel --------------------------------------------------------------- */
.afav-panel {
	position: absolute;
	bottom: 72px;
	width: min(420px, calc(100vw - 32px));
	max-height: calc(100vh - 120px);
	overflow: auto;
	padding: 16px 18px 18px;
	background: var(--afav-bg);
	color: var(--afav-ink);
	border: 2px solid var(--afav-ink);
	border-radius: 14px;
	box-shadow: 0 10px 34px rgba(0, 0, 0, .3);
}
.afav--right .afav-panel { right: 0; }
.afav--left .afav-panel { left: 0; }
.afav-panel[hidden] { display: none; }

.afav-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.afav-head h2 { margin: 0; font-size: 22px; line-height: 1.2; color: inherit; }
.afav-x {
	min-width: 44px; min-height: 44px;
	border: 0; border-radius: 8px;
	background: transparent; color: inherit;
	font-size: 22px; cursor: pointer;
}

.afav-sec { margin-top: 14px; padding: 12px; background: var(--afav-soft); border-radius: 10px; }
.afav-sec h3 { margin: 0 0 10px; font-size: 19px; color: inherit; }
.afav-audio { width: 100%; }

.afav-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.afav-btn {
	min-height: 52px;
	padding: 10px 20px;
	border: 0;
	border-radius: 10px;
	background: var(--afav-accent);
	color: var(--afav-accent-ink);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.afav-end { background: var(--afav-live); color: #fff; }
.afav-btn[hidden], .afav-timer[hidden], .afav-check[hidden], .afav-caps[hidden] { display: none; }
.afav-timer { font-weight: 700; font-variant-numeric: tabular-nums; }

.afav-status { margin: 10px 0 0; font-weight: 600; min-height: 1.45em; }
.afav-check { margin-top: 10px; }

/* "Prefer the full story?" link-style button under the player. */
.afav-link {
	margin-top: 10px;
	padding: 6px 0;
	border: 0;
	background: none;
	color: var(--afav-accent);
	font: inherit;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

/* Captions: big and easy to read. */
.afav-caps {
	margin-top: 10px;
	max-height: 220px;
	overflow: auto;
	padding: 10px 12px;
	background: var(--afav-bg);
	border: 1px solid var(--afav-muted);
	border-radius: 8px;
	font-size: 20px;
}
.afav-cap { margin: 0 0 8px; }
.afav-cap--you { color: var(--afav-muted); }

.afav-note { margin: 10px 0 0; font-size: 15px; color: var(--afav-muted); }

/* Strong, obvious keyboard focus. */
.afav button:focus-visible, .afav audio:focus-visible {
	outline: 3px solid var(--afav-focus);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.afav-is-live .afav-fab-icon::after { animation: none; }
}

/* Small phones: keep the button compact. */
@media (max-width: 380px) {
	.afav-fab-label { display: none; }
	.afav-fab { padding: 10px 16px; }
}
