/* ===== CHATBOT – ULTRA‑MODERN GLASS STYLING ===== */
.chatbot-widget {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 10000;
    font-family: 'Poppins', sans-serif;
}

/* FLOATING TOGGLE BUTTON – WITH PULSE ANIMATION */
.chatbot-toggle {
    width: 64px;
    height: 64px;
    background: linear-gradient(145deg, #162A6B, #0F7CC7);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2), 0 0 0 0 rgba(15,124,199,0.5);
    transition: all 0.25s ease;
    position: relative;
    animation: pulseGlow 2s infinite;
}
.chatbot-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.3);
    animation: none;
}
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(15,124,199,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(15,124,199,0); }
    100% { box-shadow: 0 0 0 0 rgba(15,124,199,0); }
}
.chat-icon, .close-icon {
    font-size: 30px;
    color: white;
    transition: 0.2s;
}
.close-icon {
    display: none;
}

/* CHAT CONTAINER – DEEPER GLASS, BETTER BORDER */
.chatbot-container {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 400px;
    max-width: calc(100vw - 40px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-radius: 32px;
    box-shadow: 0 25px 45px -12px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.3);
    overflow: hidden;
    display: none;
    flex-direction: column;
    transform-origin: bottom right;
    animation: chatPopIn 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
@keyframes chatPopIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* HEADER – SOFTER GRADIENT, BETTER SPACING */
.chatbot-header {
    background: linear-gradient(135deg, #162A6B, #0F7CC7);
    padding: 18px 22px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-left h3 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.2px;
}
.header-left p {
    margin: 0;
    font-size: 0.7rem;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 4px;
}
.header-left p::before {
    content: "●";
    color: #2ecc71;
    font-size: 8px;
}
.chatbot-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}
.chatbot-close-btn:hover {
    background: rgba(255,255,255,0.35);
    transform: rotate(90deg);
}

/* MESSAGES AREA – SMOOTHER SCROLL */
.chatbot-messages {
    height: 340px;
    overflow-y: auto;
    padding: 20px;
    background: #F8FAFE;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}
/* Custom scrollbar */
.chatbot-messages::-webkit-scrollbar {
    width: 5px;
}
.chatbot-messages::-webkit-scrollbar-track {
    background: #E3E8EF;
    border-radius: 10px;
}
.chatbot-messages::-webkit-scrollbar-thumb {
    background: #0F7CC7;
    border-radius: 10px;
}

/* MESSAGE BUBBLES – MODERN, WITH ELEVATION */
.message {
    display: flex;
    margin-bottom: 0;
}
.user-message {
    justify-content: flex-end;
}
.user-message span {
    background: #0F7CC7;
    color: white;
    padding: 12px 16px;
    border-radius: 24px 24px 4px 24px;
    max-width: 85%;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.bot-message {
    justify-content: flex-start;
}
.bot-message span {
    background: white;
    color: #1E293B;
    padding: 12px 16px;
    border-radius: 24px 24px 24px 4px;
    max-width: 85%;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03), 0 1px 0 rgba(0,0,0,0.02);
}
.bot-message span strong {
    color: #162A6B;
}

/* QUICK QUESTIONS – PILLS WITH ICONS */
.chatbot-questions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}
.chat-question {
    background: #EAF4FC;
    border: none;
    padding: 8px 16px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #162A6B;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Poppins', sans-serif;
}
.chat-question i {
    font-size: 0.8rem;
    color: #0F7CC7;
}
.chat-question:hover {
    background: #0F7CC7;
    color: white;
    transform: translateY(-2px);
}
.chat-question:hover i {
    color: white;
}

/* INPUT AREA – MODERN & CLEAN */
.chatbot-input {
    display: flex;
    padding: 14px 18px;
    background: white;
    gap: 12px;
    align-items: center;
}
.chatbot-input input {
    flex: 1;
    padding: 12px 18px;
    border: 1.5px solid #E3E8EF;
    border-radius: 60px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s;
    background: #FFFFFF;
}
.chatbot-input input:focus {
    border-color: #0F7CC7;
    box-shadow: 0 0 0 3px rgba(15,124,199,0.15);
}
.chatbot-input button {
    background: #D7193F;
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.chatbot-input button i {
    font-size: 1.2rem;
}
.chatbot-input button:hover {
    background: #162A6B;
    transform: scale(0.96);
}

/* TYPING INDICATOR */
.bot-message.typing span {
    padding: 14px 20px;
}
.typing-dots {
    display: inline-block;
    letter-spacing: 2px;
    font-weight: 600;
}
.typing-dots::after {
    content: '...';
    animation: typingDots 1.4s infinite;
}
@keyframes typingDots {
    0% { content: '.'; }
    33% { content: '..'; }
    66% { content: '...'; }
    100% { content: '.'; }
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100vw - 30px);
        right: -12px;
        bottom: 75px;
    }
    .chatbot-messages {
        height: 280px;
    }
    .chatbot-toggle {
        width: 56px;
        height: 56px;
    }
    .chat-icon, .close-icon {
        font-size: 26px;
    }
}
.chatbot-header,
.chatbot-header .header-left h3,
.chatbot-header .header-left p,
.chatbot-header .header-left i {
    color: white !important;
}

.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-size: 24px;
    transition: all 0.3s;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

/* IMPORTANT: Container hidden by default */
.chatbot-container {
    display: none; /* ← YEH ADD KARO */
    flex-direction: column;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    margin-bottom: 15px;
}

.chatbot-container.active {
    display: flex; /* ← YEH ADD KARO */
}

.chatbot-header {
    background: #2563eb;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.bot-message {
    background: #f1f5f9;
    color: #333;
    align-self: flex-start;
}

.user-message {
    background: #2563eb;
    color: white;
    align-self: flex-end;
}

.chatbot-questions {
    padding: 10px 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-top: 1px solid #e2e8f0;
}

.chat-question {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-question:hover {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.chatbot-input {
    display: flex;
    padding: 15px;
    gap: 10px;
    border-top: 1px solid #e2e8f0;
}

.chatbot-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    outline: none;
}

.chatbot-input button {
    padding: 10px 20px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
}

.chatbot-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.close-icon {
    display: none;
}