/* --- MI BUS CSS --- */
:root {
	interpolate-size: allow-keywords;
	--bg-main: hsl(0 0% 9%);
	--bg-card: hsl(200, 4%, 12%);
	--bg-muted: #27272a;
	--text-main: #fafafa;
	--text-muted-foreground: #a1a1aa;
	--text-muted: hsl(43 10% 60%);
	--primary: #ffc72c;
	--primary-glow: rgba(255, 199, 44, 0.4);
	--border-color: #3f3f46;
	--radius: 12px;
}

/* Animación nativa para <details> */
::details-content {
	transition: height 0.3s ease, content-visibility 0.3s allow-discrete;
	height: 0;
	overflow: clip;
}

[open]::details-content {
	height: auto;
}

/* --- FUENTES --- */
@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 400;
	src: url('./fonts/roboto-regular.woff2') format('woff2');
	font-display: swap;
}

@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 500;
	src: url('./fonts/roboto-medium.woff2') format('woff2');
	font-display: swap;
}

@font-face {
	font-family: 'Roboto';
	font-style: normal;
	font-weight: 700;
	src: url('./fonts/roboto-bold.woff2') format('woff2');
	font-display: swap;
}

@font-face {
	font-family: 'Roboto Mono';
	font-style: normal;
	font-weight: 400;
	src: url('./fonts/roboto-mono.woff2') format('woff2');
	font-display: swap;
}

@font-face {
	font-family: 'Material Symbols Rounded';
	font-style: normal;
	font-weight: 400;
	src: url('./fonts/icons.woff2') format('woff2');
	font-display: block;
}

.material-symbols-rounded {
	color: inherit;
	font-family: 'Material Symbols Rounded';
	font-weight: normal;
	font-style: normal;
	font-size: 24px;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	display: inline-block;
	white-space: nowrap;
	word-wrap: normal;
	direction: ltr;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* --- RESET --- */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

body {
	background-color: var(--bg-main);
	color: var(--text-main);
	font-family: 'Roboto', sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
	width: 100%;
	max-width: 940px;
	margin: 0 auto;
}

/* --- HEADER --- */
.top-app-bar {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: rgba(9, 9, 11, 0.5);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border-color);
}

.header-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 20px;
}

.logo-section {
	display: flex;
	align-items: center;
	gap: 10px;
}

.icon-logo {
	font-size: 32px;
}

