:root {
    --chatbot-primary: #0ea5e9;
    --chatbot-dark: #0f172a;
    --chatbot-navy: #1e293b;
    --chatbot-white: #ffffff;
    --chatbot-gray: #94a3b8;
    --chatbot-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

#chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--chatbot-primary);
    color: var(--chatbot-white);
    border: none;
    cursor: pointer;
    box-shadow: var(--chatbot-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.25s ease, background 0.25s ease;
}
.chatbot-toggle:hover { transform: scale(1.05); background: #0284c7; }
.chatbot-toggle.open { background: #dc2626; }

.chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 340px;
    height: 460px;
    background: var(--chatbot-dark);
    border-radius: 20px;
    box-shadow: var(--chatbot-shadow);
    border: 1px solid rgba(255,255,255,0.08);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.chatbot-window.open { display: flex; }

.chatbot-header {
    background: var(--chatbot-primary);
    color: var(--chatbot-white);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.chatbot-header h4 { font-size: 1rem; margin: 0; }
.chatbot-header span { font-size: 0.75rem; opacity: 0.9; }

.chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-msg {
    max-width: 85%;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
    animation: chatbotFade 0.25s ease;
}
.chatbot-msg.bot {
    align-self: flex-start;
    background: var(--chatbot-navy);
    color: var(--chatbot-white);
    border-bottom-left-radius: 4px;
}
.chatbot-msg.bot a {
    color: #60a5fa;
    text-decoration: underline;
}
.chatbot-msg.bot a:hover { color: #93c5fd; }

.chatbot-input {
    display: flex;
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: var(--chatbot-navy);
}
.chatbot-input input {
    flex: 1;
    padding: 11px 14px;
    border-radius: 50px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: var(--chatbot-white);
    font-size: 0.9rem;
    outline: none;
}
.chatbot-input input::placeholder { color: var(--chatbot-gray); }
.chatbot-input button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--chatbot-primary);
    color: var(--chatbot-white);
    margin-left: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.chatbot-input button:hover { background: #0284c7; }

@keyframes chatbotFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    #chatbot-widget { bottom: 80px; right: 14px; }
    .chatbot-window { bottom: 85px; }
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: 420px;
        right: -5px;
    }
    #chatbot-widget { bottom: 80px; right: 14px; }
    .chatbot-window { bottom: 85px; }
}
