﻿:root {
    --color-primario: #2563eb;
    --color-primario-oscuro: #1d4ed8;
    --color-secundario: #eff6ff;
    --color-acento: #16a34a;
    --color-texto: #172033;
    --color-texto-suave: #64748b;
    --color-borde: #dbe3ef;
    --color-fondo: #f4f7fb;
    --color-blanco: #ffffff;
    --color-error: #dc2626;
    --sombra: 0 18px 45px rgba(15, 23, 42, 0.1);
    --radio: 20px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at top left,
            rgba(37, 99, 235, 0.12),
            transparent 30%
        ),
        var(--color-fondo);

    color: var(--color-texto);

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    line-height: 1.5;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select {
    cursor: pointer;
}

/* ============================================
   ENCABEZADO
============================================ */

.encabezado {
    display: flex;
    align-items: center;

    min-height: 82px;

    padding:
        14px
        max(
            20px,
            calc((100% - 1100px) / 2)
        );

    background:
        rgba(255, 255, 255, 0.92);

    border-bottom:
        1px solid
        rgba(219, 227, 239, 0.9);

    backdrop-filter:
        blur(12px);

    position: sticky;

    top: 0;

    z-index: 900;
}

.logo {
    display: inline-flex;
    align-items: center;

    gap: 12px;

    background: transparent;

    border: 0;

    color: var(--color-texto);

    text-align: left;

    user-select: none;
}

.logo:focus-visible {
    outline:
        3px solid
        rgba(37, 99, 235, 0.3);

    outline-offset: 5px;

    border-radius: 12px;
}

.logo-icono {
    display: grid;

    width: 48px;
    height: 48px;

    place-items: center;

    background:
        linear-gradient(
            135deg,
            var(--color-primario),
            #60a5fa
        );

    border-radius: 15px;

    box-shadow:
        0 9px 22px
        rgba(37, 99, 235, 0.3);

    font-size: 25px;
}

.logo strong,
.logo small {
    display: block;
}

.logo strong {
    font-size: 22px;

    letter-spacing: -0.5px;
}

.logo small {
    margin-top: -2px;

    color:
        var(--color-texto-suave);

    font-size: 12px;
}

/* ============================================
   CONTENIDO
============================================ */

.contenedor {
    width:
        min(
            100% - 32px,
            900px
        );

    margin: 0 auto;

    padding:
        52px 0 60px;
}

.presentacion {
    max-width: 680px;

    margin:
        0 auto 28px;

    text-align: center;
}

.etiqueta {
    display: inline-block;

    margin-bottom: 12px;

    padding:
        7px 13px;

    background:
        var(--color-secundario);

    border:
        1px solid #bfdbfe;

    border-radius: 999px;

    color:
        var(--color-primario-oscuro);

    font-size: 13px;

    font-weight: 700;
}

.presentacion h1 {
    margin-bottom: 10px;

    font-size:
        clamp(
            32px,
            6vw,
            50px
        );

    line-height: 1.08;

    letter-spacing: -1.7px;
}

.presentacion p {
    color:
        var(--color-texto-suave);

    font-size: 17px;
}

/* ============================================
   PANEL
============================================ */

.panel,
.confirmacion {
    background:
        var(--color-blanco);

    border:
        1px solid
        rgba(219, 227, 239, 0.9);

    border-radius:
        var(--radio);

    box-shadow:
        var(--sombra);
}

.panel {
    padding:
        clamp(
            22px,
            5vw,
            38px
        );
}

/* ============================================
   FORMULARIOS
============================================ */

.grupo-formulario {
    margin-bottom: 21px;
}

.grupo-formulario label {
    display: block;

    margin-bottom: 8px;

    font-size: 14px;

    font-weight: 700;
}

