/* Chatbot widget styles */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.chatbot-toggle-btn {
    background: #343a40;
    color: white;
    border: 2px solid white;
    border-radius: 50px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-toggle-btn:hover {
    background: #495057;
    border-color: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chatbot-window {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 350px;
    height: 650px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.show { display: flex; }

.chatbot-header {
    background: #343a40;
    color: white;
    padding: 12px 16px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 1px solid #495057;
}

.chatbot-header-title { display: flex; align-items: center; font-weight: 500; font-size: 14px; font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; }
.chatbot-title { font-size: 14px; font-weight: 500; font-family: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; }

.chatbot-minimize-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chatbot-minimize-btn:hover { background: #495057; }

.chatbot-messages { flex: 1; padding: 20px; overflow-y: auto; background: #f8f9fa; min-height: 0; }
.chatbot-message { margin-bottom: 15px; display: flex; }
.chatbot-bot-message { justify-content: flex-start; }
.chatbot-user-message { justify-content: flex-end; }
.message-content { max-width: 80%; padding: 12px 16px; border-radius: 18px; font-size: 14px; line-height: 1.4; }
.chatbot-bot-message .message-content { background: white; color: #333; border: 1px solid #e9ecef; white-space: pre-wrap; text-align: left; }
.chatbot-bot-message .message-content.no-prewrap { white-space: normal; }
/* reduce default margins inside message content */
.chatbot-bot-message .message-content.no-prewrap p { margin: 0; }
.chatbot-bot-message .message-content.no-prewrap strong { display: inline; }
.chatbot-user-message .message-content { background: #343a40; color: white; }

.chatbot-input-container { padding: 15px 20px; background: white; border-top: 1px solid #e9ecef; flex-shrink: 0; }
.chatbot-input { width: 100%; border: 1px solid #ddd; border-radius: 10px; padding: 10px 15px; font-size: 14px; outline: none; transition: border-color 0.2s; resize: vertical; font-family: inherit; }
.chatbot-input:focus { border-color: #667eea; }
.chatbot-send-btn { background: #343a40; color: white; border: none; border-radius: 4px; padding: 8px 16px; cursor: pointer; transition: background-color 0.2s; }
.chatbot-send-btn:hover { background: #495057; }

.typing-indicator { color: #6c757d; font-style: italic; }
.typing-indicator .dots::after { content: ''; animation: dots 1.5s infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } 100% { content: ''; } }

@media (max-width: 768px) {
    .chatbot-window { width: 300px; height: 520px; }
    .chatbot-widget { bottom: 10px; left: 10px; }
}

/* Login box compact styling */
.chatbot-login-box {
    max-width: 260px;
    padding: 12px 14px;
    border-radius: 12px;
}
.chatbot-login-button {
    display: inline-block;
    background: #007bff;
    color: #fff !important;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    min-width: 0;
}
.chatbot-login-button:hover { background: #0866cf; }

.chatbot-login-inline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    padding: 8px 0;
}

/* Disabled input state with overlay */
.chatbot-input-container { position: relative; }
.chatbot-input-disabled { position: relative; }
.chatbot-disabled-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    /* cover entire input container height */
    top: 0;
    background: rgba(200, 200, 200, 0.35);
    border-radius: 0 0 15px 15px;
    pointer-events: auto; /* block interactions beneath */
    cursor: not-allowed;
}


