/* =============================================
   SHIV GANGE — CHATBOT WIDGET STYLES
   ============================================= */

/* Floating trigger button */
.sg-chat-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #1c2a59, #2a3f83);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 6px 24px rgba(28,42,89,0.45);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s;
    border: none;
    animation: sgPulseRing 2s infinite;
}
.sg-chat-btn:hover {
    transform: scale(1.1);
    animation: none; /* Pause pulse on hover */
    box-shadow: 0 10px 32px rgba(28,42,89,0.55);
}
@keyframes sgPulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7), 0 6px 24px rgba(28,42,89,0.45);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(74, 222, 128, 0), 0 6px 24px rgba(28,42,89,0.45);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0), 0 6px 24px rgba(28,42,89,0.45);
    }
}
.sg-chat-btn i {
    color: #fff;
    font-size: 22px;
    transition: transform 0.2s;
}
.sg-chat-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    border: 2px solid #fff;
    animation: sgBadgePop 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes sgBadgePop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* Chat window */
.sg-chatbot-window {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 360px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.14), 0 4px 16px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    z-index: 9998;
    overflow: hidden;
    transform: scale(0.85) translateY(16px);
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.25s;
    font-family: 'Poppins', sans-serif;
    max-height: 540px;
}
.sg-chatbot-window.sg-open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.sg-chat-header {
    background: linear-gradient(135deg, #1c2a59 0%, #2a3f83 100%);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.sg-chat-header-left {
    display: flex;
    align-items: center;
    gap: 11px;
}
.sg-chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.25);
    flex-shrink: 0;
}
.sg-chat-avatar i {
    color: #fff;
    font-size: 16px;
}
.sg-chat-name {
    color: #fff;
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1.3;
}
.sg-chat-sub {
    color: rgba(255,255,255,0.65);
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 1px;
}
.sg-online-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: sgDotPulse 1.8s infinite;
}
@keyframes sgDotPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.35; }
}
.sg-chat-close {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.sg-chat-close:hover { background: rgba(255,255,255,0.28); }

/* Messages area */
.sg-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f8fafc;
    min-height: 220px;
    max-height: 360px;
    scroll-behavior: smooth;
}
.sg-chat-messages::-webkit-scrollbar { width: 3px; }
.sg-chat-messages::-webkit-scrollbar-track { background: transparent; }
.sg-chat-messages::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 2px; }

