/* Divine Dental self-contained appointment modal (Gravity Forms).
   Matches the site's original modal design tokens. */

:root {
	--ddsf-accent: #6ae0f2;
	--ddsf-border: #e2e4e9;
}

/* ---- Modal chrome ---- */
#ddsf-appointment-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
}
#ddsf-appointment-modal.ddsf-open { display: block; }

.ddsf-modal__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.ddsf-modal__dialog {
	position: relative;
	margin: 5vh auto;
	background: #fff;
	width: 92%;
	max-width: 600px;
	max-height: 90vh;
	overflow-y: auto;
	border-radius: 4px;
	padding: 32px 32px 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.ddsf-modal__close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: #000;
	cursor: pointer;
	padding: 4px 8px;
	margin: 0 !important;
}

.ddsf-modal__title {
	font-family: "Work Sans", sans-serif;
	font-weight: 500;
	font-size: 30px;
	text-transform: lowercase;
	text-align: center;
	color: #000;
	margin: 0 0 20px;
}

body.ddsf-modal-open { overflow: hidden; }

/* ---- Gravity Forms skin inside the modal ---- */
#ddsf-appointment-modal .gform_wrapper { margin: 0; }

#ddsf-appointment-modal .gform_fields {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

#ddsf-appointment-modal .gfield { margin: 0; }

/* Two-up rows via the ready classes */
#ddsf-appointment-modal .gfield.gf_left_half,
#ddsf-appointment-modal .gfield.gf_right_half {
	flex: 1 1 calc(50% - 7px);
	min-width: 200px;
}
#ddsf-appointment-modal .gfield.gf_full,
#ddsf-appointment-modal .gfield.gfield--width-full {
	flex: 1 1 100%;
}

/* Placeholder-only design: hide field labels, except the day / time selects */
#ddsf-appointment-modal .gfield_label { display: none; }
#ddsf-appointment-modal .gfield--type-select .gfield_label,
#ddsf-appointment-modal li[id*="field_3_6"] .gfield_label,
#ddsf-appointment-modal li[id*="field_3_7"] .gfield_label {
	display: block;
	font-family: "Sen", sans-serif;
	font-size: 18px;
	text-transform: lowercase;
	color: #333;
	margin-bottom: 8px;
}

#ddsf-appointment-modal input[type="text"],
#ddsf-appointment-modal input[type="email"],
#ddsf-appointment-modal input[type="tel"],
#ddsf-appointment-modal select,
#ddsf-appointment-modal textarea {
	width: 100%;
	font-family: "Sen", sans-serif;
	font-size: 18px;
	padding: 14px 16px;
	border: 1px solid var(--ddsf-border);
	border-radius: 4px;
	background: #fff;
	box-sizing: border-box;
}
#ddsf-appointment-modal select { appearance: auto; height: auto; padding: 6.5px 16px; }
#ddsf-appointment-modal textarea { min-height: 110px; resize: vertical; }

#ddsf-appointment-modal input:focus,
#ddsf-appointment-modal select:focus,
#ddsf-appointment-modal textarea:focus {
	outline: none;
	border-color: var(--ddsf-accent);
	box-shadow: 0 0 0 2px rgba(106, 224, 242, 0.35);
}

/* Submit button: match the site's .main-btn (teal, lowercase) */
#ddsf-appointment-modal .gform_footer {
	display: flex;
	justify-content: center;
	padding: 0;
	margin-top: 20px !important;
}
#ddsf-appointment-modal .gform_button {
	display: inline-block;
	background: var(--ddsf-accent) !important;
	color: #000 !important;
	border: 0 !important;
	font-family: "Sen", sans-serif !important;
	font-size: 18px !important;
	text-transform: lowercase !important;
	padding: 14px 40px !important;
	cursor: pointer;
	transition: opacity 0.2s ease;
}
#ddsf-appointment-modal .gform_button:hover { opacity: 0.85; }

/* Validation + confirmation */
#ddsf-appointment-modal .gfield_required { color: #cc0000; }
#ddsf-appointment-modal .validation_message { font-size: 13px; color: #cc0000; }
#ddsf-appointment-modal .gform_confirmation_message,
#ddsf-appointment-modal [id^="gform_confirmation_message"] {
	font-family: "Sen", sans-serif;
	font-size: 17px;
	text-align: center;
	padding: 20px 0;
	color: #333 !important;
}

@media (max-width: 600px) {
	.ddsf-modal__dialog { margin: 0; width: 100%; min-height: 100vh; border-radius: 0; }
	#ddsf-appointment-modal .gfield.gf_left_half,
	#ddsf-appointment-modal .gfield.gf_right_half { flex: 1 1 100%; }
}
