/* =========================================================
   WhatsApp Directo Leads — estilos blindados contra el tema.
   Se usa !important en propiedades críticas porque el popup
   debe verse igual en cualquier theme de WordPress.
   ========================================================= */

.wdl-wrapper {
	display: inline-block;
}

.wdl-wrapper,
.wdl-modal {
	font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
}

.wdl-wrapper *,
.wdl-modal,
.wdl-modal * {
	box-sizing: border-box !important;
}

/* ---- Botones ---- */
.wdl-wrapper .wdl-open-button,
.wdl-modal .wdl-submit-button {
	align-items: center !important;
	background: #24d464 !important;
	border: 0 !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	color: #fff !important;
	cursor: pointer !important;
	display: inline-flex !important;
	font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	gap: 8px !important;
	justify-content: center !important;
	letter-spacing: 1.3px !important;
	line-height: 1.2 !important;
	min-height: 46px !important;
	margin: 0 !important;
	padding: 13px 24px !important;
	text-decoration: none !important;
	text-shadow: none !important;
	text-transform: none !important;
	transition: background-color 0.2s ease, transform 0.15s ease !important;
}

.wdl-wrapper .wdl-open-button:hover,
.wdl-modal .wdl-submit-button:hover {
	background: #ffffff !important;
	color: #032449 !important;
	transform: translateY(-1px) !important;
}

.wdl-modal .wdl-submit-button {
	margin-top: 4px !important;
	width: 100% !important;
}

.wdl-modal .wdl-submit-button:disabled {
	cursor: wait !important;
	opacity: 0.7 !important;
	transform: none !important;
}

.wdl-open-button svg,
.wdl-submit-button svg {
	flex: 0 0 auto;
}

/* ---- Modal / overlay ---- */
.wdl-modal {
	display: none;
	inset: 0;
	position: fixed;
	z-index: 999999;
}

.wdl-modal[aria-hidden="false"] {
	align-items: center;
	display: flex;
	justify-content: center;
	padding: 20px;
}

.wdl-modal__overlay {
	background: rgba(8, 20, 38, 0.72);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	inset: 0;
	position: absolute;
}

.wdl-modal__panel {
	background: #0d3f78 !important;
	background: linear-gradient(165deg, #114a8c 0%, #0a3568 100%) !important;
	border: 1px solid rgba(255, 255, 255, 0.14) !important;
	border-top: 4px solid #25D366 !important;
	border-radius: 12px !important;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5) !important;
	color: #fff !important;
	margin: 0 !important;
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	max-width: 520px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 24px 28px 26px !important;
	position: relative;
	width: min(100%, 520px);
}

/* scrollbar discreto */
.wdl-modal__panel::-webkit-scrollbar {
	width: 8px;
}
.wdl-modal__panel::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.25);
	border-radius: 8px;
}

/* ---- Botón cerrar ---- */
.wdl-modal .wdl-modal__close {
	align-items: center !important;
	background: rgba(255, 255, 255, 0.16) !important;
	border: 0 !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	color: #fff !important;
	cursor: pointer !important;
	display: inline-flex !important;
	height: 34px !important;
	justify-content: center !important;
	line-height: 1 !important;
	margin: 0 !important;
	padding: 0 !important;
	position: absolute !important;
	right: 14px !important;
	top: 14px !important;
	width: 34px !important;
}

.wdl-modal .wdl-modal__close:hover {
	background: rgba(255, 255, 255, 0.3) !important;
}

.wdl-modal__close svg {
	display: block;
}

/* ---- Badge WhatsApp ---- */
.wdl-wa-badge {
	align-items: center;
	background: rgba(37, 211, 102, 0.16);
	border: 1px solid rgba(37, 211, 102, 0.4);
	border-radius: 999px;
	display: inline-flex;
	gap: 8px;
	margin: 0 0 16px;
	padding: 5px 14px 5px 6px;
}

.wdl-wa-badge__icon {
	align-items: center;
	background: #25D366;
	border-radius: 50%;
	color: #fff;
	display: inline-flex;
	flex: 0 0 auto;
	height: 28px;
	justify-content: center;
	width: 28px;
}

