/* Estilos del módulo [jvrm_caudales]. Todo scopeado bajo .jvrm-caudales. */

.jvrm-caudales {
	--jvrm-bg-1: #08203f;
	--jvrm-bg-2: #0a3149;
	--jvrm-bg-3: #0e4452;

	--jvrm-teal: #70e0e7;

	--jvrm-text: #d6ebf1;
	--jvrm-text-strong: #e8f5f8;
	--jvrm-text-muted: #a7c6d2;

	--jvrm-line: rgba(112, 224, 231, 0.26);
	--jvrm-cell: rgba(112, 224, 231, 0.16); /* fondo de las tablas */
	--jvrm-rowhead-bg: rgba(255, 255, 255, 0.015);

	--jvrm-radius: 30px;
	--jvrm-radius-sm: 16px;

	box-sizing: border-box;
	width: 100%;
	margin: 0;
	color: var(--jvrm-text);
	/* Tipografía homologada al resto de los módulos del sitio. */
	font-family: "Noto Sans", sans-serif;
	font-size: 16px;
	line-height: 24px;
	font-weight: 400;
}

.jvrm-caudales *,
.jvrm-caudales *::before,
.jvrm-caudales *::after {
	box-sizing: border-box;
}

.jvrm-caudales__inner {
	background-image: linear-gradient(160deg, var(--jvrm-bg-1) 0%, var(--jvrm-bg-2) 55%, var(--jvrm-bg-3) 100%);
	border-radius: var(--jvrm-radius);
	padding: 46px 52px 34px;
}

.jvrm-caudales__intro-wrap {
	margin-bottom: 30px;
}

.jvrm-caudales__title {
	margin: 0 0 14px;
	font-family: "Mulish", sans-serif;
	font-size: 32px;
	line-height: 38px;
	font-weight: 700;
	color: var(--jvrm-text-strong);
}

.jvrm-caudales__intro {
	margin: 0 0 16px;
	color: var(--jvrm-text-muted);
	max-width: 96ch;
}

.jvrm-caudales__intro a {
	color: var(--jvrm-text-strong);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.jvrm-caudales__meta {
	margin: 0;
	color: var(--jvrm-text);
}

.jvrm-caudales__meta strong {
	font-weight: 600;
}

.jvrm-caudales__exec {
	margin-left: 4px;
	color: var(--jvrm-text-muted);
}

.jvrm-caudales__block {
	margin-top: 26px;
}

.jvrm-caudales__block-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.jvrm-caudales__block-titles {
	min-width: 0;
}

.jvrm-caudales__block-title,
.jvrm-caudales__block-sub {
	margin: 0;
	color: var(--jvrm-text);
}

.jvrm-caudales__block-title strong {
	font-weight: 700;
}

.jvrm-caudales__pdf {
	flex: 0 0 auto;
	display: inline-block;
	padding: 12px 26px;
	border: 1px solid rgba(214, 235, 241, 0.5);
	border-radius: 999px;
	color: var(--jvrm-text-strong);
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.jvrm-caudales__pdf:hover,
.jvrm-caudales__pdf:focus-visible {
	background-color: var(--jvrm-teal);
	border-color: var(--jvrm-teal);
	color: #062230;
}

/* Tablas. Ojo: el theme envuelve toda tabla en .table-container (scripts.js)
   y su CSS carga después del nuestro, por eso la especificidad alta y las
   propiedades re-declaradas. No simplificar estos selectores. */

.jvrm-caudales__table-wrap {
	background-color: var(--jvrm-cell);
	border: 1px solid var(--jvrm-line);
	border-radius: var(--jvrm-radius-sm);
	overflow-x: auto; /* Scroll horizontal en pantallas angostas. */
	-webkit-overflow-scrolling: touch;
}

.jvrm-caudales__table-wrap:focus-visible {
	outline: 2px solid var(--jvrm-teal);
	outline-offset: 2px;
}

/* Anula el .table-container que inyecta el theme. */
.jvrm-caudales .jvrm-caudales__table-wrap .table-container {
	width: 100%;
	height: auto;
	overflow: visible;
	padding: 0;
	margin: 0;
	background: none;
	border: 0;
}

.jvrm-caudales .jvrm-caudales__table-wrap .jvrm-caudales__table {
	width: 100%;
	border-collapse: collapse;
	min-width: 660px; /* Fuerza scroll antes de que las celdas se aplasten. */
	font-family: "Noto Sans", sans-serif;
	font-size: 16px;
	background: none;
}

.jvrm-caudales .jvrm-caudales__table-wrap .jvrm-caudales__table th,
.jvrm-caudales .jvrm-caudales__table-wrap .jvrm-caudales__table td {
	padding: 9px 16px;
	text-align: center;
	white-space: nowrap;
	font-weight: 400;
	line-height: 24px;
	color: var(--jvrm-text);
	background-color: transparent;
	border: 0;
	border-radius: 0;
}

/* Separadores verticales entre columnas. */
.jvrm-caudales .jvrm-caudales__table-wrap .jvrm-caudales__table th + th,
.jvrm-caudales .jvrm-caudales__table-wrap .jvrm-caudales__table td + td,
.jvrm-caudales .jvrm-caudales__table-wrap .jvrm-caudales__table th + td {
	border-left: 1px solid var(--jvrm-line);
}

.jvrm-caudales .jvrm-caudales__table-wrap .jvrm-caudales__table thead th {
	border-bottom: 1px solid var(--jvrm-line);
}

.jvrm-caudales .jvrm-caudales__table-wrap .jvrm-caudales__table .jvrm-caudales__rowhead {
	font-weight: 600;
	background-color: var(--jvrm-rowhead-bg);
}

.jvrm-caudales__empty {
	margin: 0;
	padding: 18px;
	font-size: 15px;
	color: var(--jvrm-text-muted);
	background-color: var(--jvrm-cell);
	border: 1px solid var(--jvrm-line);
	border-radius: var(--jvrm-radius-sm);
}

.jvrm-caudales__foot {
	margin-top: 28px;
	text-align: center;
	color: var(--jvrm-text-muted);
}

.jvrm-caudales__foot a {
	color: var(--jvrm-teal);
	text-decoration: none;
}

.jvrm-caudales__foot a:hover {
	text-decoration: underline;
}

/* Solo lectores de pantalla. */
.jvrm-caudales__sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Modo embed: card a lo ancho de la grilla del dashboard. */
.panel-info__content > .jvrm-caudales--embed {
	grid-column: 1 / -1;
	min-width: 0;
}

@media (max-width: 768px) {
	.jvrm-caudales__inner {
		padding: 30px 22px 26px;
	}

	.jvrm-caudales__title {
		font-size: 24px;
		line-height: 29px;
	}

	.jvrm-caudales__block-head {
		align-items: flex-start;
	}

	.jvrm-caudales__pdf {
		order: 2; /* El botón queda debajo del encabezado del bloque en móvil. */
	}
}
