/* Chatbot Widget Styles */
#chat-widget-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: var(--font-family, 'Inter', sans-serif);
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary, #E33E38), var(--accent, #FF7E67));
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(227, 62, 56, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(227, 62, 56, 0.5);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    max-height: calc(100vh - 120px);
    background: var(--bg-surface, #ffffff);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
    border: 1px solid var(--border, #E5E7EB);
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

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

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

.chat-header-avatar {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary, #E33E38);
    font-size: 16px;
}

.chat-header-title {
    font-weight: 600;
    font-size: 1.05rem;
    line-height: 1.2;
}

.chat-header-status {
    font-size: 0.75rem;
    opacity: 0.9;
}

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

.chat-close-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-close-btn:hover {
    opacity: 1;
}

.chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #F9FAFB;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Custom scrollbar for chat */
.chat-body::-webkit-scrollbar {
    width: 6px;
}
.chat-body::-webkit-scrollbar-track {
    background: transparent;
}
.chat-body::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

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

.chat-msg.bot {
    align-self: flex-start;
    background: white;
    color: var(--text-color, #1F2937);
    border: 1px solid var(--border, #E5E7EB);
    border-bottom-left-radius: 4px;
}

.chat-msg.user {
    align-self: flex-end;
    background: var(--primary, #E33E38);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg.bot p { margin-bottom: 8px; }
.chat-msg.bot p:last-child { margin-bottom: 0; }
.chat-msg.bot ul { margin-left: 20px; margin-bottom: 8px; }

.chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px 14px;
    background: white;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    align-self: flex-start;
    align-items: center;
}

.chat-typing-dot {
    width: 6px;
    height: 6px;
    background: #9CA3AF;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.chat-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.chat-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chat-footer {
    padding: 12px;
    background: white;
    border-top: 1px solid var(--border, #E5E7EB);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

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

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

.chat-send-btn:hover {
    background: #c5302b;
}

.chat-send-btn:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .chat-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        transform: translateY(100%);
    }
    
    .chat-window.active {
        transform: translateY(0);
    }
    
    #chat-widget-container {
        bottom: 16px;
        right: 16px;
    }
}
