/**
 * Estilos para botones flotantes (Chat y WhatsApp)
 * Unitech Fusion
 */

/* Contenedor principal de botones flotantes */
.floating-buttons-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

/* Estilos comunes para botones flotantes */
.floating-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.floating-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.floating-button i {
    font-size: 24px;
}

/* Botón de chat */
.chat-button {
    background: linear-gradient(135deg, #4a6bff, #2541b8);
    color: white;
}

.chat-button:hover {
    background: linear-gradient(135deg, #5a77ff, #2f4cce);
}

/* Botón de WhatsApp */
.whatsapp-button {
    background: #25D366;
    color: white;
}

.whatsapp-button:hover {
    background: #22c35e;
}

/* Ventana de chat */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.chat-window.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Encabezado de chat */
.chat-header {
    background: linear-gradient(135deg, #4a6bff, #2541b8);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.chat-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Cuerpo de chat */
.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f5f7fb;
}

/* Mensajes de chat */
.chat-message {
    margin-bottom: 15px;
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 15px;
    position: relative;
    line-height: 1.5;
    font-size: 14px;
}

.chat-message.bot {
    background-color: #e6eaf5;
    color: #333;
    border-top-left-radius: 5px;
    align-self: flex-start;
    margin-right: auto;
}

.chat-message.user {
    background-color: #4a6bff;
    color: white;
    border-top-right-radius: 5px;
    align-self: flex-end;
    margin-left: auto;
}

.chat-messages {
    display: flex;
    flex-direction: column;
}

/* Opciones de preguntas frecuentes */
.faq-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.faq-option {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.faq-option:hover {
    background-color: #f0f2f5;
    border-color: #d0d0d0;
}

/* Pie de chat */
.chat-footer {
    padding: 15px;
    border-top: 1px solid #eaeaea;
    background-color: white;
}

.chat-input-container {
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
    font-size: 14px;
}

.chat-input:focus {
    border-color: #4a6bff;
}

.chat-send {
    background-color: #4a6bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.chat-send:hover {
    background-color: #3a5be0;
}

/* Animación de escritura */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 10px 15px;
    background-color: #e6eaf5;
    border-radius: 15px;
    width: fit-content;
    margin-bottom: 15px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: #8a9cc5;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Estilos responsivos */
@media (max-width: 576px) {
    .chat-window {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 90px;
    }
    
    .floating-buttons-container {
        right: 20px;
        bottom: 20px;
    }
    
    .floating-button {
        width: 50px;
        height: 50px;
    }
}