/* ==========================================================
   Rehilete Cotizador Web
   Responsive, accesible y encapsulado.
========================================================== */

.reh-estimator{
	--reh-blue:#168fbd;
	--reh-ink:#14304a;
	--reh-green:#68bda9;
	--reh-green-light:#eaf7f7;
	--reh-coral:#f45b5f;
	--reh-text:#52677a;
	--reh-line:#dce9ed;
	--reh-surface:#ffffff;
	--reh-shadow:0 18px 42px rgba(20,48,74,.08);

	width:100%;
	max-width:1180px;
	margin:0 auto;
	font-family:"Source Sans 3","Helvetica Neue",Arial,sans-serif;
	color:var(--reh-ink);
}

.reh-estimator *,
.reh-estimator *::before,
.reh-estimator *::after{
	box-sizing:border-box;
}

.reh-estimator__head{
	display:flex;
	align-items:flex-end;
	justify-content:space-between;
	gap:24px;
	margin-bottom:24px;
}

.reh-estimator__head h2{
	margin:0;
	color:var(--reh-ink);
	font-family:"Source Serif 4",Georgia,serif;
	font-size:clamp(2rem,3vw,2.6rem);
	font-weight:650;
	line-height:1.08;
	letter-spacing:-.025em;
}

.reh-estimator__head p{
	margin:.4rem 0 0;
	color:var(--reh-text);
	font-size:1rem;
	line-height:1.45;
}

.reh-estimator__note{
	flex:0 0 auto;
	color:var(--reh-blue)!important;
	font-weight:700;
	white-space:nowrap;
}

.reh-estimator__form{
	margin:0;
	padding:26px;
	border:1px solid var(--reh-line);
	border-radius:16px;
	background:var(--reh-surface);
	box-shadow:var(--reh-shadow);
}

.reh-estimator__grid{
	display:grid;
	grid-template-columns:1.18fr .9fr .9fr .78fr;
	gap:24px;
	align-items:stretch;
}

.reh-estimator__group{
	min-width:0;
	margin:0;
	padding:0;
	border:0;
}

.reh-estimator__group legend{
	display:flex;
	align-items:center;
	gap:8px;
	width:100%;
	margin:0 0 13px;
	padding:0;
	color:var(--reh-ink);
	font-size:1rem;
	font-weight:700;
	line-height:1.3;
}

.reh-estimator__group legend > span{
	display:inline-flex;
	width:30px;
	height:30px;
	flex:0 0 30px;
	align-items:center;
	justify-content:center;
	border-radius:50%;
	background:var(--reh-green-light);
	color:var(--reh-ink);
	font-size:.82rem;
}

.reh-estimator__options{
	display:grid;
	grid-template-columns:repeat(3,minmax(0,1fr));
	gap:8px;
}

.reh-estimator__choice{
	position:relative;
	min-width:0;
}

.reh-estimator__choice input{
	position:absolute;
	width:1px;
	height:1px;
	overflow:hidden;
	clip:rect(0 0 0 0);
	clip-path:inset(50%);
	white-space:nowrap;
	opacity:0;
}

