/* ============================================================================
 * Excel — Calculadora de Inversión
 * Estilos visuales del widget. Scope: .excel-calc-widget
 * Aplica la identidad visual del sitio Fondos Abiertos Excel
 * (paleta teal/verde/naranja + tipografía Poppins).
 * El cliente puede sobrescribir desde los controles de estilo en Elementor.
 * ========================================================================== */

.excel-calc-widget {
	--ec-green-dark:        #124C56;
	--ec-green-dark-2:      #0e3e47;
	--ec-green-bright:      #6CC249;
	--ec-green-bright-soft: rgba(108,194,73,.14);
	--ec-green-bright-glow: rgba(108,194,73,.45);
	--ec-orange:            #ED8B00;
	--ec-white:             #ffffff;
	--ec-text-soft:         rgba(255,255,255,.78);
	--ec-text-dim:          rgba(255,255,255,.55);
	--ec-line:              rgba(255,255,255,.18);
	--ec-line-strong:       rgba(255,255,255,.32);
	--ec-radius-pill:       14px;
	--ec-radius-card:       18px;
	--ec-shadow-soft:       0 10px 30px -12px rgba(0,0,0,.45);
	--ec-shadow-glow:       0 0 0 2px var(--ec-green-bright), 0 0 28px -2px var(--ec-green-bright-glow);

	font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	font-weight: 400;
	line-height: 1.5;
	color: var(--ec-white);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;

	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}

@media (min-width: 980px) {
	.excel-calc-widget { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

/* ===== Header / títulos / disclaimer ===== */
.excel-calc-widget .eic-header {
	margin-bottom: 1.5rem;
	text-align: center;
}
@media (min-width: 980px) {
	.excel-calc-widget .eic-header { grid-column: 1 / -1; }
}
.excel-calc-widget .eic-title {
	font-weight: 300;
	font-size: clamp(1.6rem, 3vw, 2.6rem);
	line-height: 1.18;
	margin: 0 0 1rem;
	letter-spacing: -.01em;
	color: var(--ec-white);
}
.excel-calc-widget .eic-title strong {
	color: var(--ec-green-bright);
	font-weight: 700;
}
.excel-calc-widget .eic-subtitle {
	color: var(--ec-text-soft);
	font-size: 1rem;
	line-height: 1.55;
	margin: 0 auto 1rem;
	max-width: 720px;
}
.excel-calc-widget .eic-subtitle strong { color: var(--ec-green-bright); font-weight: 600; }

.excel-calc-widget .eic-disclaimer {
	font-size: .78rem;
	color: var(--ec-text-dim);
	line-height: 1.55;
	text-align: justify;
	max-width: 920px;
	margin: 1.5rem auto 0;
}
.excel-calc-widget .eic-disclaimer p { margin: .35rem 0; }
.excel-calc-widget .eic-disclaimer strong { color: var(--ec-text-soft); }
@media (min-width: 980px) {
	.excel-calc-widget .eic-disclaimer { grid-column: 1 / -1; }
}

/* Disclaimer responsive visibility */
.excel-calc-widget .eic-disclaimer--desktop { display: none; }
@media (min-width: 768px) {
	.excel-calc-widget .eic-disclaimer--desktop { display: block; }
	.excel-calc-widget .eic-disclaimer--mobile  { display: none; }
}

/* ===== Currency toggle (Pesos/Dólares) ===== */
.excel-calc-widget .input-toggle--currency {
	display: inline-grid;
	grid-template-columns: repeat(2, minmax(140px, 1fr));
	gap: .75rem;
	padding: .45rem;
	background: rgba(10,48,56,.45);
	border: 1px solid var(--ec-line);
	border-radius: var(--ec-radius-card);
	justify-self: center;
	margin: 0 auto;
}
@media (min-width: 980px) {
	.excel-calc-widget > div:has(.input-toggle--currency) { grid-column: 1 / -1; }
}

/* ===== Labels / input wraps ===== */
.excel-calc-widget .input-wrap { margin-bottom: 1.75rem; }
.excel-calc-widget .input-wrap:last-child { margin-bottom: 0; }
.excel-calc-widget .input-label {
	display: block;
	font-weight: 600;
	font-size: 1.05rem;
	margin-bottom: 1rem;
	letter-spacing: .01em;
	color: var(--ec-white);
}

/* ===== Radio pill groups ===== */
.excel-calc-widget .input-group.input-toggle {
	display: grid;
	gap: .85rem;
}
.excel-calc-widget .input-group.input-toggle.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.excel-calc-widget .input-group.input-toggle.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.excel-calc-widget .input-group.input-toggle.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.excel-calc-widget .input-group.input-toggle.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }

.excel-calc-widget .radio {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 1.05rem 1rem;
	background: rgba(255,255,255,.03);
	border: 1.5px solid var(--ec-line);
	border-radius: var(--ec-radius-pill);
	cursor: pointer;
	font-weight: 600;
	font-size: .92rem;
	letter-spacing: .01em;
	color: var(--ec-white);
	text-transform: uppercase;
	transition: border-color .2s ease, background .2s ease, box-shadow .25s ease;
	user-select: none;
	margin: 0;
}
.excel-calc-widget .radio:hover {
	border-color: var(--ec-line-strong);
	background: rgba(255,255,255,.05);
}
.excel-calc-widget .radio input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}
.excel-calc-widget .radio span { display: none; }
.excel-calc-widget .radio:has(input:checked) {
	border-color: var(--ec-green-bright);
	background: var(--ec-green-bright-soft);
	box-shadow: var(--ec-shadow-glow);
}

