/*
 * Paw Visit booking modal on the puppy page. Bootstrap 5 modal markup; the
 * site palette (brand green, deep evergreen, CTA yellow) and Poppins come from
 * the theme. Gravity's own theme CSS is off on this site, so form controls are
 * styled here, scoped to the modal.
 */

.cdc-pv-modal {
	--pv-green: var(--bs-primary, #018c6e);
	--pv-dark: #0e3229;
	--pv-ink: #1d2a27;
	--pv-ink-soft: #55655f;
	--pv-line: #dbe3df;
	--pv-paper: #f3f6f4;
}

.cdc-pv-modal .modal-content {
	border: 0;
	border-radius: 20px;
	overflow: hidden;
	background: var(--pv-paper);
	box-shadow: 0 30px 80px -24px rgba(14, 50, 41, 0.55);
}

.cdc-pv-modal__header {
	align-items: flex-start;
	padding: 20px 24px;
	border-bottom: 0;
	background: var(--pv-dark);
	color: #e6f0ec;
}

.cdc-pv-modal__header .btn-close {
	filter: invert(1) grayscale(1) brightness(2);
	margin: 0 0 0 12px;
	padding: 14px;
}

.cdc-pv-modal__puppy {
	display: flex;
	gap: 16px;
	align-items: center;
	min-width: 0;
}

.cdc-pv-modal__thumb {
	flex: none;
	display: grid;
	place-items: center;
	width: 84px;
	height: 84px;
	border-radius: 16px;
	overflow: hidden;
	background: #174539;
	font-size: 32px;
}

.cdc-pv-modal__photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cdc-pv-modal__title {
	margin: 0;
	font-family: "Abril Fatface", Georgia, serif;
	font-weight: 400;
	font-size: 1.6rem;
	line-height: 1.1;
	color: #fff;
}

.cdc-pv-modal__facts {
	margin: 6px 0 0;
	font-size: 14px;
	color: #a8c4ba;
}

.cdc-pv-modal__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 10px 0 0;
}

.cdc-pv-modal__chip {
	display: inline-flex;
	align-items: center;
	min-height: 26px;
	padding: 2px 10px;
	border-radius: 999px;
	background: rgba(255, 196, 12, 0.14);
	border: 1px solid rgba(255, 196, 12, 0.4);
	color: #ffe9a3;
	font-size: 13px;
	font-weight: 600;
}

.cdc-pv-modal__body {
	padding: 20px 24px 28px;
	position: relative;
}

.cdc-pv-modal__note {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: 12px;
	background: #fff;
	border: 1px solid var(--pv-line);
	font-size: 14px;
	color: var(--pv-ink-soft);
}

/* Gravity form inside the modal */
.cdc-pv-modal .gform_wrapper .gfield {
	margin-bottom: 16px;
}

.cdc-pv-modal .gform_wrapper .gfield_label,
.cdc-pv-modal .gform_wrapper .gform-field-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 14px;
	color: var(--pv-ink);
}

.cdc-pv-modal .gform_wrapper input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=hidden]),
.cdc-pv-modal .gform_wrapper select,
.cdc-pv-modal .gform_wrapper textarea {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #bfccc6;
	border-radius: 10px;
	background: #fff;
	font-size: 16px; /* no iOS zoom */
}

.cdc-pv-modal .gform_wrapper input:focus,
.cdc-pv-modal .gform_wrapper select:focus,
.cdc-pv-modal .gform_wrapper textarea:focus {
	outline: none;
	border-color: var(--pv-green);
	box-shadow: 0 0 0 3px rgba(1, 140, 110, 0.22);
}

.cdc-pv-modal .gform_wrapper .gfield_error input,
.cdc-pv-modal .gform_wrapper .gfield_error select {
	border-color: #b3261e;
}

.cdc-pv-modal .gform_wrapper .gfield_required {
	margin-left: 6px;
	font-weight: 500;
	color: #b3261e;
}

.cdc-pv-modal .gform_wrapper .validation_message,
.cdc-pv-modal .gform_wrapper .gfield_validation_message {
	margin-top: 6px;
	color: #b3261e;
	font-size: 13px;
	font-weight: 500;
}

.cdc-pv-modal .gform_wrapper .gform_validation_errors {
	margin-bottom: 16px;
	padding: 12px 14px;
	border-radius: 12px;
	background: #fcedec;
	border: 1px solid #f1c4c0;
	color: #6e1611;
}

.cdc-pv-modal .gform_wrapper .gform_footer {
	margin-top: 8px;
}

.cdc-pv-modal .gform_wrapper .gform_button,
.cdc-pv-modal .gform_wrapper input[type=submit] {
	width: 100%;
	min-height: 54px;
	border: 0;
	border-radius: 999px;
	background: #ffc40c;
	color: #231c00;
	font-weight: 700;
	font-size: 16px;
}

.cdc-pv-modal .gform_wrapper .gform_button:hover {
	background: #f0b400;
}

.cdc-pv-modal .gform_wrapper .gform_button:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--pv-green);
}

.cdc-pv-modal__busy {
	position: sticky;
	bottom: 0;
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 12px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--pv-dark);
	color: #fff;
	font-weight: 500;
}

.cdc-pv-modal.is-busy .cdc-pv-modal__form {
	opacity: 0.6;
	pointer-events: none;
}

/* Confirmation */
.cdc-pv-confirm {
	text-align: center;
	padding: 12px 0 4px;
}

.cdc-pv-confirm__mark {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: #e5f3ee;
	color: var(--pv-green);
	font-size: 26px;
	font-weight: 700;
}

.cdc-pv-confirm__title {
	margin: 0 0 16px;
	font-family: "Abril Fatface", Georgia, serif;
	font-weight: 400;
	font-size: 1.7rem;
	color: var(--pv-ink);
}

.cdc-pv-confirm__title:focus {
	outline: none;
}

.cdc-pv-confirm__facts {
	display: grid;
	gap: 1px;
	max-width: 440px;
	margin: 0 auto 16px;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--pv-line);
	background: var(--pv-line);
	text-align: left;
}

.cdc-pv-confirm__facts > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 16px;
	background: #fff;
}

.cdc-pv-confirm__facts dt {
	color: var(--pv-ink-soft);
	font-weight: 400;
}

.cdc-pv-confirm__facts dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.cdc-pv-confirm__tz {
	display: block;
	font-weight: 400;
	font-size: 13px;
	color: var(--pv-ink-soft);
}

.cdc-pv-confirm__note {
	max-width: 440px;
	margin: 0 auto;
	color: var(--pv-ink-soft);
}

@media (max-width: 767.98px) {
	.cdc-pv-modal .modal-content {
		border-radius: 0;
	}

	.cdc-pv-modal__header {
		padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
	}

	.cdc-pv-modal__body {
		padding: 16px max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
	}

	.cdc-pv-modal__thumb {
		width: 64px;
		height: 64px;
	}

	.cdc-pv-modal__title {
		font-size: 1.3rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cdc-pv-modal.fade .modal-dialog {
		transition: none;
		transform: none;
	}
}

/* Floating chat widgets stay hidden while the booking modal is open. */
body.cdc-pv-open [id^="zsiq_float"],
body.cdc-pv-open .zsiq_floatmain,
body.cdc-pv-open .cdc-sms-fab {
	visibility: hidden !important;
}