.icon-logo.gradient-text {
	background: linear-gradient(to top right, #ff960e, #fff093);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
	display: inline-block;
	filter: drop-shadow(0 0 10px rgba(255, 199, 44, 0.3));
}

h1 {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -0.5px;
}

.version-tag {
	font-size: 10px;
	color: var(--text-muted);
	background: var(--bg-muted);
	padding: 2px 6px;
	border-radius: 4px;
	margin-left: 6px;
	font-family: 'Roboto Mono', monospace;
	font-weight: 400;
	border: 1px solid var(--border-color);
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.time-badge {
	background-color: rgba(255, 255, 255, 0.07);
	color: #ffffff;
	padding: 6px 12px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 15px;
	font-family: 'Roboto Mono', monospace;
	letter-spacing: 1px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
	box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.icon-btn {
	background: transparent;
	border: none;
	color: var(--text-main);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background-color 0.2s;
}

.icon-btn:hover {
	background-color: var(--bg-muted);
}

/* --- LAYOUT --- */
main {
	padding: 20px 16px;
	max-width: 1200px;
	margin: 0 auto;
}

/* --- TABS --- */
.tabs-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 6px;
	margin-bottom: 24px;
	background-color: var(--bg-muted);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 6px;
	border-radius: 14px;
	width: 100%;
	max-width: 400px;
	margin-left: auto;
	margin-right: auto;
}

.md-tab {
	background: transparent;
	border: 1px solid transparent;
	color: var(--text-muted);
	font-family: 'Roboto', sans-serif;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border-radius: 10px;
	transition: all 0.2s ease;
}

.md-tab .material-symbols-rounded {
	font-size: 20px;
	transition: color 0.2s;
}

.md-tab.active {
	background-color: var(--bg-card);
	border-color: hsl(43 92% 58% / 0.5);
	color: var(--text-main);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.md-tab.active .material-symbols-rounded {
	color: var(--primary);
}

.md-tab:hover:not(.active) {
	color: var(--text-main);
	background-color: rgba(255, 255, 255, 0.03);
}

.tab-panel {
	display: none;
}

.tab-panel.active {
	display: block;
}

.fade-in {
	animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* --- GRID LAYOUT --- */
.bus-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	align-items: flex-start;
}

@media (min-width: 768px) {
	.bus-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* --- SECTION TITLE --- */
.section-title {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	grid-column: 1 / -1;
	align-items: center;
	margin: 24px 0 12px 0;
	color: var(--text-muted);
	font-family: 'Roboto', sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.section-title::before,
.section-title::after {
	content: "";
	display: block;
	height: 1px;
	background: var(--border-color);
	opacity: 0.5;
}

.section-title::before {
	margin-right: 16px;
}

.section-title::after {
	margin-left: 16px;
}

.section-title:first-of-type {
	margin-top: 8px;
}


/* --- CARDS (BLOQUES SÓLIDOS) --- */
summary {
	list-style: none;
	outline: none;
}

summary::-webkit-details-marker {
	display: none;
}

.card {
	display: block;
	--accent-color: var(--primary);
}

.card>details {
	background: linear-gradient(145deg, hsl(200, 4%, 14%) 0%, hsl(200, 4%, 10%) 100%);
	border-radius: 16px;
	border: 1px solid transparent;
	box-shadow: 0 10px 40px hsl(0, 0%, 0%, 0.4);
	transition: border-color 0.3s ease;
	overflow: hidden;
}

.card>details[open] {
	border-color: rgba(255, 255, 255, 0.2);
}

.card-header {
	padding: 12px 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
}

.card-title {
	display: flex;
	align-items: center;
	gap: 16px;
}

.text-col {
	display: flex;
	flex-direction: column;
}

.route-name {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
	color: var(--text-main);
	letter-spacing: -0.3px;
}

.route-desc {
	font-size: 13px;
	color: var(--text-muted);
	margin-top: 2px;
}

.line-number-badge {
	width: 44px;
	height: 44px;
	background-color: rgba(255, 255, 255, 0.03);
	border: 2px solid var(--accent-color);
	color: var(--accent-color);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 800;
	box-shadow: 0 0 10px -5px var(--accent-color);
}

.expand-icon {
	color: var(--text-muted);
	transition: transform 0.3s ease;
}

.card>details[open] .expand-icon {
	transform: rotate(180deg);
	color: var(--text-main);
}

/* CONTENIDO: Corrección del bug de Chromium Móvil (Sin fondo explícito) */
.card-content {
	/* Eliminado el background para evitar glitch gráfico */
	padding-top: 1px;
	padding-bottom: 1px;
}

/* --- ELEMENTOS INSET (TALLADOS) --- */
.bus-info-card,
.status-summary,
.schedules-container {
	background-color: rgba(0, 0, 0, 0.25);
	border: 1px solid rgba(255, 255, 255, 0.03);
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
	border-radius: 12px;
	padding: 16px;
	margin: 0px 16px 4px 16px;
}

.schedules-container {
	margin: 4px 16px 16px 16px;
	max-height: 500px;
	overflow-y: auto;
}

/* --- BOTÓN TOGGLE (Limpieza) --- */
details.inner-accordion>summary.schedules-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px;
	cursor: pointer;
	color: var(--text-muted);
	transition: color 0.2s;
}

details.inner-accordion[open] .toggle-icon {
	transform: rotate(180deg);
}

.toggle-text {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* --- CONTENIDO INTERNO --- */
.info-row {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.info-icon {
	color: var(--text-muted);
	font-size: 20px;
	margin-top: 2px;
}

.info-label {
	font-size: 11px;
	text-transform: uppercase;
	color: var(--text-muted);
	font-weight: 600;
	letter-spacing: 0.5px;
}

.info-value {
	font-size: 15px;
	color: var(--text-main);
	font-weight: 500;
}

.bus-info-card {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.arrival-status-grid {
	margin-top: 8px;
	background-color: rgba(0, 0, 0, 0.3);
	border-radius: 12px;
	padding: 16px;
	border-top: 1px solid hsl(43 92% 58% / 0.5);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	position: relative;
}

.arrival-status-grid::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 20%;
	bottom: 20%;
	width: 1px;
	background-color: var(--border-color);
}

.status-item {
	display: flex;
	align-items: center;
	gap: 12px;
	justify-content: center;
}

.icon-box .material-symbols-rounded {
	font-size: 28px;
	color: var(--accent-color);
	filter: drop-shadow(0 0 5px var(--accent-color));
}

.status-text {
	display: flex;
	flex-direction: column;
}

.status-label {
	font-size: 10px;
	text-transform: uppercase;
	color: var(--text-muted);
	font-weight: 600;
}

.status-value {
	font-size: 20px;
	font-weight: 700;
	color: var(--text-main);
	line-height: 1.1;
	font-variant-numeric: tabular-nums;
}

/* Status Summary Widget */
.status-summary {
	padding: 20px 12px;
}

.summary-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	position: relative;
	justify-items: center;
}

.summary-grid::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 10px;
	bottom: 10px;
	width: 1px;
	background-color: var(--border-color);
}

.summary-col {
	display: flex;
	flex-direction: column;
	gap: 16px;
	align-items: flex-start;
	width: 100%;
	max-width: 140px;
}

.summary-header {
	background-color: var(--bg-muted);
	color: #e0e0e0;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 6px 8px;
	border-radius: 6px;
	letter-spacing: 0.5px;
	text-align: center;
	margin-bottom: 8px;
	align-self: center;
	width: 100%;
}

.time-block {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 0 4px;
}

.icon-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
}

.state-on .material-symbols-rounded {
	font-size: 28px;
	color: var(--accent-color);
	filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.5));
}

.state-off .material-symbols-rounded {
	font-size: 24px;
	color: var(--border-color);
}

.state-off .time-value {
	color: var(--text-muted);
}

.time-data {
	display: flex;
	flex-direction: column;
}

.time-label {
	font-size: 10px;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--text-muted);
	margin-bottom: 2px;
}