.grupo-formulario input,
.grupo-formulario select,
.grupo-formulario textarea {
    width: 100%;

    min-height: 50px;

    padding:
        12px 14px;

    background:
        var(--color-blanco);

    border:
        1px solid
        var(--color-borde);

    border-radius: 12px;

    color:
        var(--color-texto);

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.grupo-formulario textarea {
    min-height: 92px;

    resize: vertical;
}

.grupo-formulario input:focus,
.grupo-formulario select:focus,
.grupo-formulario textarea:focus {
    border-color:
        var(--color-primario);

    box-shadow:
        0 0 0 4px
        rgba(37, 99, 235, 0.12);
}

/* ============================================
   PREGUNTAS
============================================ */

.preguntas-servicio {
    margin-bottom: 24px;
}

.estado-vacio {
    display: grid;

    min-height: 125px;

    place-content: center;

    padding: 20px;

    background: #f8fafc;

    border:
        1px dashed #cbd5e1;

    border-radius: 15px;

    color:
        var(--color-texto-suave);

    text-align: center;
}

.estado-vacio span {
    margin-bottom: 4px;

    font-size: 29px;
}

/* ============================================
   UBICACIÓN
============================================ */

.ubicacion-bloque {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-top: 8px;

    padding-top: 25px;

    border-top:
        1px solid
        var(--color-borde);
}

.ubicacion-bloque h2 {
    margin-bottom: 3px;

    font-size: 19px;
}

.ubicacion-bloque p {
    color:
        var(--color-texto-suave);

    font-size: 14px;
}

/* ============================================
   BOTONES
============================================ */

.boton {
    min-height: 50px;

    padding:
        12px 20px;

    border: 0;

    border-radius: 12px;

    font-weight: 700;

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        opacity 0.18s ease;
}

.boton:hover:not(:disabled) {
    transform:
        translateY(-2px);
}

.boton:active:not(:disabled) {
    transform:
        translateY(0);
}

.boton:focus-visible {
    outline:
        3px solid
        rgba(37, 99, 235, 0.25);

    outline-offset: 3px;
}

.boton-principal {
    width: 100%;

    margin-top: 22px;

    background:
        linear-gradient(
            135deg,
            var(--color-primario),
            var(--color-primario-oscuro)
        );

    color:
        var(--color-blanco);

    box-shadow:
        0 10px 24px
        rgba(37, 99, 235, 0.23);
}

.boton-principal:hover:not(:disabled) {
    background:
        linear-gradient(
            135deg,
            var(--color-primario-oscuro),
            #1e40af
        );
}

.boton-secundario {
    background:
        var(--color-secundario);

    color:
        var(--color-primario-oscuro);
}

.boton:disabled {
    cursor: not-allowed;

    opacity: 0.48;

    box-shadow: none;
}

/* ============================================
   MAPA
============================================ */

#mapa {
    width: 100%;

    height: 340px;

    margin-top: 20px;

    overflow: hidden;

    background: #dbeafe;

    border:
        1px solid
        var(--color-borde);

    border-radius: 16px;

    z-index: 1;
}

/* ============================================
   CONFIRMACIÓN Y SEGUIMIENTO
============================================ */

.confirmacion {
    padding:
        48px 28px;

    text-align: center;
}

.confirmacion-icono {
    display: grid;

    width: 76px;
    height: 76px;

    margin:
        0 auto 18px;

    place-items: center;

    background: #dcfce7;

    border-radius: 50%;

    color:
        var(--color-acento);

    font-size: 39px;

    font-weight: 700;
}

.confirmacion h2 {
    margin-bottom: 7px;

    font-size: 28px;
}

.confirmacion > p {
    color:
        var(--color-texto-suave);
}

.confirmacion .folio {
    margin-top: 13px;

    color:
        var(--color-texto);
}

.confirmacion .boton {
    margin-top: 24px;
}

.seguimiento-servicio {
    width:
        min(
            100%,
            430px
        );

    margin:
        25px auto 0;

    padding: 20px;

    background: #f8fafc;

    border:
        1px solid
        var(--color-borde);

    border-radius: 15px;
}

.seguimiento-servicio small,
.seguimiento-servicio strong {
    display: block;
}

.seguimiento-servicio small {
    margin-bottom: 9px;

    color:
        var(--color-texto-suave);

    font-size: 12px;

    font-weight: 700;

    text-transform: uppercase;
}

.seguimiento-servicio p {
    margin-top: 10px;

    color:
        var(--color-texto-suave);

    font-size: 13px;
}

.estado-seguimiento {
    width: fit-content;

    margin: 0 auto;

    padding:
        8px 14px;

    border-radius: 999px;

    font-size: 14px;
}

.estado-pendiente {
    background: #fef3c7;

    color: #a16207;
}

.estado-aceptada {
    background: #ede9fe;

    color: #6d28d9;
}

.estado-en_camino {
    background: #dbeafe;

    color: #1d4ed8;
}

.estado-completada {
    background: #dcfce7;

    color: #15803d;
}

.estado-cancelada {
    background: #fee2e2;

    color: #b91c1c;
}

#btnActualizarSeguimiento,
#btnNuevaSolicitud {
    width:
        min(
            100%,
            430px
        );
}

#btnNuevaSolicitud {
    margin-top: 10px;
}

/* ============================================
   MODAL
============================================ */

.modal {
    position: fixed;

    inset: 0;

    display: grid;

    place-items: center;

    padding: 20px;

    background:
        rgba(15, 23, 42, 0.68);

    backdrop-filter:
        blur(6px);

    z-index: 2000;
}

.modal-contenido {
    position: relative;

    width:
        min(
            100%,
            430px
        );

    padding: 36px;

    background:
        var(--color-blanco);

    border-radius: 20px;

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.3);

    animation:
        mostrar-modal 0.25s ease;
}

