/* BOA Website Chatbot Widget Styles */

.boa-chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #374151, #1F2937);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 9999;
}

.boa-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.35);
}

.boa-chat-bubble svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.boa-chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
    display: none;
}

.boa-chat-bubble.has-unread .boa-chat-badge {
    display: block;
}

/* Chat Window */
.boa-chat-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    animation: boa-chat-slide-up 0.3s ease;
}

.boa-chat-window.open {
    display: flex;
}

@keyframes boa-chat-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.boa-chat-header {
    background: linear-gradient(135deg, #374151, #1F2937);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.boa-chat-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.boa-chat-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.boa-chat-header-text h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.boa-chat-header-text p {
    margin: 2px 0 0 0;
    font-size: 11px;
    opacity: 0.8;
}

.boa-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.boa-chat-close:hover {
    opacity: 1;
}

/* Messages */
.boa-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 340px;
    min-height: 200px;
}

.boa-chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}

.boa-chat-msg.assistant {
    background: #f3f4f6;
    color: #1f2937;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.boa-chat-msg.user {
    background: #374151;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.boa-chat-msg a {
    color: #3b82f6;
    text-decoration: underline;
}

.boa-chat-msg.user a {
    color: #93c5fd;
}

/* Typing Indicator */
.boa-chat-typing {
    display: none;
    align-self: flex-start;
    padding: 10px 14px;
    background: #f3f4f6;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
}

.boa-chat-typing.active {
    display: flex;
    gap: 4px;
    align-items: center;
}

.boa-chat-typing-dot {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: boa-typing-bounce 1.4s infinite both;
}

.boa-chat-typing-dot:nth-child(2) {
    animation-delay: 0.16s;
}

.boa-chat-typing-dot:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes boa-typing-bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Input */
.boa-chat-input-area {
    border-top: 1px solid #e5e7eb;
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.boa-chat-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    outline: none;
    resize: none;
    max-height: 80px;
    font-family: inherit;
    line-height: 1.4;
}

.boa-chat-input:focus {
    border-color: #374151;
}

.boa-chat-input::placeholder {
    color: #9ca3af;
}

.boa-chat-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #374151;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.boa-chat-send:hover {
    background: #1f2937;
}

.boa-chat-send:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.boa-chat-send svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* Lead Capture */
.boa-chat-lead-form {
    padding: 14px 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: none;
}

.boa-chat-lead-form.active {
    display: block;
}

.boa-chat-lead-form p {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #6b7280;
}

.boa-chat-lead-form input {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 6px;
    outline: none;
    box-sizing: border-box;
}

.boa-chat-lead-form input:focus {
    border-color: #374151;
}

.boa-chat-lead-btns {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.boa-chat-lead-submit {
    padding: 6px 14px;
    background: #374151;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.boa-chat-lead-skip {
    padding: 6px 14px;
    background: none;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

/* Powered by */
.boa-chat-powered {
    text-align: center;
    padding: 6px;
    font-size: 10px;
    color: #9ca3af;
    border-top: 1px solid #f3f4f6;
}

.boa-chat-powered a {
    color: #6b7280;
    text-decoration: none;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .boa-chat-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .boa-chat-bubble {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }

    .boa-chat-messages {
        max-height: calc(100vh - 200px);
    }
}
