/* ==========================================================================
   TPT Reservas — Transfer Puerto Tranquilo
   Estilos del formulario público.

   NOTA: los temas (Astra, Elementor, etc.) aplican estilos agresivos a
   <button>, así que aquí se resetea todo lo que hay dentro de .tpt-wrap y
   se re-declara con !important donde el tema suele interferir.
   ========================================================================== */

.tpt-wrap {
	--tpt-accent: #8b8567;
	--tpt-accent-dark: #6f6a51;
	--tpt-ink: #14161a;
	--tpt-muted: #6b7280;
	--tpt-line: #e5e7eb;
	--tpt-bg-soft: #f5f6f7;
	--tpt-free: #16a34a;
	--tpt-free-soft: #e9f9ef;
	--tpt-busy: #dc2626;
	--tpt-busy-soft: #fdeaea;
	--tpt-sel: #2563eb;
	--tpt-van-body: #d7dbe0;
	--tpt-radius: 16px;
	--tpt-btn-radius: 14px;

	/* Mapa de asientos: tamaño del asiento y separación uniforme
	   (el mismo valor se aplica entre columnas y entre filas). */
	--tpt-seat: 42px;
	--tpt-seat-gap: 4px;

	max-width: 980px;
	margin: 0 auto;
	color: var(--tpt-ink);
	font-family: inherit;
	line-height: 1.55;
	text-align: left;
}

.tpt-wrap *,
.tpt-wrap *::before,
.tpt-wrap *::after { box-sizing: border-box; }

/* ---------- Reset defensivo ---------- */
.tpt-wrap button {
	appearance: none;
	-webkit-appearance: none;
	font-family: inherit;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-shadow: none !important;
	box-shadow: none !important;
	min-height: 0 !important;
	min-width: 0 !important;
	width: auto;
	margin: 0;
	cursor: pointer;
	transition: background .18s, color .18s, border-color .18s, transform .12s;
}

.tpt-wrap [hidden],
.tpt-loading[hidden],
.tpt-alert[hidden] { display: none !important; }

/* ---------- Cabecera ---------- */
.tpt-header { text-align: center; margin-bottom: 28px; }
.tpt-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.tpt-sub { color: var(--tpt-muted); font-size: 15px; margin: 0; }

