﻿/* ===========================
   BOTÓN RASTREO (DERECHA)
   =========================== */

.boton-chat {
    position: fixed;
    bottom: 20px;
    right: 20px; /* Posición del botón de rastreo */
    background-color: rgb(0, 150, 64);
    color: #fff;
    padding: 12px 20px;
    border-radius: 43px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    height: 90px;
    transition: width 0.4s ease, background-color 0.3s ease;
    /* width se ajusta según contenido */
}

    .boton-chat.activo {
        background-color: #009A44;
    }

    /* Tamaño fijo de íconos para botones flotantes (Chat + Rastreo) */
    .boton-chat i,
    .boton-rastreo i,
    #boton-rastreo i,
    #boton-chat i {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
        font-size: 40px !important;
        line-height: 40px !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-shrink: 0 !important;
        transform: none !important; /* evita volteos o escalados */
    }

/* Ícono de camión del botón de rastreo (Font Awesome 6) */
#boton-rastreo .fa-truck,
#boton-rastreo .fa-truck::before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-size: 40px !important;
    line-height: 1 !important;
    transform: none !important; /* por si alguna hoja lo espeja/rota */
}

/* Texto "Rastreo" */
.boton-chat .texto {
    white-space: nowrap;
    transform: translateX(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 24px;
}

.boton-chat:hover .texto {
    opacity: 1;
    transform: translateX(0);
}

/* ===========================
   PANEL RASTREO
   =========================== */

.panel-chat {
    position: fixed;
    bottom: 115px;
    right: 150px;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 10px;
    z-index: 1001;
    width: 420px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
}

    .panel-chat.activo {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

/* Panel de opciones de rastreo: pegado a la derecha */
#panel-opciones {
    position: fixed;
    bottom: 115px;
    right: 15px !important;
    left: auto !important;
    margin: 0 !important;
    transform: translate(0, 20px) !important;
    width: 335px;
}

    #panel-opciones.activo {
        transform: translate(0, 0) !important;
    }

.mensaje-guia-vacia {
    display: none;
    color: #DF1995; /* rojo error */
    font-size: 13px;
    margin-left: 0px; /* ajusta para alinearlo con el input */
    white-space: nowrap;
}

.input-error {
    border: 1px solid #DF1995 !important;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 991.98px) {
    #boton-rastreo,
    .boton-rastreo {
        width: 135px !important;
        height: 60px !important;
    }

        #boton-rastreo i,
        .boton-rastreo i {
            font-size: 40px !important;
            margin-left: -5px;
        }

        #boton-rastreo .texto,
        .boton-rastreo .texto {
            font-size: 15px !important;
        }

        #boton-rastreo .fa-truck,
        #boton-rastreo .fa-truck::before {
            font-size: 30px !important;
          
        }

    #boton-rastreo span.texto.ms-2 {
        margin-left: 0px !important;
    }
}
