/*--------------------------------------------------------------------- skeleton ---------------------------------------------------------------------*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Botón flotante del chat */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #36c2fa 0%, #00aeef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(49, 178, 238, 0.815);
    transition: all 0.3s ease;
    z-index: 1000;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.6);
}

.chat-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Contenedor del chatbot */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-width: calc(100vw - 60px);
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    animation: slideUp 0.3s ease;
}

.chatbot-container.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header del chat */
.chat-header {
    background: linear-gradient(135deg, #00aeef 0%, #00aeef 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.chat-header-text h3 {
    font-size: 18px;
    margin-bottom: 3px;
}

.chat-header-text p {
    font-size: 12px;
    opacity: 0.9;
}

.close-chat {
    cursor: pointer;
    font-size: 24px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-chat:hover {
    opacity: 1;
}

/* Área de mensajes */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.message {
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    display: flex;
    gap: 10px;
}

.message.user {
    display: flex;
    justify-content: flex-end;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
}

.message.bot .message-content {
    background: white;
    color: #2d3748;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #00aeef 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #00aeef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* Opciones rápidas */
.quick-options {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-option {
    padding: 8px 16px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    color: #4a5568;
}

.quick-option:hover {
    background: linear-gradient(135deg, #667eea 0%, #00aeef 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Área de input */
.chat-input {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input input:focus {
    border-color: #667eea;
}

.send-button {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #667eea 0%, #00aeef 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.send-button:hover {
    transform: scale(1.05);
}

.send-button svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .chatbot-container {
        bottom: 90px;
        right: 15px;
        width: calc(100vw - 30px);
        height: 500px;
    }

    .chat-button {
        bottom: 20px;
        right: 20px;
    }
}