/* "Ask anything" row — Hospital Ledger styling of the infinite-FAQ drop-in.
   Palette is the site's own (src/components/Layout.tsx: bg-zinc-950 / text-zinc-100,
   emerald-300/400/500 accents, zinc-800 rules, zinc-900 cards). Selectors are scoped
   under .faq-ask and written at two-class specificity so the page's global
   `input:focus { outline: 2px solid #34d399 }` rule (Layout.tsx <style>) and
   Tailwind's preflight cannot restyle the box. */

.faq-ask {
	--faq-ink: #f4f4f5; /* zinc-100 */
	--faq-muted: #a1a1aa; /* zinc-400 */
	--faq-line: #3f3f46; /* zinc-700 */
	--faq-card: #18181b; /* zinc-900 */
	--faq-accent: #34d399; /* emerald-400 */
	--faq-accent-strong: #10b981; /* emerald-500 */
	--faq-accent-ink: #09090b; /* zinc-950, text on the accent */
	--faq-error: #fda4af; /* rose-300 */
	color: var(--faq-ink);
}

/* Home page: sits under the hero's lead paragraph, in its column. */
.faq-ask--hero .faq-ask-form {
	min-height: 3.5rem;
	border: 1px solid var(--faq-accent);
	border-radius: 0.75rem;
	background: var(--faq-card);
	box-shadow: 0 0 0 1px rgba(52, 211, 153, 0.15);
}

.faq-ask--hero .faq-ask-form:focus-within {
	box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.35);
}

/* Detail pages: a card like the ones around it, lit up on focus. */
.faq-ask--hospital .faq-ask-form,
.faq-ask--procedure .faq-ask-form,
.faq-ask--payer .faq-ask-form {
	min-height: 3.25rem;
	border: 1px solid var(--faq-line);
	border-radius: 0.5rem;
	background: var(--faq-card);
}

.faq-ask--hospital .faq-ask-form:focus-within,
.faq-ask--procedure .faq-ask-form:focus-within,
.faq-ask--payer .faq-ask-form:focus-within {
	border-color: var(--faq-accent);
	box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.25);
}

.faq-ask .faq-ask-form {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0 0.5rem 0 1rem;
	margin: 0;
}

.faq-ask .faq-ask-input,
.faq-ask .faq-ask-input:focus {
	flex: 1;
	min-width: 0;
	min-height: 2.75rem;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--faq-ink);
	font: inherit;
	font-size: 16px; /* ≥16px: no iOS auto-zoom on focus */
	font-weight: 500;
	outline: none;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	text-overflow: ellipsis; /* long placeholder on a 390px phone clips with an ellipsis */
}

.faq-ask .faq-ask-input::placeholder {
	color: var(--faq-muted);
	font-weight: 400;
	opacity: 1;
	text-overflow: ellipsis;
}

.faq-ask .faq-ask-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--faq-muted);
	cursor: pointer;
	touch-action: manipulation;
}

.faq-ask .faq-ask-btn:disabled {
	cursor: default;
}

.faq-ask .faq-ask-btn.is-ready,
.faq-ask .faq-ask-btn.is-stop {
	background: var(--faq-accent-strong);
	color: var(--faq-accent-ink);
}

.faq-ask .faq-ask-btn.is-ready:hover,
.faq-ask .faq-ask-btn.is-stop:hover {
	background: var(--faq-accent);
}

.faq-ask .faq-ask-btn:focus-visible {
	outline: 2px solid var(--faq-accent);
	outline-offset: 2px;
}

/* Answer typography: 15px, relaxed leading, underlined emerald links. */
.faq-ask .faq-answer {
	padding: 0.875rem 0.25rem 0.25rem;
	color: var(--faq-ink);
	font-size: 15px;
	line-height: 1.625;
	text-align: left;
}

.faq-ask .faq-answer p {
	margin: 0.375rem 0;
}

.faq-ask .faq-answer ul,
.faq-ask .faq-answer ol {
	margin: 0.375rem 0;
	padding-left: 1.25rem;
}

.faq-ask .faq-answer ul {
	list-style: disc;
}

.faq-ask .faq-answer ol {
	list-style: decimal;
}

.faq-ask .faq-answer li {
	margin: 0.125rem 0;
}

.faq-ask .faq-answer a {
	color: var(--faq-accent);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}

.faq-ask .faq-answer strong {
	font-weight: 700;
	color: #fff;
}

.faq-ask .faq-answer code {
	font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 0.9em;
}

.faq-ask .faq-answer > :first-child {
	margin-top: 0;
}

.faq-ask .faq-answer > :last-child {
	margin-bottom: 0;
}

.faq-ask .faq-error {
	color: var(--faq-error);
	font-weight: 600;
}

/* "Reading the site" shimmer: a light sweep across muted text. */
.faq-ask .faq-shimmer {
	display: inline-block;
	color: transparent;
	background: linear-gradient(90deg, #71717a 0%, #f4f4f5 50%, #71717a 100%);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	animation: faq-shimmer 1.6s linear infinite;
}

@keyframes faq-shimmer {
	from {
		background-position: 200% 0;
	}
	to {
		background-position: -200% 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.faq-ask .faq-shimmer {
		animation: none;
		color: var(--faq-muted);
		background: none;
	}
}

.faq-ask .faq-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
