/* ===================================
   EDW CHATBOX STYLES
   =================================== */

.edw-chatbox {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: var(--font-primary);
}

.chat-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-accent-dark);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid white;
}

.chat-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--color-surface);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.chat-window.active {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

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

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

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

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
}

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

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

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--color-bg-secondary);
}

.chat-message {
    margin-bottom: 12px;
    animation: fadeIn 0.3s ease;
}

.message-content {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 12px;
    max-width: 80%;
    word-wrap: break-word;
}

.bot-message .message-content {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    border-bottom-left-radius: 4px;
}

.user-message {
    text-align: right;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-bottom-right-radius: 4px;
}

.quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.quick-reply {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.2s;
}

.quick-reply:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.chat-input-container {
    padding: 12px;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 20px;
    font-family: var(--font-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--color-primary);
}

.chat-send {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chat-send:hover {
    transform: scale(1.1);
}

.chat-send:active {
    transform: scale(0.95);
}

/* Dark mode */
[data-theme="dark"] .chat-window {
    background: var(--color-surface);
}

[data-theme="dark"] .chat-messages {
    background: var(--color-bg);
}

[data-theme="dark"] .bot-message .message-content {
    background: var(--color-surface-elevated);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 70vh;
        max-height: 600px;
    }

    .edw-chatbox {
        bottom: 10px;
        right: 10px;
    }
}