/* GSCC Chatbot Design System */
:root {
    --cb-primary: #1d9d74;
    --cb-primary-dark: #157355;
    --cb-bg: rgba(255, 255, 255, 0.98);
    --cb-header-text: #ffffff;
    --cb-user-msg: #1d9d74;
    --cb-bot-msg: #f0f2f5;
    --cb-shadow: 0 12px 28px 0 rgba(0, 0, 0, 0.2), 0 2px 4px 0 rgba(0, 0, 0, 0.1);
    --cb-radius: 18px;
}

.chatbot-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 10000;
    font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
}

.chatbot-button {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--cb-primary);
    box-shadow: 0 4px 15px rgba(29, 157, 116, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid #ffffff;
    color: white;
    padding: 0;
}

.chatbot-button:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 8px 25px rgba(29, 157, 116, 0.6);
}

.chatbot-button img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

.chatbot-window {
    position: absolute;
    bottom: 85px;
    left: 0;
    width: 400px;
    max-width: 90vw;
    height: 600px;
    max-height: 80vh;
    background: var(--cb-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--cb-radius);
    box-shadow: var(--cb-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform-origin: bottom left;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
    opacity: 0;
    transform: scale(0.8) translateY(40px);
}

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

.chatbot-header {
    background: linear-gradient(135deg, var(--cb-primary) 0%, var(--cb-primary-dark) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chatbot-header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bot-avatar-header {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--cb-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.chatbot-header-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.chatbot-header-info span {
    font-size: 11px;
    opacity: 0.9;
    display: block;
    margin-top: 2px;
}

.chatbot-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chatbot-header-actions button {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-header-actions button:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lang-toggle {
    width: auto !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #fdfdfd;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.6;
    position: relative;
    word-wrap: break-word;
}

.message-bot {
    align-self: flex-start;
    background: var(--cb-bot-msg);
    color: #1a1a1b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.message-user {
    align-self: flex-end;
    background: var(--cb-user-msg);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(29, 157, 116, 0.2);
}

.chatbot-loader {
    display: none;
    align-self: flex-start;
    padding: 12px 16px;
    background: var(--cb-bot-msg);
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    font-size: 13px;
    color: #666;
}

.typing-dot {
    height: 6px;
    width: 6px;
    background: #999;
    border-radius: 50%;
    display: inline-block;
    margin-right: 3px;
    animation: typing 1.4s infinite ease-in-out;
}

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

@keyframes typing {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

.chatbot-input-area {
    padding: 18px 20px;
    background: white;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
    align-items: center;
}

.chatbot-input-wrapper {
    flex: 1;
    position: relative;
}

.chatbot-input {
    width: 100%;
    border: 1px solid #e0e0e0;
    padding: 12px 18px;
    border-radius: 25px;
    outline: none;
    font-size: 14.5px;
    background: #f9f9f9;
    transition: all 0.3s;
}

.chatbot-input:focus {
    border-color: var(--cb-primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(29, 157, 116, 0.1);
}

.chatbot-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--cb-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(29, 157, 116, 0.3);
}

.chatbot-send-btn:hover {
    background: var(--cb-primary-dark);
    transform: rotate(-10deg) scale(1.05);
}

.chatbot-send-btn i {
    font-size: 20px;
}

/* Scrollbar Style */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: #dfe3ea;
    border-radius: 10px;
}

/* Health state colors */
.state-online { color: #52c41a; }
.state-offline { color: #ff4d4f; }

/* FAQ Fallback Buttons */
.faq-btn:hover {
    background: #f0fdf4 !important;
    border-color: var(--cb-primary) !important;
    transform: translateX(5px);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.05);
}

.faq-btn:active {
    transform: scale(0.98);
}
