/* =========================================================================
 * Charlotte Gastro — Schedule Appointment Modal
 * Scoped to .cg-schedule-modal to avoid leaking into the rest of the site.
 * ========================================================================= */

.cg-schedule-modal,
.cg-schedule-modal *,
.cg-schedule-modal *::before,
.cg-schedule-modal *::after {
	box-sizing: border-box;
}

/* Neutralize the global `a:not(.btn)` styles from _typography.scss
 * (forced fit-content width, gradient underline trick, padding-bottom, slow transition).
 * Specific rules below re-add their own transitions where needed. */
.cg-schedule-modal a {
	width: auto;
	max-width: none;
	background-image: none;
	background-size: auto;
	background-position: 0 0;
	background-repeat: repeat;
	transition: none;
}

.cg-schedule-modal a:hover {
	background-size: auto;
}

.cg-schedule-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	font-family: "Corsa Grotesk", sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 200ms ease, visibility 0s linear 200ms;
}

.cg-schedule-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition: opacity 200ms ease, visibility 0s linear 0s;
}

/* Backdrop */
.cg-schedule-modal__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(21, 19, 24, 0.80);
}

/* Dialog */
.cg-schedule-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 480px;
	background-color: #f5f4ed;
	border-radius: 12px;
	padding: 36px 32px 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
	transform: translateY(8px);
	transition: transform 240ms ease;
}

.cg-schedule-modal.is-open .cg-schedule-modal__dialog {
	transform: translateY(0);
}

@media (max-width: 520px) {
	.cg-schedule-modal {
		padding: 4vw;
	}
	.cg-schedule-modal__dialog {
		padding: 40px 4vw 32px !important;
		border-radius: 12px;
	}
	.cg-schedule-modal__mychart-title {
		font-size: 15px !important;
	}
	.cg-schedule-modal__card {
		padding: 18px 4vw 16px !important;
	}
}

/* Close button */
.cg-schedule-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: #444441;
	cursor: pointer;
	padding: 0;
	transition: background-color 150ms ease, color 150ms ease;
}

.cg-schedule-modal__close:hover,
.cg-schedule-modal__close:focus-visible {
	background-color: rgba(0, 0, 0, 0.05);
	color: #111111;
	outline: none;
}

.cg-schedule-modal__close:focus-visible {
	box-shadow: 0 0 0 2px #534AB7;
}

/* Header */
.cg-schedule-modal__header {
	margin-bottom: 22px;
}

.cg-schedule-modal__eyebrow {
	margin: 0;
	color: #44206e;
	font-size: 12px;
	font-weight: bold;
	letter-spacing: 0.48px;
	text-transform: uppercase;
	line-height: 1;
}

.cg-schedule-modal__title {
	margin: 16px 0 12px;
	color: #000000;
	font-size: 28px;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.cg-schedule-modal__intro {
	margin: 0;
	line-height: 1.5;
	font-weight: 400;
}

@media (max-width: 520px) {
	.cg-schedule-modal__title {
		font-size: 24px;
	}
}

/* Cards */
.cg-schedule-modal__cards {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 18px;
}

.cg-schedule-modal__card {
	background-color: #FFFFFF;
	/* border: 0.5px solid rgba(0, 0, 0, 0.08); */
	border-radius: 12px;
	padding: 18px 18px 16px !important;
	display: block;
	text-decoration: none;
	color: inherit;
}

/* Phone CTA */
.cg-schedule-modal__phone {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	border: 1px solid #44206e;
	background-color: #44206e;
	color: #FFFFFF;
	border-radius: 8px;
	padding: 16px 20px !important;
	font-size: 20px;
	font-weight: bold !important;
	line-height: 1.1;
	letter-spacing: -0.01em;
	text-decoration: none;
	transition: all 0.24s ease-out !important;
}

.cg-schedule-modal__phone:hover {
	background-color: white;
	color: #44206e;
}

.cg-schedule-modal__phone:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.45);
}

.cg-schedule-modal__phone svg {
	flex: 0 0 auto;
	height: 16px !important;
}

.cg-schedule-modal__phone-note {
	margin: 14px 0 0;
	text-align: center;
	color: #5F5E5A;
	font-size: 13px;
	line-height: 1.45;
}

/* MyChart card */
.cg-schedule-modal__mychart {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	transition: all 0.24s ease-out !important;
}

.cg-schedule-modal__mychart:hover {
	box-shadow: 0 0 0 1px #44206e inset;
	background-color: #FDFCFA;
}

.cg-schedule-modal__mychart:focus-visible {
	outline: none;
	border-color: #534AB7;
	box-shadow: 0 0 0 3px rgba(83, 74, 183, 0.25);
}

.cg-schedule-modal__mychart-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.cg-schedule-modal__mychart-title {
	color: #1A1A1A;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.cg-schedule-modal__mychart-sub {
	color: #5F5E5A;
	font-size: 13px;
	line-height: 1.4;
}

.cg-schedule-modal__mychart-arrow {
	color: #44206e;
	flex: 0 0 auto;
}

/* Hours */
.cg-schedule-modal__hours {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	text-align: center;
}

.cg-schedule-modal__hours-line {
	margin: 0;
	color: #5F5E5A;
	font-size: 13px;
	line-height: 1.5;
}

.cg-schedule-modal__hours-line + .cg-schedule-modal__hours-line {
	margin-top: 2px;
}

/* Footer */
.cg-schedule-modal__footer {
	margin-top: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 13px;
	line-height: 1.4;
}

.cg-schedule-modal__after-hours {
	color: #5F5E5A;
}

.cg-schedule-modal__callback {
	color: #44206e;
	font-weight: bold !important;
	text-decoration: none;
	transition: color 150ms ease;
}

.cg-schedule-modal__callback:hover,
.cg-schedule-modal__callback:focus-visible {
	text-decoration: underline;
	outline: none;
}

/* Body scroll lock helper (set by JS) */
html.cg-schedule-modal-open,
body.cg-schedule-modal-open {
	overflow: hidden;
}

body.cg-schedule-modal-open {
	position: fixed;
	width: 100%;
}