.modal-icono {
    display: block;

    margin-bottom: 8px;

    font-size: 34px;
}

.modal-contenido h2 {
    margin-bottom: 6px;

    font-size: 25px;
}

.modal-contenido > p {
    margin-bottom: 24px;

    color:
        var(--color-texto-suave);
}

.modal-cerrar {
    position: absolute;

    top: 12px;
    right: 14px;

    width: 38px;
    height: 38px;

    background: #f1f5f9;

    border: 0;

    border-radius: 50%;

    color:
        var(--color-texto-suave);

    font-size: 25px;

    line-height: 1;
}

.mensaje-error {
    margin:
        -8px 0 6px;

    padding:
        10px 12px;

    background: #fef2f2;

    border:
        1px solid #fecaca;

    border-radius: 10px;

    color:
        var(--color-error);

    font-size: 14px;
}

/* ============================================
   UTILIDADES
============================================ */

.oculto {
    display: none !important;
}

footer {
    padding: 24px;

    color:
        var(--color-texto-suave);

    font-size: 13px;

    text-align: center;
}

/* ============================================
   ANIMACIONES
============================================ */

@keyframes mostrar-modal {

    from {
        opacity: 0;

        transform:
            translateY(12px)
            scale(0.98);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}

/* ============================================
   DISEÑO MÓVIL
============================================ */

@media (max-width: 640px) {

    .encabezado {
        min-height: 72px;
    }

    .logo-icono {
        width: 43px;
        height: 43px;
    }

    .contenedor {
        width:
            min(
                100% - 22px,
                900px
            );

        padding-top: 34px;
    }

    .presentacion h1 {
        font-size: 34px;
    }

    .presentacion p {
        font-size: 15px;
    }

    .panel {
        padding:
            20px 16px;

        border-radius: 16px;
    }

    .ubicacion-bloque {
        align-items: stretch;

        flex-direction: column;
    }

    .ubicacion-bloque .boton {
        width: 100%;
    }

    #mapa {
        height: 285px;
    }

    .confirmacion {
        padding:
            38px 17px;
    }

    .modal-contenido {
        padding:
            32px 20px 22px;
    }
}
/* =====================================
   COMPARTIR VIAJE Y DATOS DEL TAXISTA
===================================== */

.boton-whatsapp {
    margin-top: 11px;
    background: #16a34a;
    color: #ffffff;
}

.boton-whatsapp:hover {
    background: #15803d;
}

.datos-taxista-seguimiento {
    margin-top: 15px;
    padding: 14px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 13px;
    color: #1e3a8a;
    text-align: left;
}

.datos-taxista-seguimiento strong,
.datos-taxista-seguimiento span {
    display: block;
}

.datos-taxista-seguimiento span {
    margin-top: 3px;
    font-size: 13px;
}
/* =====================================
   CHAT TEMPORAL DEL VIAJE
===================================== */

.chat-viaje {
    margin-top: 17px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 15px;
    text-align: left;
}

.chat-encabezado {
    padding: 14px 15px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.chat-encabezado strong,
.chat-encabezado small {
    display: block;
}

.chat-encabezado small {
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
}

.chat-mensajes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 110px;
    max-height: 260px;
    padding: 13px;
    overflow-y: auto;
}

.chat-vacio {
    margin: auto;
    color: #94a3b8;
    font-size: 13px;
    text-align: center;
}

.burbuja-chat {
    align-self: flex-start;
    max-width: 84%;
    padding: 9px 11px;
    background: #f1f5f9;
    border-radius: 4px 13px 13px 13px;
    color: #334155;
    overflow-wrap: anywhere;
}

.burbuja-chat.propio {
    align-self: flex-end;
    background: #dbeafe;
    border-radius: 13px 4px 13px 13px;
    color: #1e3a8a;
}

.burbuja-chat span,
.burbuja-chat small {
    display: block;
}

.burbuja-chat small {
    margin-top: 3px;
    opacity: .68;
    font-size: 10px;
    text-align: right;
}

.mensajes-rapidos {
    display: flex;
    gap: 7px;
    padding: 0 13px 10px;
    overflow-x: auto;
}

.mensajes-rapidos button {
    flex: 0 0 auto;
    padding: 7px 10px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
}

.chat-formulario {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 11px 13px 13px;
    border-top: 1px solid #e2e8f0;
}

.chat-formulario input {
    width: 100%;
    min-width: 0;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
}

.chat-formulario button {
    min-height: 43px;
    padding: 9px 13px;
    background: #2563eb;
    border: 0;
    border-radius: 11px;
    color: #ffffff;
    font-weight: 800;
}