.time-value {
	font-family: 'Roboto Mono', monospace;
	font-weight: 700;
	font-size: 22px;
	color: var(--text-main);
	line-height: 1;
}

.status-offline {
	text-align: center;
	color: var(--text-muted);
	font-size: 13px;
	padding: 10px;
}


/* --- TABLAS UNIFICADAS --- */
.complex-schedule {
	padding: 12px 8px;
	display: flex;
	flex-direction: row;
	gap: 4px;
	align-items: flex-start;
}

.schedule-group {
	flex: 1;
	min-width: 0;
}

.modern-schedule-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
}

.modern-header {
	background-color: #1c3b4a;
	color: #e2e8f0;
	text-align: center;
	padding: 10px 2px;
	border-radius: 6px;
	font-weight: 700;
	font-size: 11px;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.time-pill,
.times-grid span {
	background-color: var(--bg-muted);
	color: var(--text-main);
	padding: 8px 0;
	border-radius: 6px;
	text-align: center;
	font-family: 'Roboto Mono', monospace;
	font-size: 14px;
	font-weight: 500;
	border: 1px solid var(--border-color);
	display: block;
}

.time-pill.highlight-pill,
.times-grid span.highlight {
	border-color: var(--accent-color);
	color: var(--accent-color);
	background-color: rgba(255, 255, 255, 0.05);
	font-weight: 700;
}

.time-pill.empty {
	background: transparent;
	border: none;
}

.times-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
	gap: 8px;
	padding: 0;
	text-align: center;
}

@media (max-width: 320px) {
	.complex-schedule {
		flex-direction: column;
	}

	.modern-header {
		font-size: 12px;
	}
}


