/**
 * Appointment callback modal — Figma 842:9517.
 */

html.appointment-modal-open {
	overflow: hidden;
}

.appointment-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 32px;
}

.appointment-modal[hidden] {
	display: none;
}

.appointment-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(67, 72, 85, 0.48);
}

.appointment-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(800px, 100%);
	max-height: calc(100vh - 48px);
}

.appointment-modal__close {
	position: absolute;
	top: -26px;
	right: -26px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	border-radius: 52px;
	background: var(--dr-hug-white);
	box-shadow: 0 0 4px rgba(41, 12, 15, 0.08);
	cursor: pointer;
}

.appointment-modal__close img {
	display: block;
	width: 32px;
	height: 32px;
}

.appointment-modal__panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
	height: 500px;
	max-height: calc(100vh - 48px);
	overflow: hidden;
	border-radius: 24px;
	background: var(--dr-hug-white);
	box-shadow: 0 16px 48px rgba(41, 12, 15, 0.16);
}

.appointment-modal__form-col {
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 32px;
}

.appointment-modal__title {
	margin: 0;
	font-family: var(--dr-hug-font-family);
	font-size: 28px;
	font-weight: var(--dr-hug-font-weight-bold);
	line-height: 1.4;
	color: var(--dr-hug-black);
}

/* Figma auto-layout: title | fields | checkbox | button with space-between */
.appointment-modal__form {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 1 1 auto;
	width: 100%;
	min-height: 0;
	height: 100%;
	margin: 0;
	gap: 0;
}

.appointment-modal__fields {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

.appointment-modal__field {
	display: block;
	width: 100%;
}

.appointment-modal__footer {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
}

/* Beat theme style.css `input[type=…] { padding: 3px }` (higher attribute specificity). */
.appointment-modal input.appointment-modal__input[type="text"],
.appointment-modal input.appointment-modal__input[type="tel"] {
	display: block;
	width: 100%;
	min-height: 48px;
	height: auto;
	margin: 0;
	padding: 12px 16px;
	border: 2px solid var(--dr-hug-grey-light);
	border-radius: 12px;
	background: var(--dr-hug-white);
	font-family: inherit;
	font-size: var(--dr-hug-font-size-base);
	font-weight: var(--dr-hug-font-weight-medium);
	line-height: normal;
	color: var(--dr-hug-black);
	box-sizing: border-box;
	outline: none;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.appointment-modal input.appointment-modal__input[type="text"]::placeholder,
.appointment-modal input.appointment-modal__input[type="tel"]::placeholder {
	color: var(--dr-hug-grey);
	opacity: 1;
}

.appointment-modal input.appointment-modal__input[type="text"]:focus,
.appointment-modal input.appointment-modal__input[type="tel"]:focus {
	outline: none;
	border-color: var(--dr-hug-pink-light);
	box-shadow: none;
}

.appointment-modal__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
}

.appointment-modal__checkbox-input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.appointment-modal__checkbox-box {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	border: 2px solid var(--dr-hug-pink-light);
	border-radius: 4px;
	background: var(--dr-hug-white);
	box-sizing: border-box;
}

.appointment-modal__checkbox-input:checked + .appointment-modal__checkbox-box {
	background: var(--dr-hug-pink);
	border-color: var(--dr-hug-pink);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10' fill='none'%3E%3Cpath d='M1 5l3.5 3.5L11 1' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 12px 10px;
}

.appointment-modal__checkbox-input:focus-visible + .appointment-modal__checkbox-box {
	outline: 2px solid var(--dr-hug-pink);
	outline-offset: 2px;
}

.appointment-modal__checkbox-text {
	flex: 1 1 auto;
	min-width: 0;
	font-family: var(--dr-hug-font-family);
	font-size: var(--dr-hug-font-size-base);
	font-weight: var(--dr-hug-font-weight-medium);
	line-height: 1.4;
	color: var(--dr-hug-black);
}

.appointment-modal__privacy-link {
	color: var(--dr-hug-pink);
	text-decoration: none;
}

.appointment-modal__privacy-link:hover,
.appointment-modal__privacy-link:focus {
	text-decoration: underline;
}

.appointment-modal__form-status {
	margin: 0;
	font-size: var(--dr-hug-font-size-sm);
	font-weight: var(--dr-hug-font-weight-medium);
	line-height: 1.4;
}

.appointment-modal__form-status.is-success {
	color: var(--dr-hug-black);
}

.appointment-modal__form-status.is-error {
	color: var(--dr-hug-pink);
}

.appointment-modal__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 12px 16px;
	border: 0;
	border-radius: 12px;
	background: var(--dr-hug-pink);
	font-family: var(--dr-hug-font-family);
	font-size: var(--dr-hug-font-size-base);
	font-weight: var(--dr-hug-font-weight-bold);
	line-height: 1.4;
	color: var(--dr-hug-white);
	cursor: pointer;
}

