/* Avive Call Us — header button and chooser. Colours and fonts come from the Elementor global kit. */

.avcu-trigger,
.avcu {
	--avcu-primary: var(--e-global-color-primary, #00c7b1);
	--avcu-secondary: var(--e-global-color-secondary, #041e42);
	--avcu-text: var(--e-global-color-text, #2d2926);
	--avcu-muted: #5c6470;
	--avcu-border: #dfe3e8;
}

/* ---------- Button ---------- */
.avcu-trigger {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	min-height: 40px;
	padding: 8px 18px;
	border-radius: 999px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .15s, color .15s;
}
.avcu-trigger--dark,
.avcu-trigger--dark:visited { background: var(--avcu-secondary); color: #fff; }
.avcu-trigger--dark:hover,
.avcu-trigger--dark:focus { background: #0b3470; color: #fff; }
.avcu-trigger--light,
.avcu-trigger--light:visited { min-height: 32px; padding: 6px 14px; background: var(--avcu-primary); color: var(--avcu-secondary); font-size: 14px; }
.avcu-trigger--light:hover,
.avcu-trigger--light:focus { background: #fff; color: var(--avcu-secondary); }
.avcu-trigger:focus-visible { outline: 3px solid var(--avcu-primary); outline-offset: 2px; }

/* ---------- Dialog ---------- */
.avcu {
	width: min(460px, calc(100% - 32px));
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	border-radius: 24px;
	background: #fff;
	color: var(--avcu-text);
	box-shadow: 0 24px 60px rgba(4, 30, 66, .25);
	overflow: auto;
}
.avcu::backdrop { background: rgba(4, 30, 66, .45); }
.avcu *,
.avcu *::before,
.avcu *::after { box-sizing: border-box; }

/* The dialog sits outside Elementor's content, so set the site fonts here, and undo the theme's
   default button look (pink border, single line of text, centred) for the chooser's buttons. */
.avcu,
.avcu-trigger { font-family: var(--e-global-typography-text-font-family, "BR Firma"), system-ui, sans-serif; }
.avcu { overflow-x: hidden; }
.avcu .avcu__title,
.avcu .avcu__option-title,
.avcu .avcu__clinic-name { font-family: var(--e-global-typography-primary-font-family, "BR Firma"), system-ui, sans-serif; }
.avcu button,
.avcu button:hover,
.avcu button:focus {
	border: 0;
	background: transparent;
	color: var(--avcu-secondary);
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
	white-space: normal;
}

.avcu__sheet { position: relative; padding: 28px 24px 24px; }
.avcu__grip { display: none; }

.avcu .avcu__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--avcu-muted);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.avcu .avcu__close:hover { background: #f0f3f7; color: var(--avcu-secondary); }

.avcu .avcu__title {
	margin: 0 44px 18px 0;
	color: var(--avcu-secondary);
	font-size: 21px;
	font-weight: 700;
	line-height: 1.25;
	outline: none;
}

.avcu .avcu__option {
	display: grid;
	gap: 4px;
	width: 100%;
	margin: 0 0 12px;
	padding: 18px 18px 16px;
	border: 1px solid var(--avcu-border);
	border-radius: 16px;
	background: #f7f9fb;
	color: var(--avcu-text);
	font: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}
.avcu .avcu__option--hospital { border-color: var(--avcu-primary); background: #e3f8f5; }
.avcu button.avcu__option { border: 1px solid var(--avcu-border); background: #f7f9fb; color: var(--avcu-text); }
.avcu button.avcu__option:hover,
.avcu button.avcu__option:focus { background: #f7f9fb; color: var(--avcu-text); }
.avcu .avcu__option:hover,
.avcu .avcu__option:focus-visible { border-color: var(--avcu-secondary); box-shadow: 0 6px 18px rgba(4, 30, 66, .12); color: var(--avcu-text); }
.avcu__option:focus-visible,
.avcu__clinic:focus-visible,
.avcu__back:focus-visible,
.avcu__close:focus-visible { outline: 3px solid var(--avcu-primary); outline-offset: 2px; }

.avcu__option-title { color: var(--avcu-secondary); font-size: 18px; font-weight: 700; line-height: 1.3; }
.avcu__option-text { color: var(--avcu-muted); font-size: 15px; line-height: 1.45; }
.avcu__option-action {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	margin-top: 8px;
	color: var(--avcu-secondary);
	font-size: 19px;
	font-weight: 700;
}
.avcu__icon { color: #007a6c; }

.avcu .avcu__back {
	margin: -8px 0 10px -8px;
	padding: 8px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--avcu-secondary);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.avcu .avcu__back:hover { background: #f0f3f7; }

.avcu__clinics { display: grid; gap: 10px; margin: 0 0 12px; padding: 0; list-style: none; }
.avcu__clinic {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 2px 12px;
	align-items: center;
	padding: 14px 16px;
	border: 1px solid var(--avcu-border);
	border-radius: 14px;
	color: var(--avcu-text);
	text-decoration: none;
}
.avcu__clinic:hover { border-color: var(--avcu-secondary); color: var(--avcu-text); }
.avcu__clinic-name { color: var(--avcu-secondary); font-size: 17px; font-weight: 700; }
.avcu__clinic-detail { grid-column: 1; color: var(--avcu-muted); font-size: 14px; }
.avcu__clinic-hours { grid-column: 1; color: var(--avcu-muted); font-size: 13px; }
.avcu__clinic-phone { grid-column: 2; grid-row: 1 / span 3; color: var(--avcu-secondary); font-weight: 700; white-space: nowrap; }
.avcu__clinic--telehealth { background: #f7f9fb; }
.avcu__clinic--telehealth .avcu__clinic-phone { font-size: 14px; }

.avcu .avcu__hours-note { margin: 4px 0 0; color: var(--avcu-muted); font-size: 13px; }
.avcu .avcu__crisis { margin: 6px 0 0; color: #9b2c1f; font-size: 14px; line-height: 1.5; }
.avcu .avcu__crisis a { color: inherit; font-weight: 700; }

/* Phones: slides up from the bottom, like a native sheet. */
@media (max-width: 767px) {
	.avcu {
		width: 100%;
		max-width: none;
		max-height: 90vh;
		margin: auto 0 0;
		border-radius: 24px 24px 0 0;
	}
	.avcu[open] { animation: avcu-up .25s ease-out; }
	.avcu__sheet { padding: 12px 20px calc(20px + env(safe-area-inset-bottom)); }
	.avcu__grip { display: block; width: 44px; height: 5px; margin: 0 auto 16px; border-radius: 3px; background: #d5dae1; }
	.avcu__close { top: 18px; }
	.avcu__clinic { grid-template-columns: 1fr; }
	.avcu__clinic-phone { grid-column: 1; grid-row: auto; margin-top: 4px; }
}

@keyframes avcu-up {
	from { transform: translateY(100%); }
	to { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
	.avcu[open] { animation: none; }
	.avcu-trigger,
	.avcu__option { transition: none; }
}