.reh-estimator__choice label{
	display:flex;
	min-height:84px;
	align-items:center;
	justify-content:center;
	flex-direction:column;
	gap:7px;
	padding:10px;
	border:1px solid #cfdde2;
	border-radius:9px;
	background:#fff;
	color:var(--reh-ink);
	cursor:pointer;
	font-size:.9rem;
	font-weight:600;
	line-height:1.22;
	text-align:center;
	transition:border-color .18s ease,background-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

.reh-estimator__choice label:hover{
	border-color:#9fc9d8;
}

.reh-estimator__choice input:checked + label{
	border-color:var(--reh-blue);
	background:#edf8fc;
	box-shadow:inset 0 0 0 1px var(--reh-blue);
}

.reh-estimator__choice input:focus-visible + label{
	outline:3px solid rgba(22,143,189,.25);
	outline-offset:3px;
}

.reh-estimator__choice-icon{
	color:var(--reh-blue);
	font-size:1.35rem;
	line-height:1;
}

.reh-estimator__action{
	display:flex;
	min-width:0;
	flex-direction:column;
	justify-content:center;
	padding-left:24px;
	border-left:1px solid var(--reh-line);
}

.reh-estimator__button{
	width:100%;
	min-height:48px;
	padding:14px 16px;
	border:0;
	border-radius:8px;
	background:var(--reh-coral);
	color:#fff;
	cursor:pointer;
	font:700 .95rem/1.2 "Source Sans 3","Helvetica Neue",Arial,sans-serif;
	transition:opacity .18s ease,transform .18s ease;
}

.reh-estimator__button:hover{
	opacity:.92;
}

.reh-estimator__button:active{
	transform:translateY(1px);
}

.reh-estimator__button:focus-visible{
	outline:3px solid rgba(244,91,95,.28);
	outline-offset:3px;
}

.reh-estimator__result{
	display:flex;
	min-height:54px;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	gap:2px;
	margin-top:10px;
	color:var(--reh-text);
	font-size:.82rem;
	line-height:1.35;
	text-align:center;
}

.reh-estimator__result-price{
	display:block;
	color:var(--reh-blue);
	font-family:"Source Serif 4",Georgia,serif;
	font-size:1.55rem;
	font-weight:700;
	line-height:1.15;
}

.reh-estimator__result small{
	display:block;
	max-width:24rem;
	color:var(--reh-text);
	font-size:.75rem;
	line-height:1.3;
}

/* Laptop pequeño / tablet horizontal */
@media (max-width:1100px){
	.reh-estimator__grid{
		grid-template-columns:1fr 1fr;
	}

	.reh-estimator__action{
		padding-left:0;
		border-left:0;
	}
}

/* Tablet */
@media (max-width:767px){
	.reh-estimator__head{
		display:block;
	}

	.reh-estimator__note{
		margin-top:10px!important;
		white-space:normal;
	}

	.reh-estimator__form{
		padding:18px;
	}

	.reh-estimator__grid{
		grid-template-columns:1fr;
		gap:22px;
	}

	.reh-estimator__action{
		padding-top:4px;
	}
}

/* Móvil */
@media (max-width:520px){
	.reh-estimator__head h2{
		font-size:2rem;
	}

	.reh-estimator__form{
		padding:16px;
		border-radius:12px;
	}

	.reh-estimator__options{
		grid-template-columns:1fr;
		gap:8px;
	}

	.reh-estimator__choice label{
		min-height:54px;
		flex-direction:row;
		justify-content:flex-start;
		padding:12px 14px;
		text-align:left;
	}

	.reh-estimator__choice-icon{
		width:24px;
		text-align:center;
	}

	.reh-estimator__button{
		min-height:52px;
		font-size:1rem;
	}
}

@media (prefers-reduced-motion:reduce){
	.reh-estimator__choice label,
	.reh-estimator__button{
		transition:none;
	}
}


/* WhatsApp para proyectos personalizados */
.reh-estimator__whatsapp{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	margin-top:8px;
	padding:10px 14px;
	border-radius:8px;
	background:#25D366;
	color:#fff!important;
	text-decoration:none!important;
	font-weight:700;
	line-height:1.25;
}
.reh-estimator__whatsapp:hover,
.reh-estimator__whatsapp:focus{
	background:#1fb85a;
	color:#fff!important;
}
.reh-estimator__whatsapp:focus-visible{
	outline:3px solid rgba(37,211,102,.25);
	outline-offset:3px;
}


/* Campo numérico de secciones — v1.2 */
.reh-estimator__number-wrap{
	display:flex;
	min-height:84px;
	flex-direction:column;
	justify-content:center;
	gap:7px;
}

.reh-estimator__number{
	width:100%;
	min-height:52px;
	padding:10px 12px;
	border:1px solid #cfdde2;
	border-radius:9px;
	background:#fff;
	color:var(--reh-ink);
	font:700 1rem/1.2 "Source Sans 3","Helvetica Neue",Arial,sans-serif;
	text-align:center;
}

.reh-estimator__number:focus{
	border-color:var(--reh-blue);
	outline:3px solid rgba(22,143,189,.20);
	outline-offset:2px;
}

.reh-estimator__number-help{
	color:var(--reh-text);
	font-size:.78rem;
	line-height:1.3;
	text-align:center;
}

@media (max-width:520px){
	.reh-estimator__number-wrap{
		min-height:auto;
	}
	.reh-estimator__number{
		min-height:54px;
		font-size:1.05rem;
	}
}


/* ==========================================================
   ICONO CALENDARIO — v1.2.2
   Dibujado con CSS para evitar glifos rotos por tipografía/SO.
========================================================== */

.reh-estimator__choice-icon--calendar{
	position:relative;
	display:inline-block;
	width:21px;
	height:19px;
	border:2px solid var(--reh-blue);
	border-radius:3px;
	font-size:0;
}

.reh-estimator__choice-icon--calendar::before{
	content:"";
	position:absolute;
	left:-2px;
	right:-2px;
	top:4px;
	height:2px;
	background:var(--reh-blue);
}

.reh-estimator__choice-icon--calendar::after{
	content:"";
	position:absolute;
	top:-5px;
	left:4px;
	width:3px;
	height:6px;
	border-radius:2px;
	background:var(--reh-blue);
	box-shadow:8px 0 0 var(--reh-blue);
}


/* Landing page / Onepage: campo de secciones bloqueado */
.reh-estimator__number[readonly]{
	background:#f4f8f9;
	color:var(--reh-ink);
	cursor:not-allowed;
	opacity:.85;
}


/* ==========================================================
   Landing / Onepage bloqueada a 1 sección — v1.2.4
========================================================== */
.reh-estimator__number.is-locked,
.reh-estimator__number[readonly]{
	background:#eef3f5;
	border-color:#cfdde2;
	color:var(--reh-ink);
	cursor:not-allowed;
	opacity:1;
}

.reh-estimator__number.is-locked:focus,
.reh-estimator__number[readonly]:focus{
	outline:none;
	box-shadow:none;
}


/* ==========================================================
   GUÍA VISUAL DE CONFIGURACIÓN — v1.2.8
========================================================== */
.reh-estimator__helper{
	margin:0 0 12px;
	color:var(--reh-text);
	font-size:.78rem;
	font-weight:500;
	line-height:1.35;
}

.reh-estimator__group{
	position:relative;
	padding:12px;
	margin:-12px;
	border-radius:12px;
	transition:box-shadow .22s ease,background-color .22s ease;
}

.reh-estimator__group.is-attention{
	background:rgba(22,143,189,.035);
	box-shadow:
		0 0 0 2px rgba(22,143,189,.16),
		0 0 0 8px rgba(22,143,189,.045);
	animation:rehEstimatorPulse 1.8s ease-in-out infinite;
}

.reh-estimator__group.is-attention legend > span{
	background:var(--reh-blue);
	color:#fff;
}

@keyframes rehEstimatorPulse{
	0%,100%{
		box-shadow:
			0 0 0 2px rgba(22,143,189,.14),
			0 0 0 6px rgba(22,143,189,.03);
	}
	50%{
		box-shadow:
			0 0 0 2px rgba(22,143,189,.24),
			0 0 0 12px rgba(22,143,189,.06);
	}
}

@media (prefers-reduced-motion:reduce){
	.reh-estimator__group.is-attention{animation:none}
}


/* ==========================================================
   GUÍA DE 3 PASOS + MOBILE AUTO-FLOW — v1.2.9
========================================================== */

.reh-estimator__guide{
	margin:0 0 18px;
}

.reh-estimator__guide-title{
	margin:0 0 10px;
	color:var(--reh-ink);
	font-family:"Poppins","Helvetica Neue",Arial,sans-serif;
	font-size:.98rem;
	font-weight:700;
}

.reh-estimator__progress{
	display:flex;
	align-items:center;
	flex-wrap:wrap;
	gap:10px;
	margin:0;
	padding:0;
	list-style:none;
}

.reh-estimator__progress-item{
	display:inline-flex;
	align-items:center;
	gap:7px;
	color:var(--reh-text);
	font-size:.82rem;
	font-weight:600;
	line-height:1.2;
}

.reh-estimator__progress-number{
	display:inline-flex;
	width:25px;
	height:25px;
	align-items:center;
	justify-content:center;
	border:1px solid var(--reh-line);
	border-radius:50%;
	background:#fff;
	color:var(--reh-text);
	font-size:.75rem;
	font-weight:700;
	transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}

.reh-estimator__progress-item.is-current{
	color:var(--reh-blue);
}

.reh-estimator__progress-item.is-current .reh-estimator__progress-number{
	border-color:var(--reh-blue);
	background:var(--reh-blue);
	color:#fff;
}

.reh-estimator__progress-item.is-complete{
	color:var(--reh-green);
}

.reh-estimator__progress-item.is-complete .reh-estimator__progress-number{
	border-color:var(--reh-green);
	background:var(--reh-green);
	color:#fff;
}

.reh-estimator__progress-arrow{
	color:#9ab6c0;
	font-size:1rem;
	line-height:1;
}

.reh-estimator__helper--example{
	margin-top:-7px;
	color:#6f8392;
	font-size:.72rem;
}

/* El paso activo se distingue con más claridad sin volverse estridente. */
.reh-estimator__group.is-attention{
	background:rgba(22,143,189,.045);
	box-shadow:
		0 0 0 2px rgba(22,143,189,.20),
		0 0 0 9px rgba(22,143,189,.055),
		0 10px 26px rgba(20,48,74,.055);
}

/* Offset para que el auto-scroll no pegue el bloque al borde superior. */
.reh-estimator__group,
.reh-estimator__action{
	scroll-margin-top:90px;
}

@media (max-width:767px){
	.reh-estimator__guide{
		margin-bottom:22px;
	}

	.reh-estimator__guide-title{
		font-size:1rem;
	}

	.reh-estimator__progress{
		display:grid;
		grid-template-columns:1fr auto 1fr auto 1fr;
		gap:6px;
	}

	.reh-estimator__progress-item{
		flex-direction:column;
		gap:5px;
		text-align:center;
		font-size:.72rem;
	}

	.reh-estimator__progress-arrow{
		align-self:center;
	}

	.reh-estimator__group{
		scroll-margin-top:78px;
	}

	.reh-estimator__helper{
		font-size:.9rem;
	}

	.reh-estimator__helper--example{
		font-size:.78rem;
	}
}

@media (prefers-reduced-motion:reduce){
	.reh-estimator__progress-number{
		transition:none;
	}
}


/* ==========================================================
   TIPOGRAFÍA CONFIGURABLE — v1.3.0
========================================================== */

/* Título principal del cotizador */
.reh-estimator__head h2{
	font-size:var(--reh-title-desktop,42px);
	white-space:nowrap;
}

/* Subtítulo / introducción */
.reh-estimator__head > div > p{
	font-size:var(--reh-intro-desktop,16px);
}

/* Instrucción interna */
.reh-estimator__guide-title{
	font-size:var(--reh-guide-desktop,16px);
}

/* Títulos de cada paso */
.reh-estimator__group legend{
	font-size:var(--reh-step-desktop,16px);
}

/*
 * En pantallas donde el encabezado ya no tiene suficiente ancho,
 * permitimos que el título se parta antes de llegar a móvil.
 */
@media (max-width:1100px){
	.reh-estimator__head h2{
		white-space:normal;
	}
}

@media (max-width:767px){
	.reh-estimator__head h2{
		font-size:var(--reh-title-mobile,32px);
		white-space:normal;
	}

	.reh-estimator__head > div > p{
		font-size:var(--reh-intro-mobile,15px);
	}

	.reh-estimator__guide-title{
		font-size:var(--reh-guide-mobile,15px);
	}

	.reh-estimator__group legend{
		font-size:var(--reh-step-mobile,15px);
	}
}


/* ==========================================================
   DESCUBRE TU DESCUENTO — v1.3.1
========================================================== */
.reh-estimator__discount{
	margin-top:18px;
	padding-top:18px;
	border-top:1px solid var(--reh-line);
	text-align:center;
}

.reh-estimator__discount[hidden]{
	display:none!important;
}

.reh-estimator__discount-title{
	margin:0 0 4px;
	color:var(--reh-ink);
	font-size:.95rem;
	font-weight:700;
}

.reh-estimator__discount-text{
	margin:0 0 12px;
	color:var(--reh-text);
	font-size:.78rem;
	line-height:1.35;
}

.reh-estimator__discount-cards{
	display:grid;
	grid-template-columns:repeat(3,1fr);
	gap:7px;
}

.reh-estimator__discount-card{
	display:flex;
	min-height:58px;
	align-items:center;
	justify-content:center;
	border:1px solid var(--reh-line);
	border-radius:10px;
	background:linear-gradient(135deg,#eef8fb,#eaf7f7);
	color:var(--reh-blue);
	cursor:pointer;
	font:700 1.15rem/1 "Poppins","Helvetica Neue",Arial,sans-serif;
	transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}

.reh-estimator__discount-card:hover:not(:disabled){
	transform:translateY(-2px);
	border-color:var(--reh-blue);
	box-shadow:0 8px 18px rgba(20,48,74,.08);
}

.reh-estimator__discount-card:focus-visible{
	outline:3px solid rgba(22,143,189,.25);
	outline-offset:3px;
}

.reh-estimator__discount-card:disabled{
	cursor:default;
	opacity:.72;
}

.reh-estimator__discount-card.is-selected{
	border-color:var(--reh-coral);
	background:#fff3f3;
	color:var(--reh-coral);
	opacity:1;
	box-shadow:inset 0 0 0 1px var(--reh-coral);
}

.reh-estimator__discount-result{
	margin-top:10px;
	color:var(--reh-coral);
	font-size:.86rem;
	line-height:1.3;
}

.reh-estimator__result-original{
	display:block;
	color:#7d8d98;
	font-size:.78rem;
	text-decoration:line-through;
}

@media (max-width:520px){
	.reh-estimator__discount{
		margin-top:20px;
	}

	.reh-estimator__discount-card{
		min-height:64px;
		font-size:1.2rem;
	}
}

@media (prefers-reduced-motion:reduce){
	.reh-estimator__discount-card{
		transition:none;
	}
}


/* ==========================================================
   CONFIRMAR SECCIONES + RECALCULAR — v1.3.2
========================================================== */

.reh-estimator__sections-confirm{
	width:100%;
	margin-top:10px;
	padding:10px 12px;
	border:1px solid var(--reh-blue);
	border-radius:8px;
	background:#fff;
	color:var(--reh-blue);
	cursor:pointer;
	font:600 .82rem/1.2 "Poppins","Helvetica Neue",Arial,sans-serif;
	transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}

.reh-estimator__sections-confirm:hover{
	background:var(--reh-blue);
	color:#fff;
}

.reh-estimator__sections-confirm:focus-visible{
	outline:3px solid rgba(22,143,189,.24);
	outline-offset:3px;
}

.reh-estimator__button.is-recalculate{
	background:var(--reh-ink);
}

.reh-estimator__button.is-recalculate:hover{
	opacity:.92;
}

@media (max-width:520px){
	.reh-estimator__sections-confirm{
		min-height:48px;
		font-size:.9rem;
	}
}

@media (prefers-reduced-motion:reduce){
	.reh-estimator__sections-confirm{
		transition:none;
	}
}


/* ==========================================================
   CTA WHATSAPP DEL DESCUENTO — v1.3.3
========================================================== */

.reh-estimator__discount-whatsapp{
	display:flex;
	width:100%;
	align-items:center;
	justify-content:center;
	margin-top:12px;
	padding:13px 15px;
	border-radius:8px;
	background:#25D366;
	color:#fff!important;
	text-decoration:none!important;
	font:700 .84rem/1.2 "Poppins","Helvetica Neue",Arial,sans-serif;
	letter-spacing:.01em;
	transition:background-color .18s ease,transform .18s ease;
}

.reh-estimator__discount-whatsapp[hidden]{
	display:none!important;
}

.reh-estimator__discount-whatsapp:hover{
	background:#1fb85a;
	color:#fff!important;
	transform:translateY(-1px);
}

.reh-estimator__discount-whatsapp:focus-visible{
	outline:3px solid rgba(37,211,102,.28);
	outline-offset:3px;
}

@media (max-width:520px){
	.reh-estimator__discount-whatsapp{
		min-height:52px;
		font-size:.9rem;
	}
}

@media (prefers-reduced-motion:reduce){
	.reh-estimator__discount-whatsapp{
		transition:none;
	}
}


/* ==========================================================
   CONFIRMAR TIEMPO + AVISO DE URGENCIA — v1.3.4
========================================================== */

.reh-estimator__timing-warning{
	margin:10px 0 0;
	padding:9px 10px;
	border-left:3px solid var(--reh-coral);
	border-radius:5px;
	background:#fff4f4;
	color:#9b3f42;
	font:600 .74rem/1.35 "Poppins","Helvetica Neue",Arial,sans-serif;
}

.reh-estimator__timing-warning[hidden]{
	display:none!important;
}

.reh-estimator__timing-confirm{
	width:100%;
	margin-top:10px;
	padding:10px 12px;
	border:1px solid var(--reh-blue);
	border-radius:8px;
	background:#fff;
	color:var(--reh-blue);
	cursor:pointer;
	font:600 .82rem/1.2 "Poppins","Helvetica Neue",Arial,sans-serif;
	transition:background-color .18s ease,color .18s ease,border-color .18s ease;
}

.reh-estimator__timing-confirm:hover{
	background:var(--reh-blue);
	color:#fff;
}

.reh-estimator__timing-confirm:focus-visible{
	outline:3px solid rgba(22,143,189,.24);
	outline-offset:3px;
}

@media (max-width:520px){
	.reh-estimator__timing-warning{
		font-size:.8rem;
	}

	.reh-estimator__timing-confirm{
		min-height:48px;
		font-size:.9rem;
	}
}

@media (prefers-reduced-motion:reduce){
	.reh-estimator__timing-confirm{
		transition:none;
	}
}
