/* ==========================================================================
   ANR AI CHAT CONCIERGE (Google Gemini Powered)
   Museum-Grade Obsidian & Emerald Dark Glassmorphism
   ========================================================================== */

/* Floating Trigger Button */
.anr-ai-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px 12px 14px;
    background: linear-gradient(135deg, #0f172a 0%, #111827 50%, #064e3b 100%);
    border: 1.5px solid rgba(16, 185, 129, 0.55);
    border-radius: 32px;
    color: #ffffff !important;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65), 0 0 15px rgba(16, 185, 129, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.anr-ai-trigger:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.8), 0 0 22px rgba(16, 185, 129, 0.45);
    border-color: #34d399;
}

.anr-ai-trigger-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
    position: relative;
}

.anr-ai-pulse-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #34d399;
    border: 2px solid #111827;
    border-radius: 50%;
    animation: anrPulse 2s infinite;
}

@keyframes anrPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.anr-ai-trigger-label {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    color: #ffffff;
}

/* Chat Container Window */
.anr-ai-window {
    position: fixed;
    bottom: 86px;
    right: 24px;
    width: 390px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 110px);
    background: #111827;
    border: 1.5px solid rgba(16, 185, 129, 0.45);
    border-radius: 24px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 25px rgba(16, 185, 129, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    backdrop-filter: blur(12px);
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.anr-ai-window.anr-ai-open {
    display: flex;
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Header */
.anr-ai-header {
    padding: 16px 20px;
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.anr-ai-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.anr-ai-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.anr-ai-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.anr-ai-subtitle {
    font-size: 0.78rem;
    color: #34d399;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-weight: 600;
}

.anr-ai-subtitle-dot {
    width: 7px;
    height: 7px;
    background: #34d399;
    border-radius: 50%;
    display: inline-block;
}

.anr-ai-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.anr-ai-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Chat Body */
.anr-ai-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #0b0f19;
}

.anr-ai-body::-webkit-scrollbar {
    width: 6px;
}
.anr-ai-body::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

/* Messages */
.anr-ai-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.94rem;
    line-height: 1.45;
    word-break: break-word;
}

.anr-ai-msg-assistant {
    align-self: flex-start;
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 4px;
}

.anr-ai-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Suggestion Chips */
.anr-ai-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 4px;
}

.anr-ai-chip {
    background: #1e293b;
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.anr-ai-chip:hover {
    background: #10b981;
    color: #ffffff;
    border-color: #10b981;
    transform: translateY(-1px);
}

/* Typing Indicator */
.anr-ai-typing {
    display: none;
    align-self: flex-start;
    background: #1e293b;
    padding: 10px 16px;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    gap: 5px;
    align-items: center;
}

.anr-ai-typing.anr-ai-typing-show {
    display: flex;
}

.anr-ai-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: anrWave 1.4s infinite ease-in-out;
}
.anr-ai-dot:nth-child(2) { animation-delay: 0.2s; }
.anr-ai-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes anrWave {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* Input Area */
.anr-ai-footer {
    padding: 12px 14px;
    background: #111827;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.anr-ai-input-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.anr-ai-input {
    flex: 1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}

.anr-ai-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.anr-ai-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transition: transform 0.15s;
}

.anr-ai-send-btn:hover {
    transform: scale(1.05);
}

.anr-ai-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.anr-ai-footer-note {
    font-size: 0.76rem;
    color: #64748b;
    text-align: center;
    margin-top: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.anr-ai-footer-note a {
    color: #25D366 !important;
    text-decoration: none;
    font-weight: 700;
}
