@charset "UTF-8";
/* ------------------------------------------------------------------------
   ValorUDI - Evolución Histórica de la UDI · Premium CSS
   ------------------------------------------------------------------------ */

.udi-hist-page {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	max-width: 900px;
	margin: 0 auto;
	padding: 0 20px 60px;
	color: #1f2937;
	-webkit-font-smoothing: antialiased;
}

/* -- Hero -- */
.udi-hist-hero {
	text-align: center;
	padding: 10px 20px 40px;
}
.udi-hist-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #0d9488;
	background: #f0fdfa;
	border: 1px solid #99f6e4;
	padding: 5px 16px;
	border-radius: 20px;
	margin-bottom: 16px;
}
.udi-hist-hero__title {
	font-size: 2.2rem;
	font-weight: 800;
	color: #111827;
	letter-spacing: -0.5px;
	margin: 0 0 14px;
	line-height: 1.15;
}
.udi-hist-hero__subtitle {
	font-size: 1rem;
	color: #6b7280;
	max-width: 620px;
	margin: 0 auto;
	line-height: 1.7;
}

/* -- Container Card -- */
.udi-hist-container {
	margin-bottom: 48px;
}
.udi-hist-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 16px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	overflow: hidden; /* Contains the scroll area cleanly */
	max-height: 650px;
	position: relative;
	display: flex;
	flex-direction: column;
}

/* Let the table body scroll inside the card, but keep header fixed */
.udi-hist-card {
	overflow-y: auto;
}

/* Custom Scrollbar for the Card */
.udi-hist-card::-webkit-scrollbar {
	width: 8px;
}
.udi-hist-card::-webkit-scrollbar-track {
	background: #f8fafc; 
	border-left: 1px solid #f1f5f9;
}
.udi-hist-card::-webkit-scrollbar-thumb {
	background: #cbd5e1; 
	border-radius: 4px;
}
.udi-hist-card::-webkit-scrollbar-thumb:hover {
	background: #94a3b8; 
}

/* -- Premium HTML Table -- */
.udi-historical-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
	min-width: 600px;
}
.udi-historical-table th {
	background: #f8fafc;
	color: #475569;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 16px 20px;
	border-bottom: 1px solid #e2e8f0;
	position: sticky;
	top: 0;
	z-index: 1;
	box-shadow: 0 2px 4px rgba(0,0,0,0.02); /* separation scroll tick */
}
.udi-historical-table td {
	padding: 14px 20px;
	font-size: 0.95rem;
	color: #334155;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
}
.udi-historical-table tbody tr {
	transition: background-color 0.15s ease;
}
.udi-historical-table tbody tr:hover {
	background-color: #f0fdfa; /* Teal highlight row matching debt module */
}
.udi-historical-table tbody tr:last-child td {
	border-bottom: none;
}

/* Specialized Table Cells */
.udi-col-year {
	width: 15%;
}
.udi-cell-highlight strong {
	font-size: 1.15rem;
	color: #0f766e;
	font-weight: 800;
	letter-spacing: -0.5px;
}

.udi-cell-date {
	color: #64748b;
	font-size: 0.88rem;
}
.udi-cell-value {
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
	font-weight: 600;
	color: #1e293b;
	font-size: 0.95rem;
}

/* -- Badges for Variation -- */
.udi-cell-var {
	width: 20%;
}
.udi-badge-inflacion {
	display: inline-block;
	font-size: 0.82rem;
	font-weight: 700;
	font-family: 'Inter', sans-serif;
	padding: 4px 10px;
	border-radius: 6px;
}
.udi-badge-inflacion.udi-up {
	background-color: #ecfdf5;
	color: #059669;
	border: 1px solid #a7f3d0;
}
.udi-badge-inflacion.udi-down {
	background-color: #fef2f2;
	color: #dc2626;
	border: 1px solid #fecaca;
}
.udi-badge-inflacion.udi-neutral {
	background-color: #f8fafc;
	color: #64748b;
	border: 1px solid #e2e8f0;
}
.udi-badge-base {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	color: #94a3b8;
	background: #f1f5f9;
	padding: 4px 10px;
	border-radius: 6px;
	border: 1px solid #e2e8f0;
}

/* -- Mobile -- */
@media (max-width: 650px) {
	/* Page wrapper */
	.udi-hist-page { padding: 0 8px 40px; overflow-x: hidden; }
	.udi-hist-page * { box-sizing: border-box; }
	
	/* Hero */
	.udi-hist-hero { padding: 5px 8px 20px; }
	.udi-hist-hero__title { font-size: clamp(1.4rem, 6vw, 1.7rem); }
	.udi-hist-hero__subtitle { font-size: 0.88rem; }
	
	/* Table card */
	.udi-hist-card { border-radius: 10px; max-height: 500px; }
	
	/* Table: allow horizontal scroll */
	.udi-historical-table { min-width: 500px; }
	.udi-historical-table th { padding: 10px 10px; font-size: 0.68rem; }
	.udi-historical-table td { padding: 10px; font-size: 0.82rem; }
	
	/* Table cell values */
	.udi-cell-highlight strong { font-size: 1rem; }
	.udi-cell-date { font-size: 0.78rem; }
	.udi-cell-value { font-size: 0.82rem; }
	
	/* Badges */
	.udi-badge-inflacion { font-size: 0.72rem; padding: 3px 8px; }
	.udi-badge-base { font-size: 0.68rem; padding: 3px 8px; }
}

