/* Chat System CSS */
:root {
    --chat-primary: #10B981;
    --chat-secondary: #DCFCE7;
    --chat-bg: #F0FDF4;
    --chat-text: #1E293B;
}

.chat-modal-overlay {
    display: none;
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 360px;
    height: 520px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    z-index: 2000;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(16, 185, 129, 0.1);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

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

.chat-header {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: white;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chat-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--chat-bg);
    min-height: 300px;
    scroll-behavior: smooth;
}

.message-bubble {
    max-width: 85%;
    padding: 12px 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.message-bubble.sent {
    align-self: flex-end;
    background: var(--chat-primary);
    color: white;
    border-radius: 20px 20px 4px 20px;
}

.message-bubble.received {
    align-self: flex-start;
    background: white;
    color: var(--chat-text);
    border: 1px solid var(--chat-secondary);
    border-radius: 20px 20px 20px 4px;
}

.quick-reply-btn {
    background: white;
    border: 1.5px solid var(--chat-primary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--chat-primary);
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quick-reply-btn:hover {
    background: var(--chat-primary);
    color: white;
    transform: scale(1.05);
}

.typing-indicator {
    padding: 10px 15px;
    background: white;
    border-radius: 20px;
    display: flex;
    gap: 4px;
    width: fit-content;
    border: 1px solid var(--chat-secondary);
    margin-bottom: 10px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--chat-primary);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out;
    opacity: 0.6;
}

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

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

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

.chat-input-area {
    padding: 1.25rem;
    border-top: 1px solid rgba(16, 185, 129, 0.1);
    display: flex;
    gap: 10px;
    background: white;
}

.chat-input-area input {
    flex: 1;
    padding: 10px 18px;
    border: 2px solid #F1F5F9;
    border-radius: 24px;
    outline: none;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

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

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

.chat-send-btn:hover {
    background: #059669;
    transform: rotate(-15deg) scale(1.1);
}

.close-chat {
    cursor: pointer;
    font-size: 1.4rem;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
}

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