/* Bot message row */
.sg-msg-bot-row {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    align-self: flex-start;
    max-width: 88%;
    animation: sgFadeUp 0.25s ease;
}
@keyframes sgFadeUp {
    from { opacity:0; transform: translateY(8px); }
    to   { opacity:1; transform: translateY(0); }
}
.sg-msg-bot-icon {
    width: 26px;
    height: 26px;
    background: #1c2a59;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sg-msg-bot-icon i { color:#fff; font-size:11px; }
.sg-msg-bot-bubble {
    background: #fff;
    color: #1e293b;
    padding: 9px 13px;
    border-radius: 16px 16px 16px 4px;
    font-size: 13px;
    line-height: 1.55;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

/* User message */
.sg-msg-user {
    align-self: flex-end;
    background: #1c2a59;
    color: #fff;
    padding: 9px 13px;
    border-radius: 16px 16px 4px 16px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 78%;
    animation: sgFadeUp 0.2s ease;
}

/* Typing indicator */
.sg-typing-row {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    align-self: flex-start;
}
.sg-typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #fff;
    border-radius: 16px 16px 16px 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.sg-typing-dots span {
    width: 7px;
    height: 7px;
    background: #94a3b8;
    border-radius: 50%;
    animation: sgTypeBounce 1.2s infinite;
}
.sg-typing-dots span:nth-child(2) { animation-delay: 0.18s; }
.sg-typing-dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes sgTypeBounce {
    0%,60%,100% { transform:translateY(0); opacity:0.5; }
    30%          { transform:translateY(-5px); opacity:1; }
}

/* Quick reply buttons */
.sg-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 4px 0 6px 33px;
    align-self: flex-start;
    max-width: 100%;
    animation: sgFadeUp 0.3s ease;
}
.sg-qr-btn {
    background: #fff;
    border: 1.5px solid #1c2a59;
    color: #1c2a59;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}
.sg-qr-btn:hover {
    background: #1c2a59;
    color: #fff;
}
.sg-qr-btn:disabled {
    pointer-events: none;
    opacity: 0.4;
}

/* WhatsApp CTA button (inside messages) */
.sg-wa-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #25d366;
    color: #fff !important;
    border: none;
    padding: 10px 20px;
    border-radius: 22px;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
}
.sg-wa-action-btn:hover {
    background: #20b859;
    transform: translateY(-1px);
}

/* Text input bar */
.sg-chat-input-bar {
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #e8edf2;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}
.sg-text-input {
    flex: 1;
    height: 40px;
    padding: 0 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    outline: none;
    background: #f8fafc;
    color: #1e293b;
    transition: border-color 0.2s, background 0.2s;
}
.sg-text-input:focus {
    border-color: #1c2a59;
    background: #fff;
}
.sg-send-btn {
    width: 40px;
    height: 40px;
    background: #1c2a59;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}
.sg-send-btn:hover {
    background: #2a3f83;
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 480px) {
    .sg-chatbot-window {
        width: calc(100vw - 20px);
        right: 10px;
        left: 10px;
        bottom: 86px;
        max-height: 480px;
        border-radius: 14px;
    }
    .sg-chat-btn {
        right: 14px;
        bottom: 14px;
        width: 52px;
        height: 52px;
    }
    .sg-chat-btn i {
        font-size: 20px;
    }
    /* Stack the chat window wider on small phones */
    .sg-chat-messages {
        max-height: 280px;
    }
}
@media (max-width: 360px) {
    .sg-chat-name {
        font-size: 12.5px;
    }
    .sg-chat-sub {
        font-size: 10px;
    }
    .sg-msg-bot-bubble,
    .sg-msg-user {
        font-size: 12px;
    }
    .sg-qr-btn {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* =============================================
   MOBILE NAVIGATION DRAWER STYLES
   ============================================= */

/* Ensure mobile button shows properly on responsive screens */
@media (max-width: 992px) {
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: #f1f5f9;
        color: #1c2a59;
        border: none;
        cursor: pointer;
        transition: background 0.2s;
        padding: 0;
        margin-left: 10px;
    }
    .mobile-menu-btn:hover {
        background: #e2e8f0;
    }
}

/* Drawer overlay */
.sg-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.sg-drawer-overlay.sg-open {
    opacity: 1;
    pointer-events: all;
}

/* Sliding Drawer panel */
.sg-mobile-drawer {
    position: fixed;
    top: 0;
    right: -290px;
    width: 290px;
    height: 100%;
    background: #ffffff;
    z-index: 100000;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Poppins', sans-serif;
    transform: translateX(0);
}
.sg-mobile-drawer.sg-open {
    transform: translateX(-290px);
}

/* Header inside drawer */
.sg-drawer-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sg-drawer-logo {
    height: 38px;
    width: auto;
}
.sg-drawer-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.sg-drawer-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Links body */
.sg-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 20px;
}

.sg-drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sg-drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: 8px;
    color: #475569;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.sg-drawer-link:hover, .sg-drawer-link.active {
    background: #f1f5f9;
    color: #1c2a59;
}

/* Dropdown Container */
.sg-drawer-dropdown {
    display: flex;
    flex-direction: column;
}
.sg-drawer-dropdown-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    color: #475569;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s;
}
.sg-drawer-dropdown-btn:hover {
    background: #f1f5f9;
    color: #1c2a59;
}
.sg-drawer-dropdown-btn i {
    font-size: 11px;
    transition: transform 0.2s;
}
.sg-drawer-dropdown-btn.sg-open i {
    transform: rotate(180deg);
}

/* Dropdown list items */
.sg-drawer-dropdown-content {
    display: none;
    flex-direction: column;
    padding-left: 20px;
    margin-top: 4px;
    border-left: 2px solid #e2e8f0;
    margin-left: 20px;
    gap: 4px;
}
.sg-drawer-dropdown-content.sg-show {
    display: flex;
}
.sg-drawer-sublink {
    padding: 8px 12px;
    border-radius: 6px;
    color: #64748b;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}
.sg-drawer-sublink:hover {
    background: #f8fafc;
    color: #1c2a59;
}

/* Bottom info panel in drawer */
.sg-drawer-footer {
    padding: 20px;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}
.sg-drawer-contact-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}
.sg-drawer-phone {
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
}
.sg-drawer-phone i {
    color: #d97706;
}
.sg-drawer-rera {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #64748b;
    line-height: 1.4;
    margin-top: 12px;
    background: #ffffff;
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}
.sg-drawer-rera i {
    color: #d97706;
    font-size: 11px;
}
