/* ==========================================================================
   Dental Booking Elementor — Styles
   Visual limpo e profissional (sem sombras, sem gradientes “de IA”)
   Templates: classic | modern | compact | split
   ========================================================================== */

.dental-booking-container {
	--db-primary: #0b6e99;
	--db-primary-hover: #095a7d;
	--db-bg: #ffffff;
	--db-text: #1a1a1a;
	--db-text-muted: #5c5c5c;
	--db-border: #d9d9d9;
	--db-input-bg: #ffffff;
	--db-input-border: var(--db-border);
	--db-input-border-hover: #b0bacd;
	--db-input-focus: var(--db-primary);
	--db-input-focus-ring: color-mix(in srgb, var(--db-input-focus) 18%, transparent);
	--db-chip-bg: #e8eef8;
	--db-chip-text: #2c3e5a;
	--db-ms-radius: 24px;
	--db-success-bg: #edf7ed;
	--db-success-text: #1e6b2f;
	--db-error-bg: #fdecec;
	--db-error-text: #9b1c1c;
	--db-radius: 6px;
	--db-shadow: none;
	--db-card-pad-y: 28px;
	--db-card-pad-x: 24px;
	--db-gap: 16px;
	--db-title-size: 22px;
	--db-body-size: 14px;

	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
	/* Container queries: reage à largura real do widget no Elementor */
	container-type: inline-size;
	container-name: dental-booking;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--db-text);
	line-height: 1.5;
	min-width: 0;
	overflow-x: hidden;
	overflow-wrap: anywhere;
	word-wrap: break-word;
}

/* Limites por template (ainda 100% da coluna pai) */
.dental-tpl-classic {
	max-width: 680px;
}

.dental-tpl-modern {
	max-width: 720px;
}

.dental-tpl-compact {
	max-width: 420px;
}

.dental-tpl-split {
	max-width: 920px;
}

/* Elementor widget wrapper — evita overflow horizontal em colunas */
.elementor-widget-dental_booking_form,
.elementor-widget-dental_booking_form > .elementor-widget-container,
.elementor-element.elementor-widget-dental_booking_form {
	max-width: 100% !important;
	min-width: 0 !important;
	width: 100%;
	overflow-x: hidden;
}

/* Fallback when color-mix is unavailable */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
	.dental-booking-container {
		--db-input-focus-ring: rgba(11, 110, 153, 0.12);
	}
}

.dental-booking-container *,
.dental-booking-container *::before,
.dental-booking-container *::after {
	box-sizing: border-box;
}

/*
 * Isolate from Elementor / theme global button styles.
 * Elementor often paints buttons with kit accent (rosa/magenta) on hover/focus.
 */
.dental-booking-container button,
.dental-booking-container .elementor-button,
.elementor-widget-dental_booking_form .dental-booking-container button {
	background-image: none !important;
	text-decoration: none !important;
	box-shadow: none !important;
	/* Do not inherit Elementor kit accent */
	--e-global-color-primary: var(--db-primary);
	--e-global-color-secondary: var(--db-primary);
	--e-global-color-accent: var(--db-primary);
}

.dental-booking-container button:focus,
.dental-booking-container button:focus-visible,
.dental-booking-container button:active,
.dental-booking-container a:focus,
.dental-booking-container a:focus-visible {
	outline: none !important;
	outline-offset: 0 !important;
}

.dental-booking-card {
	background: var(--db-bg);
	border: 1px solid var(--db-border);
	border-radius: var(--db-radius);
	padding: var(--db-card-pad-y) var(--db-card-pad-x);
	box-shadow: none;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.dental-booking-header {
	text-align: left;
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--db-border);
}

.dental-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: transparent;
	color: var(--db-primary);
	border: 1px solid var(--db-border);
	border-radius: 4px;
	margin-bottom: 12px;
}

.dental-icon-badge svg {
	width: 18px;
	height: 18px;
	display: block;
}

.dental-icon-badge--light {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.45);
}

.dental-booking-header h2 {
	margin: 0 0 6px 0;
	font-size: var(--db-title-size);
	font-weight: 600;
	color: var(--db-text);
	line-height: 1.3;
	letter-spacing: -0.01em;
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
}

