/* Dashbot Widget CSS */
/* Ask the City Bubble */
.ask-city-bubble {
    position: fixed;
    bottom: 120px;
    right: 30px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    z-index: 1002;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    animation: bounceIn 0.6s ease-out;
}

.ask-city-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.4);
}

.ask-city-bubble.hidden {
    display: none;
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.bubble-icon {
    font-size: 18px;
    animation: pulse-icon 2s infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Floating Chat Button */
.chat-toggle-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    font-size: 24px;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.4);
}

.chat-toggle-btn.active {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

/* Floating Chat Container */
.floating-chat-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 320px;
    height: 420px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    animation: slideInUp 0.3s ease-out;
}

.floating-chat-container.show {
    display: flex;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-header {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: white;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
}

.chat-header h1 {
    font-size: 16px;
    font-weight: 600;
    margin-left: 8px;
}

.chat-header-icon {
    font-size: 20px;
}

.minimize-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.minimize-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== NEW: Language Switcher Styles ===== */
.language-switcher {
    background: #f8f9fa;
    padding: 10px 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.language-switcher-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

.language-toggle {
    display: flex;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    overflow: hidden;
}

.language-option {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    color: #6c757d;
}

.language-option.active {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.language-option:hover:not(.active) {
    background: #f8f9fa;
}

.language-alert {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 12px;
    color: #856404;
}
/* ===== END: Language Switcher Styles ===== */

.chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f8f9fa;
    scroll-behavior: smooth;
}

.message {
    margin-bottom: 12px;
    animation: fadeInUp 0.3s ease;
}

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

.message.user {
    display: flex;
    justify-content: flex-end;
}

.message.bot {
    display: flex;
    justify-content: flex-start;
}

.message-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 15px;
    word-wrap: break-word;
    position: relative;
    line-height: 1.4;
    font-size: 13px;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot .message-bubble {
    background: white;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message-bubble .location-info {
    margin: 6px 0;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #007bff;
}

.message-bubble .parking-spot {
    font-weight: 600;
    color: #495057;
    margin-bottom: 3px;
    font-size: 13px;
}

.message-bubble .free-spaces {
    color: #28a745;
    font-weight: 600;
    font-size: 13px;
}

.message-bubble .follow-up {
    margin-top: 12px;
    font-style: italic;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
    padding-top: 8px;
    font-size: 13px;
}

.message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.message.bot .message-time {
    text-align: left;
}

.chat-input-container {
    padding: 12px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.chat-input:focus {
    border-color: #007bff;
}

.send-button {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.send-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.send-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.typing-indicator {
    display: none;
    padding: 15px;
    color: #6c757d;
    font-style: italic;
    font-size: 13px;
}

.typing-dots {
    display: inline-flex;
    align-items: center;
}

.typing-dots::after {
    content: '';
    display: inline-block;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #6c757d;
    margin-left: 3px;
    animation: typingDots 1.5s infinite;
}

@keyframes typingDots {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

.welcome-message {
    text-align: center;
    padding: 15px 12px;
    color: #6c757d;
}

.welcome-message h2 {
    margin-bottom: 6px;
    color: #495057;
    font-size: 15px;
}

.welcome-message p {
    font-size: 12px;
    margin-bottom: 12px;
}

.example-questions {
    text-align: left;
}

.example-question {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 6px 10px;
    margin: 5px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 11px;
}

.example-question:hover {
    background: #f8f9fa;
    border-color: #007bff;
    transform: translateX(3px);
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1.2em;
    background: #495057;
    animation: blink 1s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .floating-chat-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 120px);
        right: 10px;
        bottom: 80px;
    }

    .chat-toggle-btn {
        right: 20px;
        bottom: 20px;
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .ask-city-bubble {
        right: 20px;
        bottom: 90px;
        font-size: 13px;
        padding: 10px 16px;
    }

    .message-bubble {
        max-width: 90%;
    }
}

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