/* --- MODAL (CALCULADORA) --- */
dialog.md-dialog {
	background-color: var(--bg-card);
	color: var(--text-main);
	border: 1px solid var(--border-color);
	border-radius: 20px;
	width: 90%;
	max-width: 400px;
	margin: auto;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

dialog::backdrop {
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(4px);
}

.dialog-header {
	padding: 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid var(--border-color);
}

.dialog-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 20px;
	font-weight: 700;
}

.dialog-content {
	padding: 24px;
	max-height: 60vh;
	overflow-y: auto;
}

.calc-grid {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.input-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.input-group label {
	font-size: 12px;
	color: var(--text-muted);
	font-weight: 600;
	text-transform: uppercase;
}

.time-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* INPUTS ESTILO VIA DORADA */
.md-input,
input[type="number"],
input[type="text"],
input[type="date"],
.md-select {
	background-color: var(--bg-muted);
	border: 1px solid var(--border-color);
	color: var(--text-main);
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 16px;
	width: 100%;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.md-input:focus,
input[type="number"]:focus,
input[type="text"]:focus,
input[type="date"]:focus,
.md-select:focus {
	border-color: #ffc72c;
	box-shadow: 0 0 0 1px #ffc72c;
}

/* Input Number Material Style */
input[type="number"] {
	text-align: center;
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

input[type="number"] {
	-moz-appearance: textfield;
}

/* Botones Acción */
.dialog-actions {
	padding: 16px 24px 24px 24px;
	display: flex;
	gap: 12px;
}

.md-button {
	border: none;
	padding: 12px 16px;
	border-radius: 12px;
	font-weight: 700;
	font-size: 15px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	flex: 1;
	margin: 0;
	width: auto;
}

.md-button.primary {
	background-color: #ffc72c;
	color: #1a1a1a;
	box-shadow: 0 4px 10px rgba(255, 199, 44, 0.3);
}

.md-button.primary:active {
	transform: scale(0.98);
}

.md-button.secondary {
	background-color: transparent;
	border: 2px solid var(--border-color);
	color: var(--text-muted);
}

.md-button.secondary:hover {
	border-color: var(--text-main);
	color: var(--text-main);
	background-color: rgba(255, 255, 255, 0.05);
}

.md-button.secondary:active {
	transform: scale(0.98);
}

.md-button:disabled {
	opacity: 0.6;
	cursor: default;
	transform: none;
}

.result-box {
	margin-top: 20px;
	background: var(--bg-main);
	border-radius: 8px;
	padding: 16px;
	min-height: 60px;
	border: 1px solid var(--border-color);
	font-family: 'Roboto Mono', monospace;
	white-space: pre-wrap;
	color: var(--text-muted);
	font-size: 14px;
	font-weight: 400;
	display: block;
	width: 100%;
	user-select: text;
	-webkit-user-select: text;
	cursor: text;
}

.spacer {
	height: 80px;
}

/* --- RESET SEMÁNTICO --- */
fieldset.input-group {
	border: none;
	padding: 0;
	margin: 0;
	min-width: 0;
}

legend {
	font-size: 12px;
	color: var(--text-muted);
	font-weight: 600;
	text-transform: uppercase;
	padding: 0;
	margin-bottom: 8px;
	display: block;
	width: 100%;
}

.route-name {
	margin: 0;
	font-size: 18px;
}

output,
time {
	display: inline-block;
}

output.result-box {
	display: block;
}


/* El contenedor visual real */
.menu-popup {
	background-color: var(--bg-card);
	color: var(--text-main);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 8px;
	min-width: 200px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}


/* --- MENÚ OVERFLOW (POPOVER ROBUSTO) --- */
#btn-menu {
	anchor-name: --btn-menu;
}

/* Estilos base del Popover */
[popover] {
	position-anchor: --btn-menu;
	position-try: --inv-menu;
	position-area: left bottom;
	right: anchor(right);
	top: anchor(bottom);
	margin-top: 8px;
	z-index: 1000;

	/* Animaciones de Entrada/Salida */
	opacity: 0;
	transform: scale(0.9);
	transform-origin: top right;
	transition:
		opacity 0.15s ease-out,
		transform 0.15s ease-out,
		display 0.15s allow-discrete,
		overlay 0.15s allow-discrete;
}

/* Estado Abierto */
[popover]:popover-open {
	opacity: 1;
	transform: scale(1);
}

/* Regla @starting-style para animar la entrada */
@starting-style {
	[popover]:popover-open {
		opacity: 0;
		transform: scale(0.9);
	}
}

@position-try --inv-menu {
	position-area: right bottom;
	top: anchor(bottom);
	left: anchor(left);
}


/* ... (Los estilos de .menu-item, .menu-content, etc. se mantienen igual) ... */
.menu-content {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.menu-section-label {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--text-muted);
	padding: 8px 16px 4px 16px;
	letter-spacing: 0.5px;
}

.menu-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	/* Un poco más compacto */
	background: transparent;
	border: none;
	color: var(--text-main);
	font-family: 'Roboto', sans-serif;
	font-size: 15px;
	font-weight: 500;
	text-align: left;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s;
	/* Para ubicar el check a la derecha */
	justify-content: flex-start;
}

.menu-item:hover {
	background-color: rgba(255, 255, 255, 0.05);
}

.menu-item .menu-text {
	flex: 1;
	/* Empuja el icono check al final */
}

.menu-item .material-symbols-rounded {
	font-size: 20px;
	color: var(--text-muted);
}

.menu-info-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 8px 16px;
	font-size: 12px;
	color: var(--text-muted);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.menu-item .check-icon {
	font-size: 18px;
	color: var(--primary);
	opacity: 0;
	transform: scale(0);
	transition: all 0.2s ease;
}

/* Estado Seleccionado */
.menu-item.is-selected {
	background-color: #fff;
	color: var(--bg-main);
}

.menu-item.is-selected .material-symbols-rounded {
	color: var(--bg-main);
}

.menu-item.is-selected .check-icon {
	opacity: 1;
	transform: scale(1);
	/* Aparece el check */
}

.version-badge {
	background-color: var(--bg-muted);
	padding: 2px 6px;
	border-radius: 4px;
	color: var(--text-main);
	font-family: 'Roboto Mono', monospace;
}

.menu-divider {
	border: none;
	border-top: 1px solid var(--border-color);
	margin-left: 4px;
	margin-right: 4px;
	opacity: 0.5;
}

/* --- BOTÓN INSTALAR PWA --- */
#installButton {
    margin: 0.5rem auto 0.7rem auto;
    padding: 8px;
    font-size: 0.80rem;
    text-transform: none; 
    color: var(--bg-main);
    width: 90%; /* Asegura que no toque los bordes del menú */
}

