/* =========================
   AI STRATEGY MENTOR UI
   ========================= */

:root {
    --ai-primary: #0B3C5D; /* Navy */
    --ai-accent: #facc15;  /* Gold */
    --ai-bg: #ffffff;
    --ai-text: #0f172a;
    --ai-bubble-size: 60px;
}

/* Floating Trigger */
#ai-mentor-trigger {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: var(--ai-bubble-size);
    height: var(--ai-bubble-size);
    background: var(--ai-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(11, 60, 93, 0.4);
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid white;
}

#ai-mentor-trigger:hover {
    transform: scale(1.1);
}

#ai-mentor-trigger .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--ai-accent);
    color: var(--ai-primary);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}

/* Chat Window */
#ai-chat-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 380px;
    max-width: calc(100vw - 50px);
    height: 550px;
    max-height: calc(100vh - 150px);
    background: var(--ai-bg);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    transform-origin: bottom right;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Header */
.ai-header {
    background: var(--ai-primary);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--ai-accent);
}

.ai-header-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff; /* Explicitly white */
}

.ai-header-info span {
    font-size: 0.75rem;
    color: #ffffff; /* Explicitly white */
    opacity: 0.9;
}

.ai-close {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.ai-close:hover { opacity: 1; }

/* Messages Area */
#ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8fafc;
}

.msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.msg.ai {
    background: white;
    color: var(--ai-text);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.msg.user {
    background: var(--ai-primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

/* Typing Indicator */
.typing {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 5px;
    display: none;
}

/* Footer / Input */
.ai-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

#ai-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

#ai-input:focus {
    border-color: var(--ai-primary);
}

#ai-send {
    background: var(--ai-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* WhatsApp Integration Style */
.wa-container {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.wa-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: white !important;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    animation: wa-pulse 2s infinite;
}

.wa-btn:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.wa-btn i {
    font-size: 1.2rem;
}

@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}
