/*
 * Avisos de la ficha de producto. Usa las variables del plugin de estilos
 * (aloha-estilos-woocommerce), con respaldo literal por si se desactivara.
 * Los botones llevan todos sus estados explícitos porque el kit de Elementor
 * pinta los <button> de forma global.
 */

/* ---------- Plazo bajo el formulario de compra ---------- */

.aloha-plazo {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 14px 0 0;
	font-family: var(--aloha-tipo, "Poppins", sans-serif);
	font-size: 14px;
	line-height: 1.45;
	color: var(--aloha-navy-70, #636e85);
}
.aloha-plazo svg {
	flex: 0 0 auto;
	color: var(--aloha-cta-osc, #30a6a7);
}
.aloha-plazo strong {
	font-weight: 600;
	color: var(--aloha-navy, #1c244b);
}

/* ---------- Casilla de digitalización en el formulario ---------- */

.aloha-digi {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 16px;
	padding: 14px 16px;
	font-family: var(--aloha-tipo, "Poppins", sans-serif);
	background: var(--aloha-hueso, #f9fafb);
	border: 1.5px solid var(--aloha-linea, #e6ecf2);
	border-radius: var(--aloha-r-campo, 14px);
}
.aloha-digi[hidden] {
	display: none;
}
.aloha-digi__casilla {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	font-size: 14.5px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--aloha-navy, #1c244b);
	cursor: pointer;
}
.aloha-digi__casilla input {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	accent-color: var(--aloha-cta-osc, #30a6a7);
	cursor: pointer;
}
.aloha-digi__casilla .woocommerce-Price-amount {
	font-weight: 600;
	white-space: nowrap;
}
.aloha-digi__nota {
	margin: 6px 0 0 28px;
	font-size: 13px;
	line-height: 1.45;
	color: var(--aloha-navy-70, #636e85);
}

/* ---------- Ventana ---------- */

.aloha-digi-ventana {
	box-sizing: border-box;
	width: min(440px, calc(100vw - 32px));
	max-width: none;
	margin: auto;
	padding: 0;
	font-family: var(--aloha-tipo, "Poppins", sans-serif);
	color: var(--aloha-navy, #1c244b);
	background: #fff;
	border: 0;
	border-radius: var(--aloha-r-tarjeta, 18px);
	box-shadow: 0 24px 60px rgba(28, 36, 75, .25);
}
/* Para navegadores sin <dialog>: oculta mientras está cerrada y centrada al abrir. */
.aloha-digi-ventana:not([open]) {
	display: none;
}
.aloha-digi-ventana[open] {
	position: fixed;
	inset: 0;
	z-index: 100000;
	height: fit-content;
	max-height: calc(100vh - 32px);
	overflow: auto;
	animation: aloha-digi-entrada .2s cubic-bezier(.2, .8, .2, 1);
}
.aloha-digi-ventana::backdrop {
	background: rgba(28, 36, 75, .45);
}
@keyframes aloha-digi-entrada {
	from { opacity: 0; transform: translateY(8px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

.aloha-digi-ventana__caja {
	position: relative;
	padding: 30px 28px 26px;
}
.aloha-digi-ventana__caja:focus {
	outline: none;
}

.aloha-digi-ventana .aloha-digi-ventana__cerrar,
.aloha-digi-ventana .aloha-digi-ventana__cerrar:hover,
.aloha-digi-ventana .aloha-digi-ventana__cerrar:focus {
	position: absolute;
	top: 12px;
	right: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	color: var(--aloha-navy-70, #636e85);
	background: transparent;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
}
.aloha-digi-ventana .aloha-digi-ventana__cerrar:hover {
	color: var(--aloha-navy, #1c244b);
	background: var(--aloha-hueso, #f9fafb);
}

.aloha-digi-ventana__titulo {
	margin: 0 0 10px;
	padding-right: 32px;
	font-family: inherit;
	font-size: 21px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -.3px;
	color: var(--aloha-navy, #1c244b);
}
.aloha-digi-ventana__texto {
	margin: 0 0 18px;
	font-size: 15px;
	line-height: 1.6;
	color: var(--aloha-navy-70, #636e85);
}
.aloha-digi-ventana__texto .woocommerce-Price-amount {
	font-weight: 600;
	color: var(--aloha-navy, #1c244b);
	white-space: nowrap;
}
.aloha-digi-ventana__casilla {
	padding: 14px 16px;
	background: var(--aloha-hueso, #f9fafb);
	border: 1.5px solid var(--aloha-linea, #e6ecf2);
	border-radius: var(--aloha-r-campo, 14px);
}
.aloha-digi-ventana__nota {
	margin: 14px 0 22px;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--aloha-navy-70, #636e85);
}
.aloha-digi-ventana__nota a {
	font-weight: 600;
	color: var(--aloha-cta-osc, #30a6a7);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.aloha-digi-ventana .aloha-digi-ventana__boton,
.aloha-digi-ventana .aloha-digi-ventana__boton:hover,
.aloha-digi-ventana .aloha-digi-ventana__boton:focus {
	display: block;
	width: 100%;
	padding: 14px 24px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	color: #fff;
	background: var(--aloha-cta, #69ccd1);
	border: 0;
	border-radius: var(--aloha-r-boton, 14px);
	box-shadow: var(--aloha-sombra-cta, 0 4px 14px rgba(48, 166, 167, .28));
	cursor: pointer;
	transition: background-color .2s cubic-bezier(.4, 0, .2, 1);
}
.aloha-digi-ventana .aloha-digi-ventana__boton:hover {
	background: var(--aloha-cta-osc, #30a6a7);
}

.aloha-digi-ventana__cerrar:focus-visible,
.aloha-digi-ventana__boton:focus-visible,
.aloha-digi__casilla input:focus-visible {
	outline: 3px solid var(--aloha-turquesa, #4cc0c1);
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.aloha-digi-ventana__caja { padding: 26px 20px 20px; }
	.aloha-digi-ventana__titulo { font-size: 19px; }
}

@media (prefers-reduced-motion: reduce) {
	.aloha-digi-ventana[open] { animation: none; }
	.aloha-digi-ventana .aloha-digi-ventana__boton { transition: none; }
}