/* ===== Custom amount input ===== */
.excel-calc-widget .input {
	width: 100%;
	padding: 1.05rem 1.5rem;
	background: rgba(255,255,255,.03);
	border: 1.5px solid var(--ec-line);
	border-radius: var(--ec-radius-pill);
	color: var(--ec-white);
	font-family: inherit;
	font-weight: 500;
	font-size: 1rem;
	letter-spacing: .01em;
	transition: border-color .2s, background .2s, box-shadow .25s;
	outline: none;
	box-sizing: border-box;
}
.excel-calc-widget .input::placeholder {
	color: var(--ec-text-dim);
	font-weight: 400;
}
.excel-calc-widget .input:hover { border-color: var(--ec-line-strong); }
.excel-calc-widget .input:focus,
.excel-calc-widget .input.focus {
	border-color: var(--ec-green-bright);
	background: rgba(108,194,73,.06);
	box-shadow: var(--ec-shadow-glow);
}

/* ===== Box results ===== */
.excel-calc-widget .box-results {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
}
.excel-calc-widget .box-results > div {
	background: var(--ec-green-bright);
	color: var(--ec-green-dark);
	border-radius: var(--ec-radius-card);
	padding: 1.5rem 1.5rem 1.75rem;
	position: relative;
	overflow: hidden;
	box-shadow: var(--ec-shadow-soft);
}
.excel-calc-widget .box-results > div::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 90% 110%, rgba(18,76,86,.18), transparent 50%),
		radial-gradient(circle at 10% -20%, rgba(255,255,255,.22), transparent 55%);
	pointer-events: none;
}
/* Rate card siempre full-width — proporciones matchean el sitio real */
.excel-calc-widget .box-results > div:first-child,
.excel-calc-widget .box-results > div.col-span-2 {
	grid-column: 1 / -1;
	padding: 1.4rem 1.75rem 1.55rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.excel-calc-widget .box-results span {
	display: block;
	font-size: 1.02rem;
	font-weight: 500;
	line-height: 1.35;
	color: var(--ec-green-dark);
	margin-bottom: .6rem;
}
.excel-calc-widget .box-results strong {
	display: block;
	font-weight: 700;
	font-size: 1.55rem;
	color: var(--ec-green-dark);
	letter-spacing: -.01em;
}
.excel-calc-widget .box-results > div:first-child strong,
.excel-calc-widget .box-results > div.col-span-2 strong {
	font-size: clamp(2.2rem, 3.6vw, 3.2rem);
	font-weight: 800;
	line-height: 1.05;
	margin-top: .15rem;
	letter-spacing: -.02em;
}
.excel-calc-widget .box-results .\!text-\[200\%\] {
	font-size: clamp(2.2rem, 3.6vw, 3.2rem) !important;
	font-weight: 800;
	line-height: 1.05;
	letter-spacing: -.02em;
}

/* ===== Responsive collapse ===== */
@media (max-width: 640px) {
	.excel-calc-widget .box-results { grid-template-columns: 1fr; }
	.excel-calc-widget .input-group.input-toggle.grid-cols-3,
	.excel-calc-widget .input-group.input-toggle.grid-cols-4,
	.excel-calc-widget .input-group.input-toggle.grid-cols-5 {
		grid-template-columns: repeat(2, 1fr);
	}
	.excel-calc-widget .radio { font-size: .85rem; padding: .9rem .75rem; }
}

/* ===== Entrance animation ===== */
@keyframes excel-calc-fade-up {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: translateY(0); }
}
.excel-calc-widget > * {
	animation: excel-calc-fade-up .55s ease both;
}
.excel-calc-widget > *:nth-child(2) { animation-delay: .07s; }
.excel-calc-widget > *:nth-child(3) { animation-delay: .14s; }
.excel-calc-widget > *:nth-child(4) { animation-delay: .21s; }
.excel-calc-widget > *:nth-child(5) { animation-delay: .28s; }
