/**
 * VIA · Estilos del frontend (plugin)
 * Mobile-first. Consume variables del tema con valores de respaldo,
 * para que los componentes se vean correctos aunque el tema no esté activo.
 *
 * @package VIA
 */

:root {
	--via-ink: #14161d;
	--via-ink-soft: #20232e;
	--via-paper: #ffffff;
	--via-mist: #f4f6fa;
	--via-line: #e6e9f0;
	--via-blue: #1e5bd6;
	--via-blue-deep: #1746a8;
	--via-amber: #ffb020;
	--via-emerald: #12b76a;
	--via-red: #e5484d;
	--via-muted: #5b6275;
	--via-radius: 16px;
	--via-radius-sm: 10px;
	--via-shadow: 0 1px 2px rgba(20, 22, 29, .06), 0 8px 24px rgba(20, 22, 29, .06);
	--via-shadow-lg: 0 12px 40px rgba(20, 22, 29, .14);
	--via-font: var(--via-font-body, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	--via-display: var(--via-font-display, "Space Grotesk", var(--via-font-body, "Inter", sans-serif));
}

/* ---------- Base de los bloques VIA ---------- */
.via-hero,
.via-tiles,
.via-chat,
.via-taxi,
.via-search,
.via-panel,
.via-support,
.via-legal {
	font-family: var(--via-font);
	color: var(--via-ink, #14161d);
	-webkit-font-smoothing: antialiased;
	box-sizing: border-box;
}

.via-hero *,
.via-tiles *,
.via-chat *,
.via-taxi *,
.via-search *,
.via-panel *,
.via-support *,
.via-legal *,
.via-cards *,
.via-modal * {
	box-sizing: border-box;
}

.via-h2 {
	font-family: var(--via-display);
	font-size: 1.4rem;
	font-weight: 600;
	letter-spacing: -.01em;
	margin: 0 0 1rem;
	color: var(--via-ink, #14161d);
}

.via-muted {
	color: var(--via-muted, #5b6275);
	font-size: .9rem;
}

/* ---------- Hero ---------- */
.via-hero {
	background:
		radial-gradient(1200px 400px at 85% -10%, rgba(30, 91, 214, .35), transparent 60%),
		radial-gradient(800px 300px at 0% 120%, rgba(255, 176, 32, .14), transparent 55%),
		var(--via-ink, #14161d);
	color: #fff;
	border-radius: var(--via-radius);
	padding: 2.8rem 1.4rem 3rem;
	position: relative;
	overflow: hidden;
	isolation: isolate;
}

.via-hero::before {
	/* Resplandor sutil que respira. */
	content: "";
	position: absolute;
	inset: -40% 40% auto -20%;
	height: 60%;
	background: radial-gradient(circle, rgba(30, 91, 214, .25), transparent 70%);
	filter: blur(30px);
	z-index: -1;
	animation: via-breathe 9s ease-in-out infinite;
}

.via-hero::after {
	/* Línea de carretera en movimiento: la firma de VIA. */
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 6px;
	background: repeating-linear-gradient(90deg, var(--via-amber, #ffb020) 0 28px, transparent 28px 52px);
	background-size: 52px 6px;
	animation: via-road 1.1s linear infinite;
}

@keyframes via-road { from { background-position: 0 0; } to { background-position: 52px 0; } }
@keyframes via-breathe { 0%, 100% { opacity: .5; transform: translateX(0); } 50% { opacity: .9; transform: translateX(30px); } }

.via-hero__inner {
	max-width: 660px;
	position: relative;
	animation: via-rise .6s ease both;
}

.via-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-family: var(--via-display);
	text-transform: uppercase;
	letter-spacing: .2em;
	font-size: .72rem;
	color: var(--via-amber, #ffb020);
	margin: 0 0 .7rem;
}

.via-hero__eyebrow::before {
	content: "";
	width: 26px;
	height: 2px;
	background: repeating-linear-gradient(90deg, var(--via-amber, #ffb020) 0 6px, transparent 6px 10px);
}

.via-hero__title {
	font-family: var(--via-display);
	font-size: clamp(2.2rem, 8vw, 3.4rem);
	line-height: 1.02;
	letter-spacing: -.025em;
	margin: 0 0 .7rem;
	color: #fff;
}

.via-hero__sub {
	color: rgba(255, 255, 255, .78);
	font-size: 1.05rem;
	margin: 0 0 1.6rem;
	max-width: 48ch;
}

.via-hero__chat {
	display: flex;
	gap: .4rem;
	background: rgba(255, 255, 255, .1);
	border: 1px solid rgba(255, 255, 255, .18);
	padding: .4rem;
	border-radius: 999px;
	max-width: 560px;
	backdrop-filter: blur(6px);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.via-hero__chat:focus-within {
	border-color: var(--via-amber, #ffb020);
	box-shadow: 0 0 0 4px rgba(255, 176, 32, .18);
}

.via-hero__chat input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	color: #fff;
	padding: .7rem 1rem;
	font-size: 1rem;
	font-family: var(--via-font);
}

.via-hero__chat input::placeholder { color: rgba(255, 255, 255, .6); }
.via-hero__chat input:focus { outline: none; }

@keyframes via-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Mosaicos ---------- */
.via-tiles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .8rem;
	margin-top: 1rem;
}

.via-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .3rem;
	padding: 1.2rem 1.1rem;
	background: var(--via-paper, #fff);
	border: 1px solid var(--via-line, #e6e9f0);
	border-radius: var(--via-radius);
	text-decoration: none;
	color: var(--via-ink, #14161d);
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	animation: via-rise .5s ease both;
}

.via-tiles .via-tile:nth-child(2) { animation-delay: .06s; }
.via-tiles .via-tile:nth-child(3) { animation-delay: .12s; }
.via-tiles .via-tile:nth-child(4) { animation-delay: .18s; }

.via-tile::before {
	/* Acento de carretera que aparece al pasar el cursor. */
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--via-amber, #ffb020);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform .2s ease;
}

.via-tile:hover {
	transform: translateY(-3px);
	box-shadow: var(--via-shadow-lg);
	border-color: transparent;
}

.via-tile:hover::before { transform: scaleY(1); }

.via-tile strong { font-family: var(--via-display); font-size: 1.05rem; }

.via-tile__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 13px;
	background: var(--via-mist, #f4f6fa);
	font-size: 1.5rem;
	line-height: 1;
	margin-bottom: .35rem;
	transition: transform .18s ease, background .18s ease;
}

.via-tile:hover .via-tile__icon { transform: scale(1.08) rotate(-3deg); background: rgba(30, 91, 214, .1); }

/* ---------- Botones ---------- */
.via-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .45rem;
	font-family: var(--via-display);
	font-size: .92rem;
	font-weight: 600;
	line-height: 1;
	padding: .8rem 1.15rem;
	border-radius: 999px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: transform .12s ease, box-shadow .12s ease, background .12s ease, opacity .12s ease;
	white-space: nowrap;
}

.via-btn:active { transform: translateY(1px); }
.via-btn[disabled] { opacity: .5; cursor: not-allowed; }

.via-btn--primary { background: var(--via-blue, #1e5bd6); color: #fff; }
.via-btn--primary:hover { background: var(--via-blue-deep, #1746a8); color: #fff; }

.via-btn--amber { background: var(--via-amber, #ffb020); color: var(--via-ink, #14161d); }
.via-btn--amber:hover { box-shadow: 0 6px 18px rgba(255, 176, 32, .4); }

.via-btn--ghost {
	background: transparent;
	color: var(--via-ink, #14161d);
	border-color: var(--via-line, #e6e9f0);
}
.via-btn--ghost:hover { border-color: var(--via-ink, #14161d); }

.via-btn--whatsapp { background: #25d366; color: #06371b; }
.via-btn--whatsapp:hover { background: #1fc05c; color: #06371b; }

.via-btn--small { padding: .5rem .8rem; font-size: .82rem; }
.via-btn--block { width: 100%; }

/* ---------- Tarjetas y rejillas ---------- */
.via-card {
	background: var(--via-paper, #fff);
	border: 1px solid var(--via-line, #e6e9f0);
	border-radius: var(--via-radius);
	padding: 1.2rem;
	box-shadow: var(--via-shadow);
	margin: 0 0 1rem;
}

.via-card h3 {
	font-family: var(--via-display);
	font-size: 1.1rem;
	margin: 0 0 .8rem;
}

.via-cards { display: grid; gap: .9rem; }
.via-cards--grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

.via-results { margin-top: 1.2rem; }

/* ---------- Tarjeta de resultado (salida interprovincial) ---------- */
.via-result__head {
	display: flex;
	align-items: center;
	gap: .6rem;
	margin-bottom: .8rem;
	flex-wrap: wrap;
}

.via-result__provider { font-family: var(--via-display); font-size: 1.02rem; }

.via-badge {
	display: inline-block;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: .25rem .55rem;
	border-radius: 999px;
}

.via-badge--blue { background: rgba(30, 91, 214, .12); color: var(--via-blue-deep, #1746a8); }
.via-badge--amber { background: rgba(255, 176, 32, .18); color: #8a5a00; }

/* Motivo de ruta (firma) */
.via-route {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin: .4rem 0 .9rem;
	font-family: var(--via-display);
	font-weight: 600;
}

.via-route__dot {
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--via-blue, #1e5bd6);
	flex: none;
	box-shadow: 0 0 0 3px rgba(30, 91, 214, .15);
}

.via-route__dot--end { background: var(--via-amber, #ffb020); box-shadow: 0 0 0 3px rgba(255, 176, 32, .22); }

.via-route__line {
	flex: 1;
	height: 0;
	border-top: 2px dashed var(--via-line, #e6e9f0);
	min-width: 18px;
}

.via-route__from, .via-route__to { font-size: .98rem; }

.via-meta {
	list-style: none;
	margin: 0 0 .9rem;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .5rem .9rem;
}

.via-meta li {
	display: flex;
	flex-direction: column;
	font-size: .92rem;
	font-weight: 600;
	color: var(--via-ink, #14161d);
}

.via-meta li span {
	font-size: .72rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--via-muted, #5b6275);
	margin-bottom: .1rem;
}

.via-meta--inline {
	display: flex;
	flex-wrap: wrap;
	gap: .4rem .9rem;
}

.via-meta--inline li {
	flex-direction: row;
	font-size: .85rem;
	color: var(--via-muted, #5b6275);
	font-weight: 500;
}

.via-result__point {
	font-size: .85rem;
	color: var(--via-muted, #5b6275);
	margin: 0 0 .9rem;
}

/* ---------- Tarjeta de tour ---------- */
.via-tour { padding: 0; overflow: hidden; }
.via-tour__img { width: 100%; aspect-ratio: 16 / 9; background-size: cover; background-position: center; background-color: var(--via-mist, #f4f6fa); }
.via-tour__body { padding: 1.1rem; }
.via-tour__body h3 { margin: 0 0 .7rem; }
.via-tour__body h3 a { color: var(--via-ink, #14161d); text-decoration: none; }
.via-tour__body h3 a:hover { color: var(--via-blue, #1e5bd6); }

/* ---------- Tarjeta de empresa ---------- */
.via-empresa-card { display: flex; gap: 1rem; align-items: center; }
.via-empresa-card__logo { width: 60px; height: 60px; object-fit: cover; border-radius: 12px; flex: none; }
.via-empresa-card h3 { margin: 0 0 .2rem; font-size: 1.05rem; }
.via-empresa-card h3 a { color: var(--via-ink, #14161d); text-decoration: none; }

/* ---------- Opción de conductor (taxi) ---------- */
.via-driver__head { display: flex; align-items: center; gap: .7rem; margin-bottom: .7rem; }

.via-driver__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
}

.via-driver__avatar--ph {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--via-blue, #1e5bd6);
	color: #fff;
	font-family: var(--via-display);
	font-weight: 700;
	text-transform: uppercase;
}

.via-driver__head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.via-driver__head strong { font-family: var(--via-display); }
.via-driver__price { font-family: var(--via-display); font-weight: 700; color: var(--via-emerald, #12b76a); font-size: 1.05rem; }
.via-driver .via-btn { width: 100%; }

/* ---------- Formularios ---------- */
.via-form { display: flex; flex-direction: column; gap: .85rem; }

.via-form label {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	font-size: .82rem;
	font-weight: 600;
	color: var(--via-ink, #14161d);
}

.via-form input[type="text"],
.via-form input[type="email"],
.via-form input[type="password"],
.via-form input[type="number"],
.via-form input[type="date"],
.via-form input[type="time"],
.via-form input[type="tel"],
.via-form select,
.via-form textarea {
	width: 100%;
	font-family: var(--via-font);
	font-size: .95rem;
	font-weight: 400;
	color: var(--via-ink, #14161d);
	background: var(--via-paper, #fff);
	border: 1px solid var(--via-line, #e6e9f0);
	border-radius: var(--via-radius-sm);
	padding: .7rem .85rem;
	transition: border-color .12s ease, box-shadow .12s ease;
}

.via-form textarea { resize: vertical; }

.via-form input:focus,
.via-form select:focus,
.via-form textarea:focus {
	outline: none;
	border-color: var(--via-blue, #1e5bd6);
	box-shadow: 0 0 0 3px rgba(30, 91, 214, .15);
}

.via-form--inline {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: .85rem;
}

.via-form__row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .2rem; }

/* ---------- Chat IA ---------- */
.via-chat {
	border: 1px solid var(--via-line, #e6e9f0);
	border-radius: var(--via-radius);
	background: var(--via-paper, #fff);
	box-shadow: var(--via-shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	min-height: 60vh;
}

.via-chat__messages {
	flex: 1;
	padding: 1.1rem;
	display: flex;
	flex-direction: column;
	gap: .7rem;
	overflow-y: auto;
	background: var(--via-mist, #f4f6fa);
}

.via-bubble {
	max-width: 86%;
	padding: .7rem .95rem;
	border-radius: 16px;
	font-size: .95rem;
	line-height: 1.45;
	word-wrap: break-word;
}

.via-bubble--bot {
	align-self: flex-start;
	background: var(--via-paper, #fff);
	border: 1px solid var(--via-line, #e6e9f0);
	border-bottom-left-radius: 5px;
}

.via-bubble--user {
	align-self: flex-end;
	background: var(--via-blue, #1e5bd6);
	color: #fff;
	border-bottom-right-radius: 5px;
}

.via-bubble--cards {
	max-width: 100%;
	width: 100%;
	background: transparent;
	border: 0;
	padding: 0;
}

.via-bubble--typing { color: var(--via-muted, #5b6275); font-style: italic; }

.via-chat__form {
	display: flex;
	gap: .5rem;
	padding: .7rem;
	border-top: 1px solid var(--via-line, #e6e9f0);
	background: var(--via-paper, #fff);
}

.via-chat__form input {
	flex: 1;
	min-width: 0;
	border: 1px solid var(--via-line, #e6e9f0);
	border-radius: 999px;
	padding: .7rem 1rem;
	font-size: .95rem;
	font-family: var(--via-font);
}

.via-chat__form input:focus { outline: none; border-color: var(--via-blue, #1e5bd6); }

/* ---------- Mapa ---------- */
.via-map {
	width: 100%;
	height: 260px;
	border-radius: var(--via-radius);
	overflow: hidden;
	margin: 1rem 0;
	border: 1px solid var(--via-line, #e6e9f0);
	background: var(--via-mist, #f4f6fa);
}

/* ---------- Estados / avisos ---------- */
.via-status {
	font-size: .9rem;
	padding: .7rem .9rem;
	border-radius: var(--via-radius-sm);
	background: var(--via-mist, #f4f6fa);
	color: var(--via-ink, #14161d);
	margin: .8rem 0;
}

.via-status--error { background: rgba(229, 72, 77, .1); color: #a01017; }
.via-status--ok { background: rgba(18, 183, 106, .12); color: #0a7a47; }

.via-alert {
	font-size: .92rem;
	padding: .85rem 1rem;
	border-radius: var(--via-radius-sm);
	margin: 0 0 1rem;
	border: 1px solid transparent;
}

.via-alert--ok { background: rgba(18, 183, 106, .1); color: #0a7a47; border-color: rgba(18, 183, 106, .25); }
.via-alert--warn { background: rgba(255, 176, 32, .12); color: #8a5a00; border-color: rgba(255, 176, 32, .3); }
.via-alert--error { background: rgba(229, 72, 77, .1); color: #a01017; border-color: rgba(229, 72, 77, .25); }

.via-empty {
	text-align: center;
	padding: 2rem 1rem;
	color: var(--via-muted, #5b6275);
	background: var(--via-mist, #f4f6fa);
	border: 1px dashed var(--via-line, #e6e9f0);
	border-radius: var(--via-radius);
}

.via-empty h3 { font-family: var(--via-display); color: var(--via-ink, #14161d); margin: 0 0 .4rem; }
.via-empty p { margin: 0 0 .8rem; }

.via-cta-card { display: inline-flex; }

/* ---------- Modal ---------- */
.via-modal {
	position: fixed;
	inset: 0;
	background: rgba(20, 22, 29, .55);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	z-index: 99999;
	padding: 0;
}

.via-modal[hidden] { display: none; }

.via-modal__panel {
	background: var(--via-paper, #fff);
	border-radius: 20px 20px 0 0;
	padding: 1.4rem 1.2rem 1.6rem;
	width: 100%;
	max-width: 480px;
	max-height: 88vh;
	overflow-y: auto;
	position: relative;
	box-shadow: var(--via-shadow-lg);
	animation: via-slide-up .22s ease;
}

@keyframes via-slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.via-modal__panel h3 { font-family: var(--via-display); margin: 0 0 1rem; font-size: 1.2rem; }

.via-modal__panel label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 600; margin-bottom: 1rem; }
.via-modal__panel input[type="number"] { width: 100%; border: 1px solid var(--via-line, #e6e9f0); border-radius: var(--via-radius-sm); padding: .7rem .85rem; font-size: 1rem; font-family: var(--via-font); }

.via-modal__close {
	position: absolute;
	top: .7rem;
	right: .9rem;
	background: var(--via-mist, #f4f6fa);
	border: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 1.3rem;
	line-height: 1;
	cursor: pointer;
	color: var(--via-ink, #14161d);
}

.via-modal__close:hover { background: var(--via-line, #e6e9f0); }

.via-modal .via-btn { width: 100%; }

/* ---------- Mapa de asientos ---------- */
.via-seats {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: .55rem;
	margin: 0 0 1rem;
}

.via-seat {
	aspect-ratio: 1 / 1;
	border-radius: 10px;
	border: 1px solid var(--via-line, #e6e9f0);
	background: var(--via-paper, #fff);
	font-family: var(--via-display);
	font-weight: 600;
	font-size: .85rem;
	color: var(--via-ink, #14161d);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform .1s ease, background .1s ease, border-color .1s ease;
}

.via-seat:hover:not(.via-seat--taken):not(:disabled) { border-color: var(--via-blue, #1e5bd6); }
.via-seat--free { background: var(--via-paper, #fff); }
.via-seat--sel { background: var(--via-blue, #1e5bd6); border-color: var(--via-blue, #1e5bd6); color: #fff; }
.via-seat--taken { background: var(--via-line, #e6e9f0); color: var(--via-muted, #5b6275); cursor: not-allowed; opacity: .7; }

.via-seat-legend {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem 1rem;
	align-items: center;
	font-size: .8rem;
	color: var(--via-muted, #5b6275);
	margin: 0 0 1rem;
}

.via-seat-legend .via-seat { width: 18px; height: 18px; aspect-ratio: auto; cursor: default; display: inline-block; vertical-align: middle; margin-right: .25rem; }

/* ---------- Panel ---------- */
.via-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.2rem;
	flex-wrap: wrap;
}

/* ---------- Interruptor disponibilidad ---------- */
.via-switch {
	display: flex;
	align-items: center;
	gap: .7rem;
	font-size: .95rem;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
}

.via-switch input { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 999px; background: var(--via-line, #e6e9f0); position: relative; cursor: pointer; transition: background .15s ease; flex: none; }
.via-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s ease; }
.via-switch input:checked { background: var(--via-emerald, #12b76a); }
.via-switch input:checked::after { transform: translateX(20px); }

/* ---------- Tablas ---------- */
.via-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.via-table th { text-align: left; font-family: var(--via-display); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--via-muted, #5b6275); padding: .55rem .6rem; border-bottom: 2px solid var(--via-line, #e6e9f0); }
.via-table td { padding: .65rem .6rem; border-bottom: 1px solid var(--via-line, #e6e9f0); vertical-align: top; }
.via-table tbody tr:last-child td { border-bottom: 0; }

.via-link-danger { color: var(--via-red, #e5484d); text-decoration: none; font-weight: 600; font-size: .85rem; }
.via-link-danger:hover { text-decoration: underline; }

/* ---------- Píldoras de estado ---------- */
.via-pill {
	display: inline-block;
	font-size: .72rem;
	font-weight: 700;
	padding: .25rem .55rem;
	border-radius: 999px;
	background: var(--via-mist, #f4f6fa);
	color: var(--via-muted, #5b6275);
	white-space: nowrap;
}

.via-pill--confirmada { background: rgba(18, 183, 106, .14); color: #0a7a47; }
.via-pill--pre, .via-pill--nueva { background: rgba(255, 176, 32, .18); color: #8a5a00; }
.via-pill--whatsapp { background: rgba(37, 211, 102, .16); color: #0a7a3c; }
.via-pill--cancelada, .via-pill--rechazada, .via-pill--vencida { background: rgba(229, 72, 77, .12); color: #a01017; }

/* ---------- Reservas recibidas ---------- */
.via-reslist { display: flex; flex-direction: column; gap: .6rem; }

.via-resrow {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: .6rem .9rem;
	align-items: center;
	padding: .85rem;
	border: 1px solid var(--via-line, #e6e9f0);
	border-radius: var(--via-radius-sm);
	background: var(--via-paper, #fff);
}

.via-resrow__info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.via-resrow__info strong { font-family: var(--via-display); }
.via-resrow__info span { font-size: .85rem; color: var(--via-muted, #5b6275); }
.via-resrow__state { text-align: right; }
.via-resrow__actions { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Legal / soporte ---------- */
.via-legal { max-width: 720px; }
.via-legal h2 { font-family: var(--via-display); }
.via-legal p { color: var(--via-ink, #14161d); line-height: 1.65; }

.via-login { max-width: 460px; margin: 0 auto; }
.via-login .login-username,
.via-login .login-password { margin-bottom: .85rem; }
.via-login label { font-size: .82rem; font-weight: 600; display: block; margin-bottom: .3rem; }
.via-login input[type="text"],
.via-login input[type="password"] { width: 100%; border: 1px solid var(--via-line, #e6e9f0); border-radius: var(--via-radius-sm); padding: .7rem .85rem; font-size: .95rem; }
.via-login .button { background: var(--via-blue, #1e5bd6); color: #fff; border: 0; border-radius: 999px; padding: .75rem 1.2rem; font-weight: 600; cursor: pointer; }
.via-login .login-remember { font-weight: 400; font-size: .85rem; }

/* ---------- Desktop ---------- */
@media (min-width: 720px) {
	.via-hero { padding: 3.4rem 2.6rem 3.8rem; }
	.via-tiles { grid-template-columns: repeat(4, 1fr); }
	.via-cards--grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
	.via-seats { grid-template-columns: repeat(6, 1fr); gap: .65rem; }
	.via-modal { align-items: center; padding: 1.5rem; }
	.via-modal__panel { border-radius: 20px; }
	.via-map { height: 360px; }
	.via-bubble { max-width: 74%; }
}

/* ---------- Accesibilidad ---------- */
.via-btn:focus-visible,
.via-seat:focus-visible,
.via-form input:focus-visible,
.via-form select:focus-visible,
.via-form textarea:focus-visible {
	outline: 2px solid var(--via-blue, #1e5bd6);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.via-modal__panel { animation: none; }
	.via-tile, .via-btn, .via-seat { transition: none; }
}

/* =====================================================================
 * v2 · Dinamismo: micro-interacciones, toasts, pestañas y panel del dueño
 * ================================================================== */

/* Botones con elevación al pasar el cursor */
.via-btn--primary:hover { box-shadow: 0 8px 20px rgba(30, 91, 214, .28); transform: translateY(-1px); }
.via-btn--whatsapp:hover { box-shadow: 0 8px 20px rgba(37, 211, 102, .3); transform: translateY(-1px); }
.via-btn--amber:hover { transform: translateY(-1px); }

/* Entrada suave de tarjetas de resultados */
.via-cards > * { animation: via-rise .45s ease both; }
.via-cards > *:nth-child(2) { animation-delay: .05s; }
.via-cards > *:nth-child(3) { animation-delay: .1s; }
.via-cards > *:nth-child(4) { animation-delay: .15s; }
.via-cards > *:nth-child(5) { animation-delay: .2s; }
.via-card { transition: box-shadow .18s ease, transform .18s ease; }
.via-result:hover, .via-tour:hover, .via-driver:hover { box-shadow: var(--via-shadow-lg); transform: translateY(-2px); }

/* Burbuja del chat: aparición */
.via-bubble { animation: via-pop .25s ease both; }
@keyframes via-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

.via-bubble--typing::after {
	content: "";
	display: inline-block;
	width: 1.4em;
	text-align: left;
	animation: via-dots 1.2s steps(4, end) infinite;
}
@keyframes via-dots { 0% { content: ""; } 25% { content: "·"; } 50% { content: "··"; } 75% { content: "···"; } }

/* ---------- Toasts ---------- */
#via-toasts {
	position: fixed;
	left: 50%;
	bottom: 84px;
	transform: translateX(-50%);
	z-index: 100001;
	display: flex;
	flex-direction: column;
	gap: .5rem;
	width: calc(100% - 2rem);
	max-width: 380px;
	pointer-events: none;
}

.via-toast {
	pointer-events: auto;
	background: var(--via-ink, #14161d);
	color: #fff;
	padding: .8rem 1rem;
	border-radius: 12px;
	font-size: .9rem;
	box-shadow: var(--via-shadow-lg);
	display: flex;
	align-items: center;
	gap: .6rem;
	animation: via-toast-in .25s ease both;
	border-left: 4px solid var(--via-blue, #1e5bd6);
}

.via-toast--ok { border-left-color: var(--via-emerald, #12b76a); }
.via-toast--error { border-left-color: var(--via-red, #e5484d); }
.via-toast.is-out { animation: via-toast-out .25s ease forwards; }
@keyframes via-toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes via-toast-out { to { opacity: 0; transform: translateY(12px); } }

@media (min-width: 860px) {
	#via-toasts { left: auto; right: 24px; bottom: 24px; transform: none; }
}

/* ---------- Panel del dueño ---------- */
.via-owner__top {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.2rem;
	flex-wrap: wrap;
}

.via-owner__eyebrow {
	font-family: var(--via-display);
	text-transform: uppercase;
	letter-spacing: .14em;
	font-size: .7rem;
	color: var(--via-blue, #1e5bd6);
	font-weight: 700;
}

.via-ostats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: .7rem;
	margin-bottom: 1.4rem;
}

.via-ostat {
	background: var(--via-paper, #fff);
	border: 1px solid var(--via-line, #e6e9f0);
	border-radius: 14px;
	padding: .9rem 1rem;
	position: relative;
	overflow: hidden;
}

.via-ostat::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 3px;
	background: repeating-linear-gradient(90deg, var(--via-amber, #ffb020) 0 14px, transparent 14px 26px);
	opacity: .8;
}

.via-ostat__num { display: block; font-family: var(--via-display); font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--via-ink, #14161d); }
.via-ostat__label { display: block; font-size: .76rem; color: var(--via-muted, #5b6275); margin-top: .3rem; }

/* Pestañas */
.via-tabs {
	display: flex;
	gap: .4rem;
	overflow-x: auto;
	padding-bottom: .4rem;
	margin-bottom: 1.1rem;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}
.via-tabs::-webkit-scrollbar { display: none; }

.via-tab {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font-family: var(--via-display);
	font-weight: 600;
	font-size: .88rem;
	padding: .6rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--via-line, #e6e9f0);
	background: var(--via-paper, #fff);
	color: var(--via-muted, #5b6275);
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.via-tab:hover { color: var(--via-ink, #14161d); }
.via-tab.is-active { background: var(--via-ink, #14161d); color: #fff; border-color: var(--via-ink, #14161d); }

.via-tab__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--via-amber, #ffb020);
	color: var(--via-ink, #14161d);
	font-size: .68rem;
	font-weight: 700;
}
.via-tab__badge:empty, .via-tab__badge[data-zero="1"] { display: none; }

.via-tabpanel { display: none; animation: via-rise .35s ease both; }
.via-tabpanel.is-active { display: block; }

.via-resrow--ticket { grid-template-columns: 1fr auto; align-items: center; }
.via-resrow--ticket .via-ticket-state { padding: .5rem .6rem; border: 1px solid var(--via-line, #e6e9f0); border-radius: 8px; font-family: var(--via-font); }

@media (min-width: 720px) {
	.via-ostats { grid-template-columns: repeat(5, 1fr); }
}

/* =====================================================================
 * v3 · Chat-buscador integrado y monedero
 * ================================================================== */

/* Separador "o explora por categoría" */
.via-or {
	display: flex;
	align-items: center;
	gap: .8rem;
	margin: 1.6rem 0 1rem;
	color: var(--via-muted, #5b6275);
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .08em;
}
.via-or::before, .via-or::after { content: ""; flex: 1; height: 1px; background: var(--via-line, #e6e9f0); }

/* Chat como buscador principal del inicio */
.via-chat--home {
	position: relative;
	z-index: 2;
	box-shadow: var(--via-shadow-lg);
	border: 1px solid var(--via-line, #e6e9f0);
	min-height: 0;
}

.via-chat--home .via-chat__messages { min-height: 180px; max-height: 360px; }

.via-chat__bar {
	display: flex;
	align-items: center;
	gap: .7rem;
	padding: .8rem 1rem;
	background: var(--via-ink, #14161d);
	color: #fff;
}

.via-chat__bar strong { font-family: var(--via-display); display: block; font-size: .98rem; }
.via-chat__status { font-size: .76rem; color: var(--via-emerald, #12b76a); display: flex; align-items: center; gap: .35rem; }
.via-chat__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--via-emerald, #12b76a); box-shadow: 0 0 0 3px rgba(18,183,106,.25); }

.via-chat__avatar {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: rgba(255, 255, 255, .12);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	flex: none;
}

.via-chat__chips {
	display: flex;
	gap: .4rem;
	flex-wrap: wrap;
	padding: 0 .7rem .8rem;
	background: var(--via-paper, #fff);
}

.via-chip {
	font-family: var(--via-font);
	font-size: .82rem;
	padding: .4rem .8rem;
	border-radius: 999px;
	border: 1px solid var(--via-line, #e6e9f0);
	background: var(--via-mist, #f4f6fa);
	color: var(--via-ink, #14161d);
	cursor: pointer;
	transition: border-color .12s ease, background .12s ease;
}
.via-chip:hover { border-color: var(--via-blue, #1e5bd6); background: rgba(30,91,214,.06); }

@media (min-width: 720px) {
	.via-chat--home { max-width: 720px; margin-left: auto; margin-right: auto; }
}

/* ---------- Monedero / saldo ---------- */
.via-wallet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: .6rem;
}

.via-wallet__label { display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--via-muted, #5b6275); font-weight: 600; }
.via-wallet__balance { font-family: var(--via-display); font-size: 2rem; line-height: 1; color: var(--via-ink, #14161d); }

.via-statuschip {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	font-size: .8rem;
	font-weight: 600;
	padding: .4rem .7rem;
	border-radius: 999px;
}
.via-statuschip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; }
.via-statuschip.is-on { background: rgba(18,183,106,.12); color: #0a7a47; }
.via-statuschip.is-on::before { background: var(--via-emerald, #12b76a); box-shadow: 0 0 0 3px rgba(18,183,106,.2); }
.via-statuschip.is-off { background: var(--via-mist, #f4f6fa); color: var(--via-muted, #5b6275); }
.via-statuschip.is-off::before { background: var(--via-muted, #5b6275); }

.via-wallet__hint { font-size: .85rem; margin: 0 0 .9rem; }

.via-wallet__activate { display: flex; align-items: flex-end; gap: .7rem; flex-wrap: wrap; }
.via-wallet__units { display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; font-weight: 600; max-width: 110px; }
.via-wallet__units input { border: 1px solid var(--via-line, #e6e9f0); border-radius: 10px; padding: .6rem .7rem; font-family: var(--via-font); }

.via-wallet__recharge { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px dashed var(--via-line, #e6e9f0); }
.via-wallet__recharge h4 { font-family: var(--via-display); margin: 0 0 .6rem; font-size: 1rem; }

.via-wallet__history { margin-top: 1rem; }
.via-wallet__history summary { cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--via-blue, #1e5bd6); }
.via-wallet__history table { margin-top: .6rem; }

/* =====================================================================
 * v4 · Landing, perfiles con foto, accesos rápidos
 * ================================================================== */

/* CTA del hero */
.via-hero__cta { display: flex; gap: .6rem; flex-wrap: wrap; }
.via-btn--ghost-light { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.via-btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,.16); color: #fff; }

/* Cómo funciona (3 pasos) */
.via-steps3 {
	display: grid;
	grid-template-columns: 1fr;
	gap: .8rem;
	margin: 1.2rem 0 .4rem;
}
.via-step3 {
	background: var(--via-paper, #fff);
	border: 1px solid var(--via-line, #e6e9f0);
	border-radius: var(--via-radius);
	padding: 1.1rem 1.2rem;
	display: flex;
	flex-direction: column;
	gap: .2rem;
}
.via-step3 strong { font-family: var(--via-display); font-size: 1.02rem; }
.via-step3__n {
	width: 30px; height: 30px;
	border-radius: 50%;
	background: var(--via-ink, #14161d);
	color: #fff;
	font-family: var(--via-display);
	font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center;
	margin-bottom: .4rem;
}
@media (min-width: 720px) { .via-steps3 { grid-template-columns: repeat(3, 1fr); } }

/* Intro del panel */
.via-panel__intro { margin-bottom: .8rem; }
.via-h3 { font-family: var(--via-display); font-size: 1.2rem; margin: 0 0 .3rem; }

/* Accesos rápidos del panel del pasajero */
.via-quick {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: .6rem;
	margin: 1rem 0 1.2rem;
}
.via-quick__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .3rem;
	padding: .9rem .5rem;
	background: var(--via-paper, #fff);
	border: 1px solid var(--via-line, #e6e9f0);
	border-radius: 14px;
	text-decoration: none;
	color: var(--via-ink, #14161d);
	font-size: .82rem;
	font-weight: 600;
	text-align: center;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.via-quick__item span { font-size: 1.4rem; }
.via-quick__item:hover { transform: translateY(-2px); box-shadow: var(--via-shadow); border-color: var(--via-blue, #1e5bd6); }

/* Foto de perfil (avatar) */
.via-avatar-row { display: flex; align-items: center; gap: 1rem; margin-bottom: .4rem; }
.via-avatar {
	width: 64px; height: 64px;
	border-radius: 50%;
	background: var(--via-blue, #1e5bd6);
	background-size: cover; background-position: center;
	color: #fff;
	font-family: var(--via-display);
	font-weight: 700;
	font-size: 1.5rem;
	display: inline-flex; align-items: center; justify-content: center;
	flex: none;
}
.via-avatar-upload { font-size: .82rem; font-weight: 600; display: flex; flex-direction: column; gap: .3rem; }
.via-avatar-upload input[type="file"] { font-size: .82rem; }

/* Fotos del conductor (chofer + auto) */
.via-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: .4rem; }
.via-photo { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.via-photo__img {
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	background: var(--via-mist, #f4f6fa);
	background-size: cover; background-position: center;
	border: 1px dashed var(--via-line, #e6e9f0);
	display: flex; align-items: center; justify-content: center;
	font-size: 2rem;
}

/* =====================================================================
 * v5 · Tagline del hero, registro y validación de contraseña
 * ================================================================== */

.via-hero__tagline {
	font-family: var(--via-display);
	font-weight: 600;
	font-size: .95rem;
	color: var(--via-amber, #ffb020);
	margin: 0 0 .8rem;
	letter-spacing: .01em;
}

/* Registro: tarjeta centrada y cómoda */
.via-register { max-width: 560px; margin-left: auto; margin-right: auto; }
.via-register .via-h2 { margin-bottom: .2rem; }

/* Mensaje de coincidencia de contraseñas */
.via-pass-msg {
	display: none;
	font-size: .82rem;
	font-weight: 600;
	margin-top: -.2rem;
}
.via-pass-msg.is-ok { display: block; color: #0a7a47; }
.via-pass-msg.is-bad { display: block; color: #a01017; }
.via-pass-msg.is-ok::before { content: "✓ "; }
.via-pass-msg.is-bad::before { content: "✕ "; }

/* Login centrado */
.via-login { max-width: 460px; margin-left: auto; margin-right: auto; }
