/* chatbot.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;600&display=swap');

:root {
    --ai-oliver-primary: #0a0a0a;
    --ai-oliver-accent: #d4af37; /* Gold accent */
    --ai-oliver-accent-rgb: 212, 175, 55;
    --ai-oliver-bg: #fffcf5;
    --ai-oliver-text: #1a1a1a;
    --ai-oliver-glass: rgba(255, 255, 255, 0.95);
    --ai-oliver-shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
    --ai-oliver-shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
}

#ai-oliver-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    font-family: 'Inter', sans-serif;
    perspective: 1000px;
}

/* Floating Bubble */
.ai-oliver-bubble {
    width: 65px;
    height: 65px;
    background: #c9a84c; /* Specific Gold requested */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(201, 168, 76, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border: none;
}

.ai-oliver-bubble:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 15px 35px rgba(201, 168, 76, 0.5);
}

.ai-oliver-bubble svg {
    width: 32px;
    height: 32px;
    color: #000; /* Black icon requested */
}

/* Chat Window */
.ai-oliver-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 400px;
    height: 650px;
    max-height: calc(100vh - 150px);
    background: var(--ai-oliver-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    box-shadow: var(--ai-oliver-shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) rotateX(-10deg);
    transform-origin: bottom right;
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.ai-oliver-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) rotateX(0);
}

/* Header */
.ai-oliver-header {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    color: white;
    padding: 16px 20px; /* Reduced from 24px */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(var(--ai-oliver-accent-rgb), 0.1);
}

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

.ai-oliver-avatar {
    width: 36px; /* Reduced from 44px */
    height: 36px;
    background: linear-gradient(135deg, #d4af37 0%, #f1d592 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #000;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
    font-size: 13px;
}

.ai-oliver-header-text h3 {
    margin: 0;
    font-size: 16px; /* Slightly smaller */
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    color: #fff;
}

.ai-oliver-header-text p {
    margin: 0;
    font-size: 12px; /* Slightly smaller */
    opacity: 0.6;
    font-weight: 400;
}

.ai-oliver-close {
    width: 28px; /* Reduced from 32px */
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ai-oliver-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

/* Messages Area */
.ai-oliver-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px; /* Reduced from 24px */
    display: flex;
    flex-direction: column;
    gap: 12px; /* Reduced from 18px */
    background: radial-gradient(circle at top right, rgba(var(--ai-oliver-accent-rgb), 0.05), transparent);
}

/* Custom Scrollbar */
.ai-oliver-messages::-webkit-scrollbar {
    width: 5px;
}
.ai-oliver-messages::-webkit-scrollbar-track {
    background: transparent;
}
.ai-oliver-messages::-webkit-scrollbar-thumb {
    background: rgba(var(--ai-oliver-accent-rgb), 0.2);
    border-radius: 10px;
}

.ai-oliver-msg {
    max-width: 88%;
    padding: 10px 14px; /* Reduced from 14px 18px */
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: msgIn 0.4s ease-out forwards;
}

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

.ai-oliver-msg.bot {
    align-self: flex-start;
    background: white;
    color: var(--ai-oliver-text);
    border-bottom-left-radius: 4px;
    box-shadow: var(--ai-oliver-shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.ai-oliver-msg.user {
    align-self: flex-end;
    background: var(--ai-oliver-primary);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ai-oliver-msg strong {
    color: var(--ai-oliver-accent);
    font-weight: 600;
}

/* Escalation Button */
.ai-oliver-escalate-btn {
    margin-top: 10px;
    background: linear-gradient(135deg, #d4af37 0%, #f1d592 100%);
    color: #000;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 13px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2);
}

.ai-oliver-escalate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
}

/* Input Area */
.ai-oliver-input-area {
    padding: 16px; /* Reduced from 24px */
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
    align-items: center;
}

.ai-oliver-input {
    flex: 1;
    border: 1.5px solid rgba(0, 0, 0, 0.05);
    border-radius: 14px;
    padding: 10px 16px; /* Reduced from 14px 20px */
    font-size: 14px;
    outline: none;
    transition: all 0.3s;
    background: #f9f9f9;
}

.ai-oliver-input:focus {
    border-color: var(--ai-oliver-accent);
    background: white;
    box-shadow: 0 0 0 4px rgba(var(--ai-oliver-accent-rgb), 0.1);
}

.ai-oliver-send {
    background: var(--ai-oliver-primary);
    color: white;
    border: none;
    width: 40px; /* Reduced from 48px */
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.ai-oliver-send:hover {
    transform: scale(1.05) translateY(-2px);
    background: #000;
}

/* Typing Indicator */
.ai-oliver-typing {
    display: flex;
    gap: 5px;
    padding: 8px 12px;
    background: transparent;
    border-radius: 12px;
    width: fit-content;
}

.ai-oliver-typing span {
    width: 8px;
    height: 8px;
    background: var(--ai-oliver-accent);
    border-radius: 50%;
    opacity: 0.3;
    animation: typing 1.4s infinite ease-in-out;
}

.ai-oliver-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-oliver-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(-5px); opacity: 0.8; }
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #ai-oliver-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .ai-oliver-window {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
    }
}