.appointment-modal__submit:disabled {
	opacity: 0.7;
	cursor: wait;
}

button.appointment-modal__submit:hover,
button.appointment-modal__submit:focus,
button.appointment-modal__submit:active {
	background: var(--dr-hug-pink);
	color: var(--dr-hug-white);
	border-color: transparent;
	filter: brightness(0.96);
}

.appointment-modal__hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	padding: 24px;
	overflow: hidden;
	background: #ede1da;
}

.appointment-modal__hero-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.appointment-modal__hero-pattern {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.35;
}

.appointment-modal__hero-dog {
	position: absolute;
	left: 50%;
	bottom: 0;
	width: 131%;
	max-width: none;
	height: auto;
	transform: translateX(-50%);
	object-fit: contain;
	object-position: center;
	pointer-events: none;
	z-index: 0;
}

.appointment-modal__status {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	padding: 12px 16px;
	border-radius: 16px;
	background: var(--dr-hug-white);
}

.appointment-modal__status-icon {
	display: block;
	width: 32px;
	height: 32px;
}

.appointment-modal__status-copy {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.appointment-modal__status-title {
	margin: 0;
	font-family: var(--dr-hug-font-family);
	font-size: var(--dr-hug-font-size-md);
	font-weight: var(--dr-hug-font-weight-bold);
	line-height: 1.4;
	color: var(--dr-hug-black);
}

.appointment-modal__status-accent {
	color: var(--dr-hug-pink);
}

.appointment-modal__status-text {
	margin: 0;
	font-family: var(--dr-hug-font-family);
	font-size: var(--dr-hug-font-size-base);
	font-weight: var(--dr-hug-font-weight-medium);
	line-height: 1.4;
	color: var(--dr-hug-grey);
}

@media (max-width: 767px) {
	.appointment-modal {
		padding: 8px;
		align-items: flex-start;
		overflow: auto;
		box-sizing: border-box;
	}

	.appointment-modal__dialog {
		width: 100%;
		max-width: 100%;
		max-height: none;
	}

	.appointment-modal__close {
		top: 8px;
		right: 8px;
	}

	.appointment-modal__panel {
		grid-template-columns: 1fr;
		height: auto;
		max-height: none;
		min-height: 0;
		width: 100%;
		box-sizing: border-box;
	}

	.appointment-modal__hero {
		order: -1;
		min-height: 280px;
		aspect-ratio: 1 / 1;
		padding: 16px;
		align-items: flex-end;
	}

	/* Same size as desktop dog; shift down so the muzzle stays in frame. */
	.appointment-modal__hero-dog {
		left: 50%;
		right: auto;
		top: auto;
		bottom: -18%;
		width: 131%;
		max-width: none;
		height: auto;
		max-height: none;
		transform: translateX(-50%);
		object-fit: contain;
		object-position: center;
	}

	.appointment-modal__hero-pattern {
		opacity: 0.22;
	}

	.appointment-modal__form-col {
		padding: 20px 16px 24px;
	}

	.appointment-modal__form {
		gap: 24px;
		height: auto;
		justify-content: flex-start;
	}

	.appointment-modal__title {
		font-size: 20px;
	}

	.appointment-modal__checkbox-text {
		font-size: 14px;
	}
}