.dental-subtitle {
	margin: 0;
	font-size: var(--db-body-size);
	color: var(--db-text-muted);
	line-height: 1.55;
	font-weight: 400;
	overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   Form grid & fields
   -------------------------------------------------------------------------- */
.dental-form,
.dental-booking-form {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.dental-form-grid {
	display: grid;
	/* minmax(0,1fr) evita overflow em colunas estreitas do Elementor */
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--db-gap);
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.dental-full-width {
	grid-column: 1 / -1;
	min-width: 0;
}

.dental-field-group {
	display: flex;
	flex-direction: column;
	min-width: 0;
	max-width: 100%;
}

.dental-field-group label {
	font-size: 13px;
	font-weight: 600;
	color: var(--db-text);
	margin-bottom: 6px;
}

.dental-field-group label .req {
	color: #c0392b;
}

.dental-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.dental-input-wrapper .field-icon {
	position: absolute;
	left: 11px;
	width: 16px;
	height: 16px;
	pointer-events: none;
	z-index: 1;
	color: #6b6b6b;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.dental-input-wrapper .field-icon svg {
	width: 16px;
	height: 16px;
	display: block;
}

.dental-input-wrapper input[type="text"],
.dental-input-wrapper input[type="email"],
.dental-input-wrapper input[type="tel"],
.dental-input-wrapper input[type="date"],
.dental-input-wrapper select,
.dental-input-wrapper textarea {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 12px 12px 12px 36px;
	background-color: var(--db-input-bg);
	border: 1px solid var(--db-border);
	border-radius: 4px;
	/* ≥16px no mobile evita zoom automático no iOS */
	font-size: 16px;
	color: var(--db-text);
	transition: border-color 0.15s ease;
	outline: none;
	font-family: inherit;
	line-height: 1.4;
	appearance: auto;
	-webkit-appearance: none;
	box-shadow: none;
	/* Date picker nativo no iOS/Android */
	min-height: 48px;
}

/* When field icons are hidden */
.dental-no-field-icons .dental-input-wrapper input[type="text"],
.dental-no-field-icons .dental-input-wrapper input[type="email"],
.dental-no-field-icons .dental-input-wrapper input[type="tel"],
.dental-no-field-icons .dental-input-wrapper input[type="date"],
.dental-no-field-icons .dental-input-wrapper select {
	padding-left: 12px;
}

.dental-input-wrapper textarea {
	padding-left: 12px;
	resize: vertical;
	min-height: 80px;
}

.dental-input-wrapper input:focus,
.dental-input-wrapper input:focus-visible,
.dental-input-wrapper select:focus,
.dental-input-wrapper select:focus-visible,
.dental-input-wrapper textarea:focus,
.dental-input-wrapper textarea:focus-visible {
	border-color: var(--db-input-focus) !important;
	box-shadow: 0 0 0 3px var(--db-input-focus-ring) !important;
	background-color: var(--db-input-bg);
	outline: none !important;
}

/* --------------------------------------------------------------------------
   Multi-select com chips (estilo tag / dropdown)
   -------------------------------------------------------------------------- */
.dental-field-hint {
	margin: 8px 0 0;
	font-size: 12.5px;
	color: var(--db-text-muted);
	line-height: 1.45;
}

.dental-ms {
	position: relative;
	width: 100%;
}

/* Hard-reset Elementor kit / theme button styles on the multi-select trigger */
.dental-booking-container .dental-ms-control,
.dental-booking-container button.dental-ms-control,
.elementor-widget-dental_booking_form .dental-ms-control,
.elementor-element .dental-booking-container button.dental-ms-control {
	position: relative;
	display: flex !important;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	width: 100% !important;
	min-height: 48px;
	height: auto !important;
	padding: 8px 40px 8px 10px !important;
	margin: 0 !important;
	border: 1px solid var(--db-input-border, #cfd6e4) !important;
	border-radius: var(--db-ms-radius, 24px) !important;
	background: var(--db-input-bg, #fff) !important;
	background-color: var(--db-input-bg, #fff) !important;
	background-image: none !important;
	color: var(--db-text) !important;
	font: inherit !important;
	/* 16px no mobile evita zoom iOS; desktop rebaixa no media min-width */
	font-size: 16px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	letter-spacing: normal !important;
	text-align: left !important;
	text-transform: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
	box-shadow: none !important;
	outline: none !important;
	outline-offset: 0 !important;
	/* Kill Elementor accent / pink fill */
	fill: currentColor;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.dental-booking-container .dental-ms-control:hover,
.dental-booking-container button.dental-ms-control:hover,
.elementor-widget-dental_booking_form .dental-ms-control:hover,
.elementor-element .dental-booking-container button.dental-ms-control:hover {
	border-color: var(--db-input-border-hover, #b0bacd) !important;
	background: var(--db-input-bg, #fff) !important;
	background-color: var(--db-input-bg, #fff) !important;
	background-image: none !important;
	color: var(--db-text) !important;
	box-shadow: none !important;
	/* Never inherit Elementor pink/magenta */
	outline: none !important;
}

.dental-booking-container .dental-ms.is-open .dental-ms-control,
.dental-booking-container .dental-ms-control:focus,
.dental-booking-container .dental-ms-control:focus-visible,
.dental-booking-container .dental-ms-control:active,
.dental-booking-container button.dental-ms-control:focus,
.dental-booking-container button.dental-ms-control:focus-visible,
.dental-booking-container button.dental-ms-control:active,
.elementor-widget-dental_booking_form .dental-ms-control:focus,
.elementor-widget-dental_booking_form .dental-ms-control:focus-visible,
.elementor-widget-dental_booking_form .dental-ms-control:hover:focus {
	outline: none !important;
	outline-color: transparent !important;
	border-color: var(--db-input-focus, var(--db-primary)) !important;
	box-shadow: 0 0 0 3px var(--db-input-focus-ring) !important;
	background: var(--db-input-bg, #fff) !important;
	background-color: var(--db-input-bg, #fff) !important;
	background-image: none !important;
	color: var(--db-text) !important;
}

.dental-ms-chips {
	display: contents;
}

.dental-ms-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: min(100%, 100%);
	min-width: 0;
	padding: 5px 8px 5px 12px;
	border-radius: 999px;
	background: var(--db-chip-bg, #e8eef8);
	color: var(--db-chip-text, #2c3e5a);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	border: none;
}

.dental-ms-chip-label {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: min(220px, 55vw);
	min-width: 0;
}

.dental-booking-container .dental-ms-chip-remove,
.dental-booking-container button.dental-ms-chip-remove {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	min-height: 18px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: none !important;
	border-radius: 50% !important;
	background: transparent !important;
	background-image: none !important;
	color: var(--db-chip-text, #5a6b86) !important;
	font-size: 15px !important;
	line-height: 1 !important;
	cursor: pointer;
	flex-shrink: 0;
	box-shadow: none !important;
	outline: none !important;
	transition: background-color 0.12s ease, color 0.12s ease;
}

.dental-booking-container .dental-ms-chip-remove:hover,
.dental-booking-container .dental-ms-chip-remove:focus,
.dental-booking-container .dental-ms-chip-remove:focus-visible,
.dental-booking-container button.dental-ms-chip-remove:hover,
.dental-booking-container button.dental-ms-chip-remove:focus {
	background: color-mix(in srgb, var(--db-chip-text, #2c3e5a) 12%, transparent) !important;
	background-image: none !important;
	color: var(--db-chip-text, #1a2740) !important;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
}

.dental-ms-placeholder {
	flex: 1 1 auto;
	min-width: 0;
	padding: 4px 2px;
	color: var(--db-text-muted, #8a94a6);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	pointer-events: none;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.dental-ms.has-value .dental-ms-placeholder {
	display: none;
}

.dental-ms-chevron {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--db-text-muted, #7a8699);
	pointer-events: none;
	transition: transform 0.15s ease;
}

.dental-ms.is-open .dental-ms-chevron {
	transform: translateY(-50%) rotate(180deg);
}

.dental-ms-dropdown {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	z-index: 100;
	max-height: min(240px, 50vh);
	width: 100%;
	max-width: 100%;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	padding: 6px;
	border: 1px solid var(--db-input-border, #d5dbe8);
	border-radius: 14px;
	background: var(--db-input-bg, #fff);
	/* Soft elevation only on open menu — not Elementor pink */
	box-shadow: 0 8px 24px rgba(20, 35, 60, 0.10);
}

.dental-ms-dropdown[hidden] {
	display: none !important;
}

.dental-ms-options {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dental-ms-option {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 500;
	color: var(--db-text, #243247);
	cursor: pointer;
	user-select: none;
	transition: background-color 0.12s ease, color 0.12s ease;
}

.dental-ms-option:hover,
.dental-ms-option.is-active {
	background: color-mix(in srgb, var(--db-primary) 8%, #ffffff);
	color: var(--db-text);
}

.dental-ms-option[aria-selected="true"] {
	background: color-mix(in srgb, var(--db-primary) 12%, #ffffff);
	color: var(--db-primary);
}

.dental-ms-option-check {
	width: 16px;
	height: 16px;
	border: 1.5px solid var(--db-input-border-hover, #b8c2d4);
	border-radius: 4px;
	flex-shrink: 0;
	position: relative;
	background: #fff;
}

.dental-ms-option[aria-selected="true"] .dental-ms-option-check {
	border-color: var(--db-primary);
	background: var(--db-primary);
}

.dental-ms-option[aria-selected="true"] .dental-ms-option-check::after {
	content: "";
	position: absolute;
	left: 4px;
	top: 1px;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.dental-ms-option-label {
	flex: 1 1 auto;
	line-height: 1.35;
}

.dental-ms-values {
	display: none;
}

/* Legacy native multi-select (fallback se markup antigo existir) */
.dental-field-selected {
	display: none;
	margin: 6px 0 0;
	font-size: 12px;
	font-weight: 600;
	color: var(--db-primary);
	line-height: 1.35;
}

.dental-input-wrapper select.dental-service-select,
select.dental-service-select {
	width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	border: 1px solid var(--db-border);
	border-radius: 999px;
	background: #fff;
	color: var(--db-text);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.45;
	cursor: pointer;
	outline: none;
}

/* --------------------------------------------------------------------------
   Time slots
   -------------------------------------------------------------------------- */
.dental-time-slots {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
	gap: 8px;
	margin-top: 4px;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.dental-booking-container .dental-slot-btn,
.dental-booking-container button.dental-slot-btn {
	padding: 10px 4px !important;
	min-height: 44px;
	background: #fff !important;
	background-image: none !important;
	border: 1px solid var(--db-border) !important;
	border-radius: 4px !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: var(--db-text) !important;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
	text-align: center;
	font-family: inherit;
	box-shadow: none !important;
	outline: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	/* touch */
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	width: 100%;
	max-width: 100%;
}

.dental-booking-container .dental-slot-btn:hover,
.dental-booking-container button.dental-slot-btn:hover {
	border-color: var(--db-primary) !important;
	color: var(--db-primary) !important;
	background: #fff !important;
	background-image: none !important;
	box-shadow: none !important;
	outline: none !important;
}

.dental-booking-container .dental-slot-btn:focus,
.dental-booking-container .dental-slot-btn:focus-visible,
.dental-booking-container button.dental-slot-btn:focus {
	border-color: var(--db-primary) !important;
	color: var(--db-primary) !important;
	outline: none !important;
	box-shadow: 0 0 0 3px var(--db-input-focus-ring) !important;
}

.dental-booking-container .dental-slot-btn.active,
.dental-booking-container button.dental-slot-btn.active,
.dental-booking-container .dental-slot-btn.active:hover {
	background: var(--db-primary) !important;
	background-image: none !important;
	color: #ffffff !important;
	border-color: var(--db-primary) !important;
	box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   Messages & WhatsApp
   -------------------------------------------------------------------------- */
.dental-response-msg {
	margin-top: 18px;
	padding: 12px 14px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	box-shadow: none;
}

.dental-response-msg.success {
	background-color: var(--db-success-bg);
	color: var(--db-success-text);
	border: 1px solid #b7dfb9;
}

.dental-response-msg.error {
	background-color: var(--db-error-bg);
	color: var(--db-error-text);
	border: 1px solid #f0b4b4;
}

.dental-wa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background-color: #128c7e;
	color: #ffffff !important;
	padding: 12px 16px;
	border-radius: 4px;
	font-weight: 600;
	font-size: 14px;
	text-decoration: none;
	box-shadow: none;
	transition: background-color 0.15s ease;
	border: none;
	width: 100%;
	max-width: 100%;
	min-height: 48px;
	box-sizing: border-box;
	text-align: center;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.dental-wa-btn:hover {
	background-color: #0e7266;
	text-decoration: none;
	color: #ffffff !important;
}

.dental-wa-btn svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Submit button
   -------------------------------------------------------------------------- */
.dental-submit-wrapper {
	margin-top: 20px;
}

.dental-booking-container .dental-btn-primary,
.dental-booking-container button.dental-btn-primary {
	width: 100% !important;
	max-width: 100% !important;
	min-height: 48px;
	padding: 14px 18px !important;
	background: var(--db-primary) !important;
	background-image: none !important;
	color: #ffffff !important;
	border: 1px solid var(--db-primary) !important;
	border-radius: 4px;
	font-size: 16px !important;
	font-weight: 600 !important;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: none !important;
	font-family: inherit;
	outline: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-decoration: none !important;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.dental-booking-container .dental-btn-primary:hover,
.dental-booking-container button.dental-btn-primary:hover {
	background: var(--db-primary-hover) !important;
	background-image: none !important;
	border-color: var(--db-primary-hover) !important;
	color: #ffffff !important;
	box-shadow: none !important;
}

.dental-booking-container .dental-btn-primary:focus,
.dental-booking-container .dental-btn-primary:focus-visible,
.dental-booking-container .dental-btn-primary:active {
	background: var(--db-primary-hover) !important;
	background-image: none !important;
	border-color: var(--db-primary-hover) !important;
	color: #ffffff !important;
	outline: none !important;
	box-shadow: 0 0 0 3px var(--db-input-focus-ring) !important;
}

.dental-booking-container .dental-btn-primary:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.dental-btn-primary .btn-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: dental-spin 0.7s linear infinite;
}

@keyframes dental-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ==========================================================================
   TEMPLATE: Modern — painel limpo com borda superior
   ========================================================================== */
.dental-tpl-modern .dental-booking-card {
	border: 1px solid var(--db-border);
	border-top: 3px solid var(--db-primary);
	background: #ffffff;
	box-shadow: none;
}

.dental-tpl-modern .dental-icon-badge {
	background: var(--db-primary);
	color: #fff;
	border-color: var(--db-primary);
}

.dental-tpl-modern .dental-booking-header {
	text-align: center;
	border-bottom: none;
	padding-bottom: 0;
}

.dental-tpl-modern .dental-booking-header h2 {
	font-size: 24px;
	font-weight: 600;
	color: var(--db-text);
	/* sem gradiente no texto */
	background: none;
	-webkit-text-fill-color: unset;
}

.dental-tpl-modern .dental-btn-primary {
	border-radius: 4px;
	box-shadow: none;
}

.dental-tpl-modern .dental-slot-btn.active {
	background: var(--db-primary);
	border-color: var(--db-primary);
}

/* ==========================================================================
   TEMPLATE: Compact
   ========================================================================== */
.dental-tpl-compact .dental-booking-card {
	padding: 18px 16px;
	border-radius: 4px;
}

.dental-tpl-compact .dental-booking-header {
	margin-bottom: 14px;
	padding-bottom: 12px;
}

.dental-tpl-compact .dental-icon-badge {
	width: 30px;
	height: 30px;
	margin-bottom: 8px;
}

.dental-tpl-compact .dental-icon-badge svg {
	width: 15px;
	height: 15px;
}

.dental-tpl-compact .dental-booking-header h2 {
	font-size: 17px;
}

.dental-tpl-compact .dental-subtitle {
	font-size: 12px;
}

.dental-tpl-compact .dental-form-grid {
	grid-template-columns: 1fr;
	gap: 12px;
}

.dental-tpl-compact .dental-input-wrapper input,
.dental-tpl-compact .dental-input-wrapper select,
.dental-tpl-compact .dental-input-wrapper textarea {
	padding: 10px 10px 10px 32px;
	/* manter ≥16px em mobile; desktop redefine abaixo */
	font-size: 16px;
}

@media (min-width: 769px) {
	.dental-tpl-compact .dental-input-wrapper input,
	.dental-tpl-compact .dental-input-wrapper select,
	.dental-tpl-compact .dental-input-wrapper textarea {
		font-size: 13px;
		padding: 8px 10px 8px 32px;
	}
}

.dental-tpl-compact.dental-no-field-icons .dental-input-wrapper input,
.dental-tpl-compact.dental-no-field-icons .dental-input-wrapper select {
	padding-left: 10px;
}

.dental-tpl-compact .dental-time-slots {
	grid-template-columns: repeat(3, 1fr);
}

.dental-tpl-compact .dental-slot-btn {
	padding: 6px 2px;
	font-size: 12px;
}

.dental-tpl-compact .dental-btn-primary {
	padding: 11px 14px;
	font-size: 14px;
}

.dental-tpl-compact .dental-submit-wrapper {
	margin-top: 14px;
}

/* ==========================================================================
   TEMPLATE: Split
   ========================================================================== */
.dental-split-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
	border-radius: var(--db-radius);
	overflow: hidden;
	box-shadow: none;
	border: 1px solid var(--db-border);
	background: #fff;
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.dental-tpl-split .dental-booking-card {
	border: none;
	border-radius: 0;
	box-shadow: none;
	margin: 0;
}

.dental-tpl-split .dental-booking-header {
	border-bottom: 1px solid var(--db-border);
}

.dental-split-side {
	background: var(--db-primary);
	color: #ffffff;
	padding: 32px 26px;
	display: flex;
	align-items: center;
	min-width: 0;
	max-width: 100%;
}

.dental-split-side-inner {
	width: 100%;
	min-width: 0;
}

.dental-split-side-inner h3 {
	margin: 0 0 10px 0;
	font-size: 20px;
	font-weight: 600;
	color: #ffffff;
	line-height: 1.3;
}

.dental-split-side-inner p {
	margin: 0 0 18px 0;
	font-size: 14px;
	line-height: 1.55;
	opacity: 0.95;
	font-weight: 400;
}

.dental-split-bullets {
	list-style: none;
	margin: 0;
	padding: 0;
}

.dental-split-bullets li {
	position: relative;
	padding: 7px 0 7px 22px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
}

.dental-split-bullets li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 12px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #ffffff;
	opacity: 0.9;
}

/* ==========================================================================
   RESPONSIVE — Container queries (largura real do widget no Elementor)
   Mais fiável que só media query de viewport (colunas Elementor).
   ========================================================================== */

/* Coluna estreita / tablet em 2 colunas Elementor */
@container dental-booking (max-width: 640px) {
	.dental-booking-card {
		padding: 22px 18px;
	}

	.dental-form-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.dental-booking-header h2 {
		font-size: 20px;
	}

	.dental-split-layout {
		grid-template-columns: 1fr;
	}

	.dental-time-slots {
		grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
	}

	.dental-ms-chip-label {
		max-width: min(180px, 48cqi);
	}
}

/* Telemóvel / widget muito estreito */
@container dental-booking (max-width: 420px) {
	.dental-booking-card {
		padding: 16px 14px;
	}

	.dental-form-grid {
		gap: 12px;
	}

	.dental-booking-header h2 {
		font-size: 18px;
	}

	.dental-subtitle {
		font-size: 13px;
	}

	.dental-time-slots {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 6px;
	}

	.dental-slot-btn {
		font-size: 13px !important;
		padding: 10px 2px !important;
	}

	.dental-ms-chip {
		max-width: 100%;
	}

	.dental-ms-chip-label {
		max-width: 100%;
	}

	.dental-ms-control {
		min-height: 48px;
		border-radius: 16px !important;
		padding: 8px 36px 8px 10px !important;
		font-size: 16px !important;
	}

	.dental-ms-dropdown {
		max-height: min(220px, 45vh);
		border-radius: 12px;
	}

	.dental-ms-option {
		padding: 12px 10px;
		min-height: 44px;
	}

	.dental-field-group label {
		font-size: 12.5px;
	}

	.dental-split-side {
		padding: 18px 16px;
	}

	.dental-split-side-inner h3 {
		font-size: 17px;
	}

	.dental-split-side-inner p,
	.dental-split-bullets li {
		font-size: 13px;
	}
}

/* ==========================================================================
   RESPONSIVE — Viewport media queries (fallback + tablet/phone reais)
   ========================================================================== */

/* Tablet (ecrã ≤ 1024px) */
@media (max-width: 1024px) {
	.dental-tpl-split,
	.dental-tpl-modern,
	.dental-tpl-classic,
	.dental-booking-container {
		max-width: 100%;
	}

	.dental-split-layout {
		grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
	}
}

/* Tablet portrait / telemóvel landscape */
@media (max-width: 768px) {
	.dental-booking-container {
		--db-card-pad-y: 20px;
		--db-card-pad-x: 16px;
		--db-gap: 14px;
		--db-title-size: 20px;
		max-width: 100%;
	}

	.dental-form-grid {
		grid-template-columns: 1fr;
	}

	.dental-split-layout {
		grid-template-columns: 1fr;
	}

	/* No mobile: formulário primeiro, painel lateral depois */
	.dental-tpl-split .dental-split-layout {
		display: flex;
		flex-direction: column;
	}

	.dental-tpl-split .dental-booking-card {
		order: 1;
	}

	.dental-tpl-split .dental-split-side {
		order: 2;
		padding: 20px 16px;
	}

	.dental-time-slots {
		grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
	}

	.dental-tpl-modern .dental-booking-header h2 {
		font-size: 20px;
	}

	.dental-tpl-compact .dental-time-slots {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.dental-response-msg {
		font-size: 13.5px;
		padding: 12px;
	}
}

/* Telemóvel */
@media (max-width: 480px) {
	.dental-booking-container {
		--db-card-pad-y: 14px;
		--db-card-pad-x: 12px;
		--db-gap: 12px;
		--db-title-size: 17px;
		--db-body-size: 13px;
	}

	.dental-booking-header {
		margin-bottom: 16px;
		padding-bottom: 12px;
	}

	.dental-icon-badge {
		width: 32px;
		height: 32px;
		margin-bottom: 10px;
	}

	.dental-time-slots {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 6px;
	}

	.dental-booking-container .dental-slot-btn,
	.dental-booking-container button.dental-slot-btn {
		font-size: 13px !important;
		min-height: 42px;
		padding: 8px 2px !important;
	}

	.dental-booking-container .dental-btn-primary,
	.dental-booking-container button.dental-btn-primary {
		font-size: 15px !important;
		padding: 14px 14px !important;
	}

	.dental-ms-chip-label {
		max-width: calc(100% - 28px);
	}

	.dental-wa-btn {
		font-size: 14px;
		padding: 12px 12px;
	}

	/* Inputs date nativos ocupam bem a largura no iOS */
	.dental-input-wrapper input[type="date"] {
		min-height: 48px;
		padding-right: 8px;
	}
}

/* Telemóvel muito estreito */
@media (max-width: 360px) {
	.dental-time-slots {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.dental-booking-container {
		--db-card-pad-x: 10px;
		--db-title-size: 16px;
	}
}

/* Preferência de menos movimento */
@media (prefers-reduced-motion: reduce) {
	.dental-booking-container *,
	.dental-booking-container *::before,
	.dental-booking-container *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* Landscape phone: compactar verticalmente */
@media (max-height: 480px) and (orientation: landscape) {
	.dental-booking-container {
		--db-card-pad-y: 12px;
		--db-card-pad-x: 14px;
		--db-gap: 10px;
	}

	.dental-ms-dropdown {
		max-height: 140px;
	}

	.dental-booking-header {
		margin-bottom: 12px;
		padding-bottom: 8px;
	}
}

/* Elementor editor polish — keep form interactive, kill kit accent on hover */
.elementor-editor-active .dental-booking-container {
	pointer-events: auto;
}

.elementor-editor-active .dental-booking-container button,
.elementor-editor-active .dental-booking-container .dental-ms-control,
.elementor-editor-active .dental-booking-container .dental-slot-btn {
	--e-global-color-primary: var(--db-primary) !important;
	--e-global-color-secondary: var(--db-primary) !important;
	--e-global-color-accent: var(--db-primary) !important;
}

/* Extra specificity against Elementor frontend kit CSS */
.elementor-kit-1 .dental-booking-container button.dental-ms-control:hover,
.elementor .dental-booking-container button.dental-ms-control:hover,
body .dental-booking-container button.dental-ms-control:hover {
	background-color: var(--db-input-bg, #fff) !important;
	border-color: var(--db-input-border-hover, #b0bacd) !important;
	color: var(--db-text) !important;
}

/* Desktop tipografia um pouco mais compacta nos inputs (viewport largo) */
@media (min-width: 769px) {
	.dental-input-wrapper input[type="text"],
	.dental-input-wrapper input[type="email"],
	.dental-input-wrapper input[type="tel"],
	.dental-input-wrapper input[type="date"],
	.dental-input-wrapper select,
	.dental-input-wrapper textarea {
		font-size: 14px;
		min-height: 44px;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.dental-booking-container .dental-ms-control,
	.dental-booking-container button.dental-ms-control {
		font-size: 14px !important;
	}

	.dental-booking-container .dental-btn-primary,
	.dental-booking-container button.dental-btn-primary {
		font-size: 15px !important;
	}
}