/* --- PROMPT iOS --- */
.ios-prompt {
    padding: 12px;
    background-color: var(--bg-muted);
    border: 1px solid transparent;
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-main);
    text-align: center;
    animation: fadeIn 0.5s ease;
    margin: 8px;
}
.ios-prompt .smaller { font-size:18px; vertical-align: bottom; }
.ios-prompt p { text-align: left; margin-bottom: 12px; line-height: 1.4; }
.ios-prompt strong { color: var(--primary); }
.ios-prompt button {
    margin: auto;
    padding: 6px 12px;
    background: none;
    border: 2px solid var(--text-main);
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.75rem; 
    cursor: pointer;
    text-transform: uppercase;
}

/* =========================================
   MODO CLARO (ESTILO TAXI / INDUSTRIAL)
========================================= */
.light-mode {
	--bg-main: #f0f0f0;
	--bg-card: #ffcc4f;
	--bg-muted: #e5e7eb;
	--text-main: #1f2937;
	--text-muted-foreground: #4b5563;
	--text-muted: #6b7280;
	--primary: #f2f2f2;
	--primary-glow: rgba(255, 199, 44, 0.5);
	--border-color: #d1d5db;
}

.light-mode .card>details {
	background: var(--primary);
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
	color: var(--text-main);
}

.light-mode .card>details[open] {
	border-color: rgba(0, 0, 0, 0.2);
}

.light-mode .card-header,
.light-mode .card-content {
	background-color: #ffffff;
}

