/* Arquitectura Design Chatbot - Estilos */
:root {
    --adc-primary: #1a1a1a;
    --adc-secondary: #2c2c2c;
    --adc-accent: #c9a961;
    --adc-text-light: #ffffff;
    --adc-text-muted: #b8b8b8;
    --adc-bg-light: #f8f8f8;
    --adc-border: #e5e5e5;
    --adc-user-bubble: #1a1a1a;
    --adc-bot-bubble: #f0ede8;
    --adc-shadow: 0 10px 40px rgba(0,0,0,0.18);
}

#adc-chatbot-wrapper {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Botón flotante */
#adc-chatbot-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--adc-primary);
    color: var(--adc-accent);
    border: 2px solid var(--adc-accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--adc-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

#adc-chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 50px rgba(0,0,0,0.25);
}

#adc-notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid var(--adc-primary);
    animation: adc-pulse 2s infinite;
}

@keyframes adc-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

/* Ventana del chat */
#adc-chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 580px;
    max-height: calc(100vh - 120px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: var(--adc-shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: adc-slide-up 0.3s ease;
}

#adc-chatbot-window.adc-open {
    display: flex;
}

@keyframes adc-slide-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
#adc-chatbot-header {
    background: var(--adc-primary);
    color: var(--adc-text-light);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--adc-accent);
}

.adc-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.adc-header-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--adc-accent);
    color: var(--adc-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
}

.adc-header-title {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
}

.adc-header-status {
    font-size: 11px;
    color: var(--adc-text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

.adc-status-dot {
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    display: inline-block;
}

#adc-chatbot-minimize {
    background: none;
    border: none;
    color: var(--adc-text-light);
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#adc-chatbot-minimize:hover {
    opacity: 1;
}

/* Mensajes */
#adc-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--adc-bg-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#adc-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#adc-chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.adc-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    animation: adc-fade-in 0.3s ease;
    word-wrap: break-word;
}

@keyframes adc-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.adc-message.bot {
    background: var(--adc-bot-bubble);
    color: var(--adc-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.adc-message.user {
    background: var(--adc-user-bubble);
    color: var(--adc-text-light);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.adc-typing {
    display: flex;
    gap: 4px;
    padding: 14px 18px;
    background: var(--adc-bot-bubble);
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    width: fit-content;
}

.adc-typing span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: adc-typing 1.4s infinite;
}

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

@keyframes adc-typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

/* Input area */
#adc-chatbot-input-area {
    padding: 14px 16px;
    background: #ffffff;
    border-top: 1px solid var(--adc-border);
    max-height: 200px;
    overflow-y: auto;
}

#adc-chatbot-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.adc-option-btn {
    background: #ffffff;
    color: var(--adc-primary);
    border: 1.5px solid var(--adc-primary);
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 500;
}

.adc-option-btn:hover {
    background: var(--adc-primary);
    color: var(--adc-accent);
    transform: translateY(-1px);
}

#adc-chatbot-text-input {
    display: flex;
    gap: 8px;
}

#adc-text-field {
    flex: 1;
    padding: 11px 14px;
    border: 1.5px solid var(--adc-border);
    border-radius: 22px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s;
}

#adc-text-field:focus {
    border-color: var(--adc-primary);
}

#adc-send-btn {
    background: var(--adc-primary);
    color: var(--adc-accent);
    border: none;
    padding: 0 20px;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: 13px;
    transition: opacity 0.2s;
}

#adc-send-btn:hover {
    opacity: 0.85;
}

/* Footer WhatsApp */
#adc-chatbot-footer {
    padding: 10px 16px;
    background: var(--adc-primary);
    text-align: center;
}

.adc-whatsapp-link {
    color: var(--adc-accent);
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.adc-whatsapp-link:hover {
    opacity: 0.85;
    color: var(--adc-accent);
}

/* Responsive móvil */
@media (max-width: 480px) {
    #adc-chatbot-wrapper {
        bottom: 16px;
        right: 16px;
    }

    #adc-chatbot-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 110px);
        bottom: 76px;
        right: 0;
    }

    #adc-chatbot-toggle {
        width: 58px;
        height: 58px;
    }
}
