/* asistente.css — Asistente de voz/IA de SendVialo */
#asistente-ia-btn {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #41ba0d;
    color: #fff;
    border: none;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}

#asistente-ia-btn:hover {
    background: #379e0b;
    transform: scale(1.05);
}

#asistente-ia-btn.escuchando {
    background: #e74c3c;
    animation: asistente-pulso 1.4s ease-out infinite;
}

#asistente-ia-btn.pensando {
    background: #f39c12;
    animation: asistente-girar 1.2s linear infinite;
}

@keyframes asistente-pulso {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.55); }
    70% { box-shadow: 0 0 0 16px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

@keyframes asistente-girar {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#asistente-ia-panel {
    position: fixed;
    right: 20px;
    bottom: 156px;
    width: 330px;
    max-width: calc(100vw - 40px);
    max-height: 65vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    z-index: 9999;
    flex-direction: column;
    overflow: hidden;
    font-family: inherit;
}

.asistente-ia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #41ba0d;
    color: #fff;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 15px;
}

.asistente-ia-header-botones {
    display: flex;
    align-items: center;
    gap: 4px;
}

.asistente-ia-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
}

.asistente-ia-header button:hover {
    background: rgba(255, 255, 255, 0.18);
}

.asistente-ia-header button.escuchando {
    color: #ffd7d0;
    animation: asistente-parpadeo 1s ease-in-out infinite;
}

@keyframes asistente-parpadeo {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.asistente-ia-status {
    padding: 12px 14px 4px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
}

.asistente-ia-transcript {
    padding: 0 14px 8px;
    font-size: 13px;
    color: #777;
    font-style: italic;
    min-height: 1em;
}

.asistente-ia-resultados {
    padding: 0 14px;
    overflow-y: auto;
}

.asistente-ia-resultado-item {
    display: block;
    text-decoration: none;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    background: #fafcf8;
}

a.asistente-ia-resultado-item:hover {
    border-color: #41ba0d;
    background: #f0f7ec;
}

.asistente-ia-resultado-item .ruta {
    font-weight: 600;
    color: #2c3e50;
    font-size: 13px;
}

.asistente-ia-resultado-item .viajero {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.asistente-ia-resultado-item .detalle {
    font-size: 12.5px;
    color: #2c7a06;
    font-weight: 600;
    margin-top: 3px;
}

.asistente-ia-acciones {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 14px;
}

.asistente-ia-acciones button {
    background: #f0f7ec;
    border: 1px solid #41ba0d;
    color: #2c7a06;
    border-radius: 8px;
    padding: 9px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}

.asistente-ia-acciones button:hover {
    background: #e2f2d8;
}

.asistente-ia-form-texto {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid #eee;
}

.asistente-ia-form-texto input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
}

.asistente-ia-form-texto input:focus {
    border-color: #41ba0d;
}

.asistente-ia-form-texto input:disabled {
    background: #f5f5f5;
}

.asistente-ia-form-texto button {
    background: #41ba0d;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 13px;
    font-size: 13px;
    cursor: pointer;
}

.asistente-ia-form-texto button:hover {
    background: #379e0b;
}

@media (max-width: 600px) {
    #asistente-ia-btn {
        bottom: 130px;
    }
    #asistente-ia-panel {
        bottom: 196px;
        max-height: 55vh;
    }
}
