/* ==========================================================================
   Appointment booking — Figma 25:11
   ========================================================================== */

.appointment {
	padding-block: 80px;
	background: var(--color-cream);
}

.appointment__inner {
	display: grid;
	grid-template-columns: minmax(0, 560px) minmax(0, 660px);
	justify-content: space-between;
	align-items: start;
	gap: 40px;
}

.appointment__media {
	position: sticky;
	top: 110px;
}

/* Image + hours card ---------------------------------------------------------- */
.appointment__media {
	position: relative;
}

.appointment__image {
	position: relative;
	height: 520px;
	margin: 0;
	overflow: hidden;
	border-radius: 32px;
	background: var(--color-night-card);
}

.appointment__image img {
	position: absolute;
	left: 0;
	top: -5%;
	width: 100%;
	height: 110%;
	object-fit: cover;
}

.appointment__hours {
	position: absolute;
	left: 32px;
	top: calc(100% - 80px);
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 24px 16px 20px;
	border-radius: 20px;
	background: var(--color-white);
	box-shadow: 0 14px 30px rgba(77, 13, 20, 0.15);
	line-height: normal;
	white-space: nowrap;
	font-family: var(--font-ui);
	transition: transform var(--dur-base) var(--ease-out);
}

.appointment__hours:hover {
	transform: translateY(-3px);
}

.appointment__hours strong {
	display: block;
	font-size: 17px;
	font-weight: 700;
	color: var(--color-ink);
}

.appointment__hours strong + span {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-slate);
}

.appointment__dot {
	position: relative;
	display: block;
	width: 12px;
	height: 12px;
}

.appointment__dot::after { /* "live" ping */
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--radius-pill);
	background: #1fa46a;
	animation: appt-ping 2s var(--ease-out) infinite;
}

@keyframes appt-ping {
	from { transform: scale(1); opacity: 0.6; }
	to   { transform: scale(2.6); opacity: 0; }
}

/* Form card --------------------------------------------------------------------- */
.appointment__card {
	padding: 48px;
	border-radius: 32px;
	background: var(--color-white);
	box-shadow: 0 20px 50px rgba(77, 13, 20, 0.08);
}

.appointment__form-wrap,
.appointment-form {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.appointment__intro {
	margin-top: -6px;
	font-size: 18px;
	line-height: 1.55;
	color: var(--color-slate);
}

.appointment__form-wrap[hidden],
.appointment__success[hidden] {
	display: none;
}

.appointment-form__row {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

/* Patient type: two radio "pills" styled like the text fields */
.appointment-form__choice {
	min-inline-size: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.appointment-form__legend {
	margin-bottom: 8px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--color-ink);
}

.appointment-form__options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 10px;
}

.appointment-form__option {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 53px;
	padding: 10px 18px;
	border: 1px solid rgba(140, 16, 27, 0.12);
	border-radius: 14px;
	background: var(--color-cream);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--color-ink);
	cursor: pointer;
	transition: border-color var(--dur-fast), background-color var(--dur-fast), box-shadow var(--dur-fast);
}

.appointment-form__option:hover {
	border-color: rgba(140, 16, 27, 0.3);
}

.appointment-form__option input {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid rgba(140, 16, 27, 0.35);
	border-radius: 50%;
	background: var(--color-white);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color var(--dur-fast), background var(--dur-fast);
}

.appointment-form__option input:checked {
	border-color: var(--color-burgundy-600);
	background: radial-gradient(var(--color-burgundy-600) 0 40%, var(--color-white) 45%);
}

.appointment-form__option input:focus {
	outline: none;
}

.appointment-form__option:has(:checked) {
	border-color: var(--color-burgundy-600);
	background: var(--color-white);
}

.appointment-form__option:has(:focus-visible) {
	border-color: var(--color-burgundy-600);
	box-shadow: 0 0 0 4px rgba(140, 16, 27, 0.1);
}

.field.is-invalid .appointment-form__option {
	border-color: #c0392b;
}

.appointment-form__textarea {
	height: auto;
	min-height: 110px;
	padding-block: 15px;
	line-height: 1.6;
	resize: vertical;
}

.appointment-form__privacy {
	font-size: 16px;
	line-height: 1.5;
	color: var(--color-slate);
}

.appointment-form__privacy a {
	color: var(--color-burgundy-600);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.appointment-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.appointment-form__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 15px; /* same height as .btn */
	border-radius: var(--radius-button); /* matches every other button on the site */
	background: var(--color-burgundy-600);
	font-family: var(--font-ui);
	font-size: 15px;
	font-weight: 600;
	line-height: normal;
	color: var(--color-white);
	transition: background-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast) var(--ease-out);
}

.appointment-form__submit:hover {
	background: var(--color-burgundy-800);
	box-shadow: 0 12px 30px rgba(140, 16, 27, 0.28);
}

.appointment-form__submit:hover .btn__arrow {
	transform: translateX(4px);
}

.appointment-form__submit:active {
	transform: scale(0.99);
}

.appointment-form__submit[disabled] {
	cursor: progress;
	opacity: 0.75;
}

.appointment-form__error {
	margin-top: -8px;
	font-family: var(--font-ui);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	color: #b42318;
}

.appointment__note {
	font-size: 17px;
	line-height: 1.5;
	color: var(--color-slate);
}

.appointment__note a {
	font-family: var(--font-ui);
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	color: var(--color-burgundy-600);
	transition: color var(--dur-fast);
}

.appointment__note a:hover {
	color: var(--color-burgundy-600);
}

/* Success state */
.appointment__success {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	padding-block: 24px;
}

.appointment__success:focus {
	outline: none;
}

.appointment__success > p:not(.appointment__note) {
	max-width: 440px;
	font-size: 19px;
	line-height: 1.7;
	color: var(--color-slate);
}

.appointment__success-icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	border-radius: var(--radius-pill);
	background: var(--color-burgundy-600);
}

@media (max-width: 1180px) {
	.appointment__inner {
		grid-template-columns: 0.8fr 1.2fr;
	}

	.appointment__card {
		padding: 36px;
	}
}

@media (max-width: 960px) {
	.appointment {
		padding-block: 72px;
	}

	.appointment__inner {
		grid-template-columns: 1fr;
		gap: 56px;
	}

	.appointment__media {
		position: relative;
		top: 0;
	}

	.appointment__image {
		height: auto;
		aspect-ratio: 640 / 520;
	}
}

@media (max-width: 560px) {
	.appointment-form__submit {
		padding: 14px;
		font-size: 14px;
	}

	.appointment__card {
		padding: 28px 22px;
		border-radius: 24px;
	}

	.appointment-form__row {
		grid-template-columns: 1fr;
	}

	.appointment__image {
		border-radius: 24px;
	}

	.appointment__hours {
		left: 16px;
		top: calc(100% - 44px);
	}
}