/* ---------- Pasos ---------- */
.tpt-steps {
	display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 24px;
	overflow-x: auto; scrollbar-width: none;
}
.tpt-steps::-webkit-scrollbar { display: none; }
.tpt-steps li::before { content: none !important; }
.tpt-step {
	display: flex; align-items: center; gap: 8px; flex: 1 0 auto;
	font-size: 13px; font-weight: 600; color: var(--tpt-muted);
	padding: 10px 14px; background: var(--tpt-bg-soft); border-radius: 999px; white-space: nowrap;
	margin: 0;
}
.tpt-step span {
	display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
	background: #fff; border: 1px solid var(--tpt-line); font-size: 12px; flex: 0 0 auto;
}
.tpt-step.is-active { background: var(--tpt-ink); color: #fff; }
.tpt-step.is-active span { background: var(--tpt-accent); border-color: var(--tpt-accent); color: #fff; }
.tpt-step.is-done { background: #eef1ea; color: var(--tpt-accent-dark); }
.tpt-step.is-done span { background: var(--tpt-accent); border-color: var(--tpt-accent); color: #fff; }

/* ---------- Paneles ---------- */
.tpt-panel { display: none; animation: tpt-fade .25s ease; }
.tpt-panel.is-active { display: block; }
@keyframes tpt-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.tpt-h3 { font-size: 20px; font-weight: 700; margin: 0 0 16px; }
.tpt-hint { font-size: 13px; color: var(--tpt-muted); margin: 8px 0 0; }
.tpt-hint--center { text-align: center; }
.tpt-req { color: var(--tpt-busy); }

/* ---------- Alertas ---------- */
.tpt-alert {
	padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 18px;
	border: 1px solid var(--tpt-busy-soft); background: #fff5f5; color: #991b1b;
}
.tpt-alert.is-warn { border-color: #fde68a; background: #fffbeb; color: #92400e; }
.tpt-alert.is-ok { border-color: #bbf7d0; background: #f0fdf4; color: #166534; }

/* ---------- Paso 1: tipo de viaje ---------- */
.tpt-trip-types { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tpt-trip { cursor: pointer; display: block; margin: 0; }
.tpt-trip input { position: absolute; opacity: 0; pointer-events: none; }
.tpt-trip-box {
	display: block; padding: 18px; border: 2px solid var(--tpt-line); border-radius: var(--tpt-radius);
	background: #fff; transition: border-color .18s, box-shadow .18s, background .18s; height: 100%;
}
.tpt-trip-box strong { display: block; font-size: 16px; margin-bottom: 4px; }
.tpt-trip-box small { display: block; color: var(--tpt-muted); font-size: 13px; line-height: 1.45; }
.tpt-trip-hora { display: block; margin-top: 10px; font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tpt-accent); }
.tpt-trip input:checked + .tpt-trip-box { border-color: var(--tpt-accent); background: #fbfbf8; box-shadow: 0 6px 20px rgba(139,133,103,.14); }
.tpt-trip input:focus-visible + .tpt-trip-box { outline: 2px solid var(--tpt-sel); outline-offset: 2px; }

/* ---------- Stepper de pasajeros ---------- */
.tpt-field--pax { margin-top: 24px; max-width: 300px; }
.tpt-stepper { display: flex; align-items: center; gap: 8px; }
.tpt-stepper input {
	width: 84px; text-align: center; font-size: 18px; font-weight: 700;
	padding: 10px; border: 1px solid var(--tpt-line); border-radius: 12px;
	-moz-appearance: textfield; appearance: textfield;
	background: #fff; color: var(--tpt-ink);
}
.tpt-stepper input::-webkit-outer-spin-button,
.tpt-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.tpt-wrap .tpt-stepper-btn {
	display: grid !important;
	place-items: center;
	width: 44px !important; height: 44px !important;
	padding: 0 !important;
	border-radius: var(--tpt-btn-radius) !important;
	border: 1px solid var(--tpt-line) !important;
	background: #fff !important;
	color: var(--tpt-ink) !important;
	font-size: 22px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	flex: 0 0 auto;
}
.tpt-wrap .tpt-stepper-btn:hover { background: var(--tpt-bg-soft) !important; border-color: var(--tpt-accent) !important; }
.tpt-wrap .tpt-stepper-btn svg { width: 16px; height: 16px; display: block; }

/* ---------- Campos ---------- */
.tpt-field { margin-bottom: 14px; }
.tpt-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--tpt-ink); }
.tpt-field input,
.tpt-field select,
.tpt-field textarea {
	width: 100%; padding: 11px 13px; border: 1px solid var(--tpt-line); border-radius: 12px;
	font-size: 15px; font-family: inherit; background: #fff; color: var(--tpt-ink);
	line-height: 1.4; margin: 0;
}
.tpt-field input:focus,
.tpt-field select:focus,
.tpt-field textarea:focus {
	outline: none; border-color: var(--tpt-accent); box-shadow: 0 0 0 3px rgba(139,133,103,.16);
}
.tpt-field input.is-warn { border-color: #d97706; }
.tpt-field-hint { display: block; font-size: 11.5px; color: #92400e; margin-top: 5px; }

/* ---------- Botones ---------- */
.tpt-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 26px; flex-wrap: wrap; }

.tpt-wrap .tpt-btn {
	display: inline-flex !important;
	align-items: center; justify-content: center;
	padding: 13px 26px !important;
	border-radius: var(--tpt-btn-radius) !important;
	border: 1px solid var(--tpt-line) !important;
	background: #fff !important;
	color: var(--tpt-ink) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
}
.tpt-wrap .tpt-btn:hover { background: var(--tpt-bg-soft) !important; border-color: #cfd3d8 !important; color: var(--tpt-ink) !important; }

.tpt-wrap .tpt-btn--primary {
	background: var(--tpt-ink) !important;
	border-color: var(--tpt-ink) !important;
	color: #fff !important;
}
.tpt-wrap .tpt-btn--primary:hover { background: #000 !important; border-color: #000 !important; color: #fff !important; }

.tpt-wrap .tpt-btn--pay {
	background: var(--tpt-accent) !important;
	border-color: var(--tpt-accent) !important;
	color: #fff !important;
}
.tpt-wrap .tpt-btn--pay:hover { background: var(--tpt-accent-dark) !important; border-color: var(--tpt-accent-dark) !important; color: #fff !important; }

.tpt-wrap .tpt-btn--ghost {
	border-style: dashed !important;
	font-size: 13px !important;
	padding: 10px 18px !important;
	color: var(--tpt-accent-dark) !important;
}

/* ---------- Calendario ---------- */
.tpt-cal-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.tpt-cal-card { border: 1px solid var(--tpt-line); border-radius: var(--tpt-radius); padding: 18px; background: #fff; }
.tpt-cal-head { margin-bottom: 14px; }
.tpt-cal-head strong { display: block; font-size: 15px; margin: 6px 0 2px; line-height: 1.35; }
.tpt-cal-head small { color: var(--tpt-muted); font-size: 13px; }
.tpt-cal-tag {
	display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
	color: var(--tpt-accent); background: #f3f2ec; padding: 3px 10px; border-radius: 999px;
}
.tpt-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.tpt-cal-month { font-weight: 700; font-size: 15px; }

.tpt-wrap .tpt-cal-arrow {
	display: grid !important;
	place-items: center;
	width: 36px !important; height: 36px !important;
	padding: 0 !important;
	border-radius: var(--tpt-btn-radius) !important;
	border: 1px solid var(--tpt-line) !important;
	background: #fff !important;
	color: var(--tpt-ink) !important;
	font-size: 18px !important;
	line-height: 1 !important;
	flex: 0 0 auto;
}
.tpt-wrap .tpt-cal-arrow:hover { background: var(--tpt-bg-soft) !important; border-color: var(--tpt-accent) !important; }
.tpt-wrap .tpt-cal-arrow svg { width: 15px; height: 15px; display: block; }

.tpt-cal-dows,
.tpt-cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.tpt-cal-dows span {
	text-align: center; font-size: 11px; font-weight: 700; color: var(--tpt-muted);
	padding: 0 0 6px; line-height: 1;
}

.tpt-wrap .tpt-day {
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1px;
	width: 100%;
	min-width: 0 !important;
	aspect-ratio: 1 / 1;
	padding: 0 !important;
	margin: 0 !important;
	border: 1px solid transparent !important;
	border-radius: 10px !important;
	background: transparent !important;
	color: var(--tpt-ink) !important;
	font-size: 13px !important;
	line-height: 1 !important;
	overflow: hidden;
}
.tpt-wrap .tpt-day b { font-weight: 600; font-size: 13px; line-height: 1; display: block; }
.tpt-wrap .tpt-day i { font-style: normal; font-size: 9px; font-weight: 700; line-height: 1; display: block; opacity: .75; }

.tpt-wrap .tpt-day--empty { visibility: hidden; }
.tpt-wrap .tpt-day--off { color: #cbd5e1 !important; }
.tpt-wrap .tpt-day--full { background: var(--tpt-busy-soft) !important; color: #b91c1c !important; }
.tpt-wrap .tpt-day--block {
	background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 4px, #e5e7eb 4px, #e5e7eb 8px) !important;
	color: #9ca3af !important;
	cursor: not-allowed;
}
.tpt-wrap .tpt-day--block b { text-decoration: line-through; }
.tpt-wrap .tpt-day--block .tpt-x { font-size: 11px; font-weight: 800; color: var(--tpt-busy); line-height: 1; }
.tpt-wrap .tpt-day--sel { cursor: pointer; }
.tpt-wrap .tpt-day--sel.is-free { background: var(--tpt-free-soft) !important; color: #14532d !important; }
.tpt-wrap .tpt-day--sel.is-low { background: #fef6e0 !important; color: #92400e !important; }
.tpt-wrap .tpt-day--sel:hover { border-color: var(--tpt-accent) !important; transform: translateY(-1px); }
.tpt-wrap .tpt-day.is-picked {
	background: var(--tpt-ink) !important;
	color: #fff !important;
	border-color: var(--tpt-ink) !important;
}
.tpt-cal-loading { padding: 30px 0; text-align: center; color: var(--tpt-muted); font-size: 14px; }

/* ---------- Leyendas ---------- */
.tpt-legend {
	display: flex; gap: 18px; flex-wrap: wrap; justify-content: center;
	margin-top: 18px; font-size: 13px; color: var(--tpt-muted);
}
.tpt-legend span { display: inline-flex; align-items: center; gap: 7px; }
.tpt-dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; flex: 0 0 auto; }
.tpt-dot--free { background: var(--tpt-free-soft); border: 1px solid var(--tpt-free); }
.tpt-dot--low { background: #fef6e0; border: 1px solid #d97706; }
.tpt-dot--full { background: var(--tpt-busy-soft); border: 1px solid var(--tpt-busy); }
.tpt-dot--block { background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 3px, #e5e7eb 3px, #e5e7eb 6px); border: 1px solid #cbd5e1; }

/* ==========================================================================
   Mapa de asientos — silueta del furgón vista desde arriba
   ========================================================================== */

.tpt-seatmaps { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tpt-seatcard { border: 1px solid var(--tpt-line); border-radius: var(--tpt-radius); padding: 18px; background: #fff; }
.tpt-seatcard-head { margin-bottom: 16px; }
.tpt-seatcard-head strong { display: block; font-size: 15px; margin: 6px 0 2px; line-height: 1.35; }
.tpt-seatcard-head small { color: var(--tpt-muted); font-size: 13px; }

.tpt-van { display: flex; justify-content: center; }

/* Contenedor con espacio lateral para las ruedas.
   Se ajusta al ancho real de la retícula de asientos. */
.tpt-van-outer {
	position: relative;
	display: inline-block;
	padding: 0 12px;
}

.tpt-van-body {
	position: relative;
	border: 3px solid var(--tpt-van-body);
	border-radius: 26px 26px 12px 12px;
	background: linear-gradient(180deg, #fdfdfe 0%, #f4f6f8 55%, #eef1f4 100%);
	padding: 11px 11px 13px;
	box-shadow: 0 10px 26px rgba(20, 22, 26, .07);
}

/* Trompa y parabrisas */
.tpt-van-nose { position: relative; height: 22px; margin-bottom: 4px; }
.tpt-windshield {
	position: absolute; left: 50%; top: 3px; transform: translateX(-50%);
	width: 88%; height: 16px;
	background: linear-gradient(180deg, #e3e8ee, #cdd5de);
	border-radius: 4px;
	clip-path: polygon(6% 0, 94% 0, 100% 100%, 0 100%);
}

/* Puesto del conductor: alineado con la primera columna de asientos */
.tpt-van-cockpit {
	display: grid;
	gap: var(--tpt-seat-gap);
	align-items: center;
	justify-content: center;
	padding: 0 0 9px;
	border-bottom: 2px dashed #d9dee4;
	margin-bottom: 9px;
}
.tpt-driver-slot {
	display: grid; place-items: center;
	width: var(--tpt-seat);
	height: var(--tpt-seat);
	border-radius: 8px 8px 4px 4px;
	border: 2px dashed #b9c0c8;
	background: #eef1f4;
	color: #6b7280;
}
.tpt-driver-slot svg { width: 21px; height: 21px; display: block; }

/* Filas de asientos: misma separación entre columnas y entre filas */
.tpt-van-cabin { display: grid; gap: var(--tpt-seat-gap); justify-content: center; }
.tpt-van-row { display: grid; gap: var(--tpt-seat-gap); align-items: center; justify-content: center; }
.tpt-aisle { display: block; }

/* Portón trasero */
.tpt-van-tail { margin-top: 11px; padding-top: 9px; border-top: 2px dashed #d9dee4; }
.tpt-tailgate {
	display: block; width: 62%; height: 7px; margin: 0 auto;
	background: #dde2e8; border-radius: 4px;
}

/* Ruedas */
.tpt-wheel {
	position: absolute;
	width: 8px; height: 26px;
	background: #7f8792;
	border-radius: 4px;
}
.tpt-wheel--fl { left: 0; top: 15%; }
.tpt-wheel--fr { right: 0; top: 15%; }
.tpt-wheel--rl { left: 0; bottom: 14%; }
.tpt-wheel--rr { right: 0; bottom: 14%; }

/* Asientos */
.tpt-wrap .tpt-seat {
	display: grid !important;
	place-items: center;
	width: var(--tpt-seat) !important;
	height: var(--tpt-seat) !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 2px solid transparent !important;
	border-radius: 8px 8px 4px 4px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	background: #fff !important;
}
.tpt-wrap .tpt-seat.is-free { background: var(--tpt-free-soft) !important; border-color: var(--tpt-free) !important; color: #14532d !important; }
.tpt-wrap .tpt-seat.is-free:hover { transform: translateY(-2px) scale(1.06); }
.tpt-wrap .tpt-seat.is-sel { background: var(--tpt-sel) !important; border-color: var(--tpt-sel) !important; color: #fff !important; transform: translateY(-2px); }
.tpt-wrap .tpt-seat.is-busy { background: var(--tpt-busy-soft) !important; border-color: var(--tpt-busy) !important; color: #b91c1c !important; cursor: not-allowed; }
.tpt-wrap .tpt-seat:focus-visible { outline: 2px solid var(--tpt-ink); outline-offset: 2px; }

.tpt-van-loading { padding: 40px 0; text-align: center; color: var(--tpt-muted); font-size: 14px; }
.tpt-seat-count { text-align: center; font-size: 13px; color: var(--tpt-muted); margin: 14px 0 0; }

.tpt-seat-key { width: 14px; height: 14px; border-radius: 5px 5px 3px 3px; display: inline-block; border: 2px solid; flex: 0 0 auto; }
.tpt-seat-key--free { background: var(--tpt-free-soft); border-color: var(--tpt-free); }
.tpt-seat-key--sel { background: var(--tpt-sel); border-color: var(--tpt-sel); }
.tpt-seat-key--busy { background: var(--tpt-busy-soft); border-color: var(--tpt-busy); }

/* ---------- Pasajeros ---------- */
.tpt-pax-forms { display: grid; gap: 16px; }
.tpt-pax { border: 1px solid var(--tpt-line); border-radius: var(--tpt-radius); padding: 18px; background: #fff; }
.tpt-pax-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.tpt-pax-num {
	display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
	background: var(--tpt-accent); color: #fff; font-size: 13px; font-weight: 700; flex: 0 0 auto;
}
.tpt-pax-head strong { font-size: 15px; }
.tpt-pax-head small { color: var(--tpt-muted); font-size: 12px; margin-left: auto; }
.tpt-pax-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.tpt-pax-grid .tpt-field { margin-bottom: 0; }
.tpt-pax-grid .tpt-field--wide { grid-column: 1 / -1; }

/* ---------- Resumen ---------- */
.tpt-resumen { display: grid; gap: 14px; }
.tpt-res-block { border: 1px solid var(--tpt-line); border-radius: var(--tpt-radius); padding: 16px 18px; background: #fff; }
.tpt-res-head { margin-bottom: 10px; }
.tpt-res-head strong { display: block; font-size: 15px; margin-top: 6px; }
.tpt-res-list { list-style: none; margin: 0; padding: 0; }
.tpt-res-list li {
	display: flex; justify-content: space-between; gap: 14px; padding: 7px 0;
	border-bottom: 1px dashed var(--tpt-line); font-size: 14px; margin: 0;
}
.tpt-res-list li::before { content: none !important; }
.tpt-res-list li:last-child { border-bottom: 0; }
.tpt-res-list span { color: var(--tpt-muted); }
.tpt-total {
	display: flex; justify-content: space-between; align-items: center; gap: 14px;
	padding: 18px 20px; border-radius: var(--tpt-radius); background: var(--tpt-ink); color: #fff;
}
.tpt-total strong { font-size: 24px; font-weight: 800; }

.tpt-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; font-size: 14px; cursor: pointer; }
.tpt-check input { margin: 3px 0 0; width: 17px; height: 17px; accent-color: var(--tpt-accent); flex: 0 0 auto; }
.tpt-check a { color: var(--tpt-accent-dark); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.tpt-check a:hover { color: var(--tpt-ink); }

/* ---------- Loading ---------- */
.tpt-loading {
	position: fixed; inset: 0; z-index: 99999; display: flex; flex-direction: column;
	align-items: center; justify-content: center; gap: 14px;
	background: rgba(255,255,255,.88); backdrop-filter: blur(2px); font-weight: 600;
}
.tpt-spinner {
	width: 42px; height: 42px; border-radius: 50%;
	border: 3px solid var(--tpt-line); border-top-color: var(--tpt-accent);
	animation: tpt-spin .8s linear infinite;
}
@keyframes tpt-spin { to { transform: rotate(360deg); } }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.tpt-steps { font-size: 12px; }
	.tpt-step { padding: 8px 11px; }
	.tpt-actions { justify-content: stretch; }
	.tpt-wrap .tpt-actions .tpt-btn { flex: 1 1 auto; }
	.tpt-pax-head small { margin-left: 0; width: 100%; }
	.tpt-cal-card,
	.tpt-seatcard { padding: 14px; }
}
