:root {
    --chat-primary: #FF9933; /* Saffron from the logo */
    --chat-secondary: #13294B; /* Navy from the logo */
    --chat-bg: rgba(255, 255, 255, 0.95);
    --chat-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Chatbot Trigger Button */
.chatbot-trigger {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: var(--chat-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 5px 15px rgba(255, 153, 51, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-trigger:hover {
    transform: scale(1.1) rotate(5deg);
}

.chatbot-trigger i {
    width: 28px;
    height: 28px;
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 380px;
    height: 550px;
    background: var(--chat-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: var(--chat-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

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

.chat-header-info h4 {
    margin: 0;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
}

.chat-header-info p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.8;
}

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

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

/* Messages Area */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: var(--chat-primary) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--chat-primary);
    border-radius: 10px;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    animation: messageIn 0.3s ease-out;
}

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

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

.message.ai {
    align-self: flex-start;
    background: #f0f2f5;
    color: var(--chat-secondary);
    border-bottom-left-radius: 2px;
}

.message.system {
    align-self: center;
    background: transparent;
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px;
}

/* Input Area */
.chat-input-area {
    padding: 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
    display: flex;
    gap: 10px;
    background: white;
}

.chat-input {
    flex: 1;
    border: 1.5px solid #edf2f7;
    border-radius: 12px;
    padding: 10px 15px;
    outline: none;
    transition: border-color 0.2s;
}

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

.chat-send {
    background: var(--chat-primary);
    color: white;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.chat-send:hover {
    transform: scale(1.05);
}

.chat-send:active {
    transform: scale(0.95);
}

/* Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 5px;
}

.typing span {
    width: 6px;
    height: 6px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}

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

@keyframes typing {
    from { opacity: 0.3; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1.2); }
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .chat-window {
        right: 15px;
        left: 15px;
        width: auto;
        bottom: 90px;
        height: 70vh;
    }
}
