/* MCDBIRTH.IN AI Support Chat */
#ai-chat-root {
    --ai-navy: #1e3a5f;
    --ai-gold: #c6a35a;
    --ai-bg: #f8fafc;
    font-family: 'Poppins', 'Outfit', sans-serif;
}

#ai-chat-toggle {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #122033, var(--ai-navy) 55%, var(--ai-gold));
    color: #fff;
    font-weight: 900;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(30, 58, 95, 0.35);
    transition: transform 0.25s, box-shadow 0.25s;
    font-family: inherit;
}

#ai-chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(30, 58, 95, 0.45);
}

#ai-chat-toggle .ai-bot-icon {
    font-size: 18px;
}

#ai-chat-panel {
    position: fixed;
    bottom: 88px;
    right: 22px;
    width: min(380px, calc(100vw - 24px));
    max-height: min(560px, calc(100vh - 110px));
    z-index: 99991;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(18, 32, 51, 0.22);
    border: 1px solid rgba(30, 58, 95, 0.12);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: aiChatSlideUp 0.3s ease;
}

#ai-chat-panel.open {
    display: flex;
}

@keyframes aiChatSlideUp {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.ai-chat-head {
    background: linear-gradient(135deg, #122033, var(--ai-navy) 60%, #2d4a73);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ai-chat-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ai-gold), #e8c97a);
    color: #1a1204;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.ai-chat-head h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 900;
}

.ai-chat-head p {
    margin: 2px 0 0;
    font-size: 11px;
    opacity: 0.88;
    font-weight: 600;
}

.ai-chat-head-actions {
    display: flex;
    gap: 6px;
}

.ai-chat-icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.ai-chat-icon-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.ai-chat-quick {
    padding: 10px 12px;
    background: var(--ai-bg);
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ai-chat-quick button {
    border: 1px solid rgba(30, 58, 95, 0.15);
    background: #fff;
    color: var(--ai-navy);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.ai-chat-quick button:hover {
    background: var(--ai-navy);
    color: #fff;
    border-color: var(--ai-navy);
}

.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
    background: #fafbfc;
    min-height: 200px;
    max-height: 320px;
}

.ai-chat-msg {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    animation: aiChatFade 0.25s ease;
}

@keyframes aiChatFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

.ai-chat-msg.user {
    flex-direction: row-reverse;
}

.ai-chat-msg .bubble {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 600;
    word-break: break-word;
}

.ai-chat-msg.assistant .bubble {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    border-radius: 14px 14px 14px 4px;
}

.ai-chat-msg.user .bubble {
    background: linear-gradient(135deg, var(--ai-navy), #2d4a73);
    color: #fff;
    border-radius: 14px 14px 4px 14px;
}

.ai-chat-msg .mini-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.ai-chat-msg.assistant .mini-avatar {
    background: linear-gradient(135deg, var(--ai-gold), #e8c97a);
    color: #1a1204;
}

.ai-chat-msg.user .mini-avatar {
    background: #e2e8f0;
    color: var(--ai-navy);
}

.ai-chat-typing {
    padding: 8px 14px;
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    display: none;
}

.ai-chat-typing.show {
    display: block;
}

.ai-chat-foot {
    padding: 10px 12px 12px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.ai-chat-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.ai-chat-input-row textarea {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    resize: none;
    min-height: 42px;
    max-height: 90px;
    line-height: 1.4;
}

.ai-chat-input-row textarea:focus {
    outline: none;
    border-color: var(--ai-gold);
}

.ai-chat-send {
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ai-navy), var(--ai-gold));
    color: #1a1204;
    cursor: pointer;
    font-size: 16px;
    flex-shrink: 0;
    font-weight: 900;
}

.ai-chat-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-chat-support-link {
    display: block;
    text-align: center;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 800;
    color: var(--ai-navy);
    text-decoration: none;
}

.ai-chat-support-link:hover {
    color: var(--ai-gold);
}

@media (max-width: 480px) {
    #ai-chat-panel {
        right: 12px;
        bottom: 78px;
        width: calc(100vw - 24px);
        max-height: calc(100vh - 100px);
    }
    #ai-chat-toggle {
        right: 12px;
        bottom: 14px;
        padding: 11px 14px;
        font-size: 12px;
    }
}
