/**
 * Alpha Chatbot Styles
 * Modern, clean design matching Alpha2Zulu brand
 * Created: 2025-11-13
 */

/* Chat Bubble (Closed State) */
.alpha-chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6C5CE7 0%, #5B4FD8 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alpha-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(108, 92, 231, 0.6);
}

.alpha-bubble-icon {
    width: 30px;
    height: 30px;
    color: white;
}

.alpha-bubble-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
}

.alpha-bubble-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF6B9D;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

.alpha-bubble-badge.hidden {
    display: none;
}

/* Chat Window (Open State) */
.alpha-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.alpha-chat-window.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

/* Header */
.alpha-chat-header {
    background: linear-gradient(135deg, #6C5CE7 0%, #5B4FD8 100%);
    color: white;
    padding: 16px 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.alpha-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.alpha-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alpha-header-text {
    flex: 1;
}

.alpha-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

.alpha-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.alpha-status-dot {
    width: 8px;
    height: 8px;
    background: #45E3CF;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.alpha-header-actions {
    display: flex;
    gap: 8px;
}

.alpha-minimize,
.alpha-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alpha-minimize:hover,
.alpha-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Messages Area */
.alpha-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alpha-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.alpha-chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.alpha-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.alpha-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Message Bubbles */
.alpha-message {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alpha-message.user {
    justify-content: flex-end;
}

.alpha-message-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 14px;
}

.alpha-message.bot .alpha-message-bubble {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alpha-message.user .alpha-message-bubble {
    background: #6C5CE7;
    color: white;
    border-bottom-right-radius: 4px;
}

.alpha-message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* Typing Indicator */
.alpha-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.alpha-typing-indicator.hidden {
    display: none;
}

.alpha-typing-indicator span {
    width: 8px;
    height: 8px;
    background: #6C5CE7;
    border-radius: 50%;
    display: inline-block;
    animation: typing 1.4s infinite;
}

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

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

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

/* Privacy Notice */
.alpha-privacy-notice {
    padding: 8px 20px;
    background: rgba(108, 92, 231, 0.05);
    border-top: 1px solid rgba(108, 92, 231, 0.1);
    font-size: 11px;
    line-height: 1.4;
    color: #64748B;
    text-align: center;
}

.alpha-privacy-notice a {
    color: #6C5CE7;
    text-decoration: none;
}

.alpha-privacy-notice a:hover {
    text-decoration: underline;
}

/* Input Area */
.alpha-chat-input {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 16px 16px;
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

#alpha-input {
    flex: 1;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

#alpha-input:focus {
    outline: none;
    border-color: #6C5CE7;
}

.alpha-send-btn {
    background: #6C5CE7;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.alpha-send-btn:hover:not(:disabled) {
    background: #5B4FD8;
    transform: scale(1.05);
}

.alpha-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.alpha-send-btn svg {
    width: 20px;
    height: 20px;
    fill: white;
}

/* Welcome Message */
.alpha-welcome {
    text-align: center;
    padding: 20px;
    color: #666;
}

.alpha-welcome-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.alpha-welcome-text {
    font-size: 14px;
    line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .alpha-chat-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
    }

    .alpha-chat-header {
        border-radius: 0;
    }

    .alpha-chat-input {
        border-radius: 0;
    }

    .alpha-chat-bubble {
        bottom: 15px;
        right: 15px;
    }
}

/* Loading State */
.alpha-loading {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

/* Error Message */
.alpha-error-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 13px;
}

/* Lead Captured Badge */
.alpha-lead-badge {
    background: rgba(69, 227, 207, 0.1);
    border: 1px solid #45E3CF;
    color: #45E3CF;
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    margin: 10px 0;
}

/* Powered By */
.alpha-powered-by {
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: #999;
    background: #f8f9fa;
}

.alpha-powered-by a {
    color: #6C5CE7;
    text-decoration: none;
}

.alpha-powered-by a:hover {
    text-decoration: underline;
}