.wdl-wa-badge__label {
	color: #fff !important;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ---- Cabecera ---- */
.wdl-modal__intro {
	margin: 0 40px 18px 0;
}

.wdl-modal .wdl-modal__eyebrow {
	color: #8fd6ff !important;
	display: block !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.06em !important;
	margin: 0 0 6px !important;
	text-transform: uppercase !important;
}

.wdl-modal .wdl-modal__title {
	color: #ffffff !important;
	font-family: inherit !important;
	font-size: 23px !important;
	font-weight: 800 !important;
	line-height: 1.2 !important;
	margin: 0 0 6px !important;
	text-shadow: none !important;
}

.wdl-modal .wdl-modal__copy {
	color: rgba(255, 255, 255, 0.85) !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.5 !important;
	margin: 0 !important;
}

/* ---- Formulario ---- */
.wdl-form {
	display: grid;
	gap: 12px;
}

.wdl-form__row {
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr 1fr;
}

.wdl-field {
	display: grid;
	gap: 5px;
	min-width: 0;
}

.wdl-modal .wdl-field label,
.wdl-modal .wdl-checkbox {
	color: rgba(255, 255, 255, 0.92) !important;
	font-family: inherit !important;
	font-size: 12.5px !important;
	font-weight: 600 !important;
	margin: 0 !important;
}

.wdl-modal .wdl-field input,
.wdl-modal .wdl-field textarea {
	background: #ffffff !important;
	border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	color: #0a2540 !important;
	font-family: inherit !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
	margin: 0 !important;
	padding: 10px 12px !important;
	width: 100% !important;
}

.wdl-modal .wdl-field input::placeholder,
.wdl-modal .wdl-field textarea::placeholder {
	color: #97a6b8 !important;
	opacity: 1 !important;
}

.wdl-modal .wdl-field textarea {
	min-height: 76px !important;
	resize: vertical !important;
}

.wdl-modal .wdl-field input:focus,
.wdl-modal .wdl-field textarea:focus {
	border-color: #25D366 !important;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3) !important;
	outline: 0 !important;
}

.wdl-field__hint,
.wdl-counter {
	color: rgba(255, 255, 255, 0.62) !important;
	font-size: 11.5px !important;
}

.wdl-counter {
	justify-self: end;
}

.wdl-counter--limit {
	color: #ffb08d !important;
	font-weight: 700 !important;
}

/* ---- Teléfono con prefijo ---- */
.wdl-phone {
	align-items: stretch;
	display: flex;
}

.wdl-modal .wdl-phone__prefix {
	align-items: center !important;
	background: #0a2540 !important;
	border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
	border-right: 0 !important;
	border-radius: 8px 0 0 8px !important;
	color: #fff !important;
	display: inline-flex !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	justify-content: center !important;
	margin: 0 !important;
	min-width: 60px !important;
	padding: 0 12px !important;
}

.wdl-modal .wdl-phone input {
	border-radius: 0 8px 8px 0 !important;
}

/* ---- Checkbox ---- */
/* La aceptación de la política se resalta en un panel propio para que NO
   parezca una categoría más y quede claro que hay que marcarla. */
.wdl-modal .wdl-checkbox {
	align-items: flex-start !important;
	background: rgba(255, 255, 255, 0.08) !important;
	border: 1px solid rgba(255, 255, 255, 0.2) !important;
	border-left: 4px solid #24d464 !important;
	border-radius: 8px !important;
	display: flex !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	gap: 11px !important;
	line-height: 1.45 !important;
	margin-top: 4px !important;
	padding: 12px 14px !important;
}

.wdl-wrapper--call .wdl-checkbox {
	border-left-color: #FF7C3F !important;
}

.wdl-modal .wdl-checkbox input {
	accent-color: #24d464 !important;
	flex: 0 0 auto !important;
	height: 18px !important;
	margin: 1px 0 0 !important;
	width: 18px !important;
}

.wdl-wrapper--call .wdl-checkbox input {
	accent-color: #FF7C3F !important;
}

.wdl-modal .wdl-checkbox a {
	color: #8fd6ff !important;
	font-weight: 600 !important;
	text-decoration: underline !important;
}

/* ---- Mensajes ---- */
.wdl-message {
	border-radius: 8px;
	display: none;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
	padding: 9px 12px;
}

.wdl-message--error,
.wdl-message--success {
	display: block;
}

.wdl-message--error {
	background: #fff1ed !important;
	color: #b42318 !important;
}

.wdl-message--success {
	background: #ecfdf3 !important;
	color: #067647 !important;
}

/* ---- Pie WhatsApp ---- */
.wdl-wa-hint {
	align-items: center;
	color: rgba(255, 255, 255, 0.6) !important;
	display: flex;
	font-size: 11.5px !important;
	gap: 6px;
	justify-content: center;
	margin: 8px 0 0 !important;
}

.wdl-wa-hint svg {
	flex: 0 0 auto;
}

/* ---- Selector de franja horaria (formulario de llamada) ---- */
.wdl-modal .wdl-field select.wdl-select {
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	background-color: #ffffff !important;
	/* flecha desplegable en SVG para no depender del tema */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%230a2540' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E") !important;
	background-position: right 12px center !important;
	background-repeat: no-repeat !important;
	border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	color: #0a2540 !important;
	cursor: pointer !important;
	font-family: inherit !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
	margin: 0 !important;
	padding: 10px 36px 10px 12px !important;
	width: 100% !important;
}

.wdl-modal .wdl-field select.wdl-select:focus {
	border-color: #25D366 !important;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3) !important;
	outline: 0 !important;
}

/* ---- Tipo de caso (checkboxes) ---- */
.wdl-categories {
	border: 0 !important;
	margin: 0 !important;
	min-width: 0 !important;
	padding: 0 !important;
}

.wdl-modal .wdl-categories__legend {
	color: rgba(255, 255, 255, 0.92) !important;
	float: none !important;
	font-family: inherit !important;
	font-size: 12.5px !important;
	font-weight: 600 !important;
	margin: 0 0 5px !important;
	padding: 0 !important;
	width: auto !important;
}

.wdl-categories__grid {
	display: grid;
	gap: 7px 12px;
	grid-template-columns: 1fr 1fr;
	margin-top: 8px;
}

.wdl-modal .wdl-check {
	align-items: flex-start !important;
	color: rgba(255, 255, 255, 0.92) !important;
	cursor: pointer !important;
	display: flex !important;
	font-family: inherit !important;
	font-size: 12.5px !important;
	font-weight: 400 !important;
	gap: 8px !important;
	line-height: 1.35 !important;
	margin: 0 !important;
}

.wdl-modal .wdl-check input {
	-webkit-appearance: auto !important;
	appearance: auto !important;
	background: #fff !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	flex: 0 0 auto !important;
	height: 16px !important;
	margin: 1px 0 0 !important;
	padding: 0 !important;
	width: 16px !important;
}

.wdl-other {
	margin-top: 9px;
}

.wdl-modal .wdl-other input {
	background: #ffffff !important;
	border: 1.5px solid rgba(255, 255, 255, 0.35) !important;
	border-radius: 8px !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	color: #0a2540 !important;
	font-family: inherit !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
	margin: 0 !important;
	padding: 10px 12px !important;
	width: 100% !important;
}

.wdl-modal .wdl-other input:focus {
	border-color: #25D366 !important;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.3) !important;
	outline: 0 !important;
}

/* ---- Acento naranja para los formularios de llamada ---- */
.wdl-wrapper--call .wdl-open-button,
.wdl-wrapper--call .wdl-submit-button {
	background: #FF7C3F !important;
}

.wdl-wrapper--call .wdl-open-button:hover,
.wdl-wrapper--call .wdl-submit-button:hover {
	background: #ffffff !important;
	color: #032449 !important;
}

.wdl-wrapper--call .wdl-modal__panel {
	border-top-color: #FF7C3F !important;
}

.wdl-wrapper--call .wdl-wa-badge {
	background: rgba(255, 124, 63, 0.18);
	border-color: rgba(255, 124, 63, 0.45);
}

.wdl-wrapper--call .wdl-wa-badge__icon {
	background: #FF7C3F;
}

.wdl-wrapper--call .wdl-field input:focus,
.wdl-wrapper--call .wdl-field textarea:focus,
.wdl-wrapper--call .wdl-field select.wdl-select:focus,
.wdl-wrapper--call .wdl-other input:focus {
	border-color: #FF7C3F !important;
	box-shadow: 0 0 0 3px rgba(255, 124, 63, 0.3) !important;
}

.wdl-modal-open {
	overflow: hidden;
}

/* ---- Responsive (bottom sheet en móvil: Android + iPhone) ---- */
@media (max-width: 600px) {
	.wdl-modal[aria-hidden="false"] {
		align-items: flex-end;
		padding: 0;
	}

	.wdl-modal__panel {
		border-radius: 16px 16px 0 0 !important;
		/* dvh evita que la barra de URL de Safari descoloque el panel */
		max-height: 92vh;
		max-height: 92dvh;
		/* respeta el home indicator / notch inferior en iPhone */
		padding: 20px 16px max(20px, env(safe-area-inset-bottom)) !important;
		width: 100%;
	}

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

	.wdl-categories__grid {
		grid-template-columns: 1fr;
	}

	.wdl-modal__intro {
		margin-right: 36px;
	}

	/* 16px en los campos evita el zoom automático al enfocar en iOS */
	.wdl-modal .wdl-field input,
	.wdl-modal .wdl-field textarea,
	.wdl-modal .wdl-phone__prefix,
	.wdl-modal .wdl-other input {
		font-size: 16px !important;
	}

	.wdl-modal .wdl-modal__title {
		font-size: 21px !important;
	}

	.wdl-wrapper .wdl-open-button {
		width: 100% !important;
	}
}

/* Pantallas muy estrechas (iPhone SE, Android pequeños) */
@media (max-width: 360px) {
	.wdl-modal__panel {
		padding-left: 13px !important;
		padding-right: 13px !important;
	}

	.wdl-form {
		gap: 10px;
	}
}
