#gemini-chatbot-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 2000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#chatbot-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #e67e22;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(230, 126, 34, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chatbot-toggle-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 12px 28px rgba(230, 126, 34, 0.4);
}

#chatbot-toggle-btn svg {
    width: 28px;
    height: 28px;
}

#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 360px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
    border: 1px solid rgba(0,0,0,0.05);
}

#chatbot-window.hidden {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(20px);
    pointer-events: none;
}

#chatbot-header {
    background: #e67e22;
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.header-info h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header-info span {
    font-size: 0.8rem;
    opacity: 0.85;
    display: block;
    margin-top: 2px;
}

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

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

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

.header-actions button svg {
    width: 18px;
    height: 18px;
}

#chatbot-messages {
    flex: 1;
    min-height: 0;
    padding: 20px;
    overflow-y: auto !important;
    overscroll-behavior: contain; /* Prevents background page scroll */
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fcfcfc;
    scrollbar-width: thin;
    scrollbar-color: #e67e22 #f1f2f6;
}

#chatbot-messages::-webkit-scrollbar { width: 5px; }
#chatbot-messages::-webkit-scrollbar-track { background: transparent; }
#chatbot-messages::-webkit-scrollbar-thumb { background: #eee; border-radius: 10px; }
#chatbot-messages::-webkit-scrollbar-thumb:hover { background: #ddd; }

.message {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    font-size: 14.5px;
    line-height: 1.5;
    animation: slideUp 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    word-wrap: break-word;
}

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

.bot-message {
    background: #f1f2f6;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: #2f3542;
    margin-right: 40px;
}

.user-message {
    background: #e67e22;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.2);
}

.tts-btn {
    position: absolute;
    right: -35px;
    bottom: 0;
    background: white;
    border: 1px solid #eee;
    color: #e67e22;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.bot-message:hover .tts-btn { opacity: 1; }
.tts-btn:hover { transform: scale(1.1); background: #fff9e6; }
.tts-btn svg { width: 14px; height: 14px; }

.message a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

#chatbot-quick-replies {
    padding: 0 20px 15px;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    background: #fcfcfc;
    flex-shrink: 0;
}

#chatbot-quick-replies::-webkit-scrollbar { display: none; }

.quick-reply {
    background: white;
    border: 1px solid #e67e22;
    color: #e67e22;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(230, 126, 34, 0.1);
}

.quick-reply:hover {
    background: #e67e22;
    color: white;
    transform: translateY(-1px);
}

.message b, .message strong { font-weight: 700; }
.message ul { margin: 8px 0; padding-left: 20px; }
.message li { margin-bottom: 4px; }

#chatbot-input-area {
    padding: 20px;
    border-top: 1px solid #f1f1f1;
    display: flex;
    gap: 12px;
    background: white;
    flex-shrink: 0;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #e1e1e1;
    padding: 12px 16px;
    border-radius: 12px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

#chatbot-input:focus { border-color: #e67e22; }

#chatbot-send-btn {
    background: #e67e22;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}

#chatbot-send-btn:hover { background: #cf6d17; }

.typing {
    display: flex;
    gap: 4px;
    padding: 12px 18px !important;
    width: fit-content;
    align-self: flex-start;
}

.typing span {
    width: 6px;
    height: 6px;
    background: #e67e22;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing span:nth-child(1) { animation-delay: -0.32s; }
.typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

@keyframes pulse-btn {
    0% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(230, 126, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0); }
}

#chatbot-toggle-btn.pulse { animation: pulse-btn 2s infinite; }