.light-mode .card-content {
	border-top: 1px solid transparent;
}

.light-mode .route-name {
	color: #000;
}

.light-mode .route-desc {
	color: #333;
	font-weight: 500;
}

.light-mode .expand-icon {
	color: #000;
}

/* PANEL */
.light-mode .bus-info-card,
.light-mode .status-summary {
	background-color: transparent;
	border-color: transparent;
	box-shadow: none;
}

.light-mode .info-value,
.light-mode .status-value,
.light-mode .time-value {
	color: var(--text-main);
}

.light-mode .tabs-container {
	background-color: #e5e7eb;
	border: 1px solid #d1d5db;
}

.light-mode .md-tab {
	color: var(--text-muted);
}

.light-mode .md-tab.active {
	background-color: #374151;
	color: #ffffff;
	border-color: transparent;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.light-mode .md-tab.active .material-symbols-rounded {
	color: var(--primary);
}

.light-mode .md-tab:hover:not(.active) {
	background-color: rgba(0, 0, 0, 0.05);
	color: var(--text-main);
}

.light-mode .md-input,
.light-mode input[type="number"],
.light-mode .md-select {
	background-color: #e5e7eb;
	border-color: #cbd5e1;
	color: #0f172a;
}

.light-mode .time-pill,
.light-mode .times-grid span {
	background-color: #ffffff;
	color: #334155;
	font-weight: 600;
}

.light-mode .summary-header,
.light-mode .modern-header {
	background-color: #475569;
	color: #ffffff;
}

/* Top Bar */
.light-mode .top-app-bar {
	background-color: #1a1a1a;
	color: #ffffff;
	border-bottom: none;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.light-mode .icon-logo.gradient-text {
	filter: drop-shadow(0 0 5px rgba(255, 200, 0, 0.5));
}

/* CORRECCIÓN BOTONES HEADER */
.light-mode .icon-btn {
	color: #fff;
}

.light-mode .icon-btn:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.light-mode #btn-close-calc {
	color: #000;
}

.light-mode #btn-close-calc:hover {
	background-color: #e5e7eb;
}

.light-mode .state-on .material-symbols-rounded,
.light-mode .icon-box .material-symbols-rounded {
	filter: none;
}

.light-mode .status-summary,
.light-mode .arrival-status-grid,
.light-mode .schedules-container {
	background-color: #e5e7eb;
	border: 1px solid #d1d5db;
	box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.07);
}

.light-mode .summary-grid::after,
.light-mode .arrival-status-grid::after {
	background-color: var(--text-main);
}

/* Modal */
.light-mode dialog.md-dialog {
	background-color: #ffffff;
	color: #000;
}

.light-mode .result-box {
	background-color: #f1f5f9;
	color: #000;
	border-color: #cbd5e1;
}

/* Estilos para el Menú en Modo Claro */
.light-mode .menu-popup {
	background-color: #ffffff;
	border-color: rgba(55, 65, 81, 0.5);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.light-mode .menu-item:hover {
	background-color: #f3f4f6;
}

.light-mode .version-badge {
	background-color: #e5e7eb;
	color: #000;
}

.light-mode .menu-item:not(.is-selected):hover {
	background-color: #cbd0d8;
}

.light-mode .menu-item.is-selected {
	background-color: rgba(55, 65, 81, 1);
	color: var(--bg-muted);
}

.light-mode .menu-item.is-selected .material-symbols-rounded,
.light-mode .menu-item.is-selected .check-icon {
	color: var(--bg-muted);
}

.light-mode .menu-divider { border-color: #374151; } 

/* Ajustes Modo Claro */
.light-mode #installButton {
    color: #ffffff; /* Texto blanco sobre botón oscuro en modo claro */
    background-color: #374151;
}
.light-mode #iosInstallPrompt {
    background-color: #e5e7eb;
    border-left: 4px solid #374151;
}
.light-mode #iosInstallPrompt strong {
    color: #1f2937;
    font-weight: 800;
}
.light-mode #iosInstallPrompt button {
    border-color: #374151;
    color: #374151;
}
