/* Luminous Chatbot Styles */
:root {
    --chat-bg: rgba(15, 23, 42, 0.85);
    --chat-glass: rgba(255, 255, 255, 0.1);
    --chat-primary: #d42426;
    /* Christmas Red */
    --chat-accent: #f59e0b;
    /* Gold */
    --chat-text: #f8fafc;
}

/* Floating Toggle Button */
.chatbot-toggler {
    position: fixed;
    bottom: 30px;
    right: 35px;
    outline: none;
    border: none;
    height: 60px;
    width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--chat-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
    box-shadow: 0 0 15px rgba(212, 36, 38, 0.6);
}

.chatbot-toggler span {
    color: #fff;
    position: absolute;
    font-size: 1.5rem;
}

.chatbot-toggler span:last-child,
body.show-chatbot .chatbot-toggler span:first-child {
    opacity: 0;
}

body.show-chatbot .chatbot-toggler span:last-child {
    opacity: 1;
}

.chatbot-toggler:hover {
    transform: scale(1.1);
}

body.show-chatbot .chatbot-toggler {
    transform: rotate(90deg);
}

/* Chatbot Window */
.chatbot {
    position: fixed;
    right: 35px;
    bottom: 100px;
    width: 400px;
    background: var(--chat-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--chat-glass);
    border-radius: 15px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
    transform-origin: bottom right;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

body.show-chatbot .chatbot {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

/* Chat Header */
.chatbot header {
    padding: 16px;
    background: linear-gradient(135deg, var(--chat-primary) 0%, #b91c1c 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.chatbot header .header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot header h2 {
    color: #fff;
    font-size: 1.2rem;
    margin: 0;
    font-family: 'Outfit', sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.chatbot header span {
    color: #fff;
    cursor: pointer;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.chatbot header span:hover {
    transform: rotate(90deg);
}

/* Chat List */
.chatbot .chatbox {
    overflow-y: auto;
    height: 400px;
    padding: 20px 20px 70px;
    scrollbar-width: thin;
    scrollbar-color: var(--chat-accent) transparent;
}

.chatbot .chatbox::-webkit-scrollbar {
    width: 6px;
}

.chatbot .chatbox::-webkit-scrollbar-thumb {
    background: var(--chat-accent);
    border-radius: 3px;
}

.chatbox .chat {
    display: flex;
    list-style: none;
    margin-bottom: 20px;
}

.chatbox .chat p {
    white-space: pre-wrap;
    padding: 12px 16px;
    border-radius: 10px 10px 0 10px;
    max-width: 75%;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Outgoing (User) */
.chatbox .outgoing {
    justify-content: flex-end;
}

.chatbox .outgoing p {
    background: var(--chat-accent);
    color: #0f172a;
    border-radius: 10px 10px 10px 0;
    font-weight: 500;
}

/* Incoming (Bot) */
.chatbox .incoming {
    justify-content: flex-start;
    align-items: flex-end;
}

.chatbox .incoming span {
    width: 32px;
    height: 32px;
    color: #fff;
    align-self: flex-end;
    background: var(--chat-primary);
    text-align: center;
    line-height: 32px;
    border-radius: 4px;
    margin-right: 10px;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.chatbox .incoming p {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbox .incoming p.error {
    color: #ffcccc;
    border-color: #ff3333;
}

/* Input Area */
.chatbot .chat-input {
    background: rgba(15, 23, 42, 0.95);
    position: absolute;
    bottom: 0;
    width: 100%;
    display: flex;
    gap: 5px;
    padding: 10px 20px;
    border-top: 1px solid var(--chat-glass);
}

.chat-input textarea {
    height: 55px;
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    max-height: 180px;
    padding: 15px 15px 15px 0;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    background: transparent;
    color: #fff;
}

.chat-input span {
    align-self: flex-end;
    color: var(--chat-accent);
    cursor: pointer;
    height: 55px;
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    transition: color 0.3s ease;
}

.chat-input span:hover {
    color: #fff;
}

/* Mobile Responsive */
@media (max-width: 490px) {
    .chatbot {
        right: 0;
        bottom: 0;
        height: 100%;
        border-radius: 0;
        width: 100%;
    }

    .chatbot .chatbox {
        height: 90%;
        padding: 25px 15px 100px;
    }

    .chatbot .chat-input {
        padding: 5px 15px;
    }

    .chatbot header {
        padding: 20px;
    }
}