/* ==========================================
   /widget/chat-widget.css - 2 Sure Odds Daily
   Orange/Gold Theme - WhatsApp + Telegram + Live Chat
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==========================================
   MAIN WIDGET CONTAINER
   ========================================== */
.chat-widget {
    position: fixed;
    z-index: 99999999 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
}

.chat-widget.bottom-right {
    bottom: 30px;
    right: 30px;
}

.chat-widget.bottom-left {
    bottom: 30px;
    left: 30px;
}

/* ==========================================
   TELEGRAM BUTTON
   ========================================== */
.telegram-button {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 22px 12px 18px;
    background: #0088cc;
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 136, 204, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    animation: telegramPulse 2s ease-in-out infinite;
    position: relative;
    z-index: 10000;
}

.telegram-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 136, 204, 0.45);
}

.telegram-button:active {
    transform: scale(0.95);
}

.telegram-button .icon-wrapper {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.telegram-button .telegram-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: white;
}

@keyframes telegramPulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(0, 136, 204, 0.35);
    }
    50% {
        box-shadow: 0 4px 24px rgba(0, 136, 204, 0.55), 0 0 40px rgba(0, 136, 204, 0.15);
    }
}

/* ==========================================
   WHATSAPP BUTTON
   ========================================== */
.whatsapp-button {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 22px 12px 18px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    animation: whatsappPulse 2s ease-in-out infinite;
    position: relative;
    z-index: 10000;
}

.whatsapp-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
}

.whatsapp-button:active {
    transform: scale(0.95);
}

.whatsapp-button .icon-wrapper {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.whatsapp-button .whatsapp-text {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    }
    50% {
        box-shadow: 0 4px 24px rgba(37, 211, 102, 0.55), 0 0 40px rgba(37, 211, 102, 0.15);
    }
}

/* ==========================================
   LIVE CHAT BUTTON - ORANGE/GOLD THEME
   ========================================== */
.chat-widget-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 32px;
    border-radius: 60px;
    background: linear-gradient(135deg, #F5A623, #E8871E) !important;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3) !important;
    transition: all 0.3s ease;
    position: relative;
    animation: launcherPulse 2s infinite ease-in-out;
    border: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    z-index: 10000;
    color: white;
}

@keyframes launcherPulse {
    0% { box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3); transform: scale(1); }
    50% { box-shadow: 0 6px 25px rgba(245, 166, 35, 0.5); transform: scale(1.02); }
    100% { box-shadow: 0 4px 15px rgba(245, 166, 35, 0.3); transform: scale(1); }
}

.chat-widget-button .chat-icon i {
    color: white;
    font-size: 22px;
}

.chat-widget-button .chat-button-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.chat-widget-button .chat-online-dot {
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    display: inline-block;
    margin-left: 2px;
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% { 
        opacity: 0.6; 
        transform: scale(0.8);
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    }
}

.chat-widget-button:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4) !important;
}

/* Hide Telegram & WhatsApp when chat is open */
body:has(.chat-window.show) .telegram-button,
body:has(.chat-window.show) .whatsapp-button {
    display: none !important;
}

/* Hide main button when chat is open */
body:has(.chat-window.show) .chat-widget-button {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.3s ease;
}

/* Body lock when chat is open on mobile */
body.chat-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ==========================================
   NOTIFICATION BADGE
   ========================================== */
.chat-notification {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #E63946;
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border: 2px solid white;
    z-index: 1;
}

.notification-count {
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.chat-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: pulse 1.5s infinite;
    z-index: 1000;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* ==========================================
   CHAT WINDOW
   ========================================== */
.chat-window {
    position: absolute;
    bottom: 100px;
    right: 0;
    width: 420px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #FFFFFF;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: none !important;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(245, 166, 35, 0.15);
    z-index: 999999999 !important;
}

.chat-window.show {
    display: flex !important;
}

/* ==========================================
   CHAT HEADER
   ========================================== */
.chat-header {
    background: linear-gradient(135deg, #1A2A2A, #0F2B1F);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(245, 166, 35, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #F5A623;
}

.chat-header-text h3 {
    font-size: 15px;
    font-weight: 600;
    color: white;
    margin-bottom: 3px;
}

.chat-header-text p {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 5px;
}

.online-dot {
    width: 7px;
    height: 7px;
    background: #06D6A0;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.chat-header-actions {
    display: flex;
    gap: 12px;
}

.chat-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.chat-close:hover {
    background: rgba(245, 166, 35, 0.2);
    transform: scale(1.05);
}

/* ==========================================
   MESSAGES AREA
   ========================================== */
.chat-messages-area {
    flex: 1 !important;
    overflow-y: auto !important;
    width: 100% !important;
    padding: 16px 16px 0px 16px !important;
    background: #F8F9FA;
}

#messagesList {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-bottom: 30px !important;
}

.message {
    display: flex;
    margin-bottom: 12px;
    width: 100%;
    animation: fadeIn 0.3s ease;
}

.message.user {
    justify-content: flex-end;
}

.message.support {
    justify-content: flex-start;
}

.message-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: #056162 !important;
    color: #FFFFFF;
    border-radius: 18px 18px 4px 18px;
}

.message.support .message-bubble {
    background: #2D3748 !important;
    color: #FFFFFF !important;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.message-text {
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-text a {
    color: #F5A623;
    text-decoration: underline;
}

.message-time {
    font-size: 9px;
    margin-top: 5px;
    opacity: 0.7;
}

.date-divider {
    text-align: center;
    margin: 15px 0;
    position: relative;
}

.date-divider span {
    background: #E2E8F0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    color: #64748B;
}

.no-messages {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.no-messages i {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 12px;
}

.no-messages p {
    font-size: 13px;
    margin: 0;
}

/* ==========================================
   INPUT AREA
   ========================================== */
.chat-input-area {
    border-top: 1px solid #E2E8F0;
    background: white;
    flex-shrink: 0;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 16px;
    background: white;
}

.textarea-container {
    flex: 1;
    position: relative;
}

#chatMessageInput {
    width: 100%;
    border: 2px solid #eef2f6;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    min-height: 40px;
    transition: all 0.2s;
    background: #f8fafc;
}

#chatMessageInput:focus {
    outline: none;
    border-color: #0F2B1F;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(15, 43, 31, 0.15);
}

.send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5A623, #E8871E) !important;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(245, 166, 35, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

.chat-footer {
    padding: 8px 16px;
    text-align: center;
    font-size: 10px;
    color: #94a3b8;
    border-top: 1px solid #eef2f6;
    background: white;
}

.chat-footer i {
    margin-right: 4px;
}

/* ==========================================
   TYPING INDICATOR
   ========================================== */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    background: #2D3748;
    border-radius: 18px;
    width: fit-content;
    margin-top: 10px;
    color: white;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #94A3B8;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

.typing-text {
    margin-left: 8px;
    font-size: 11px;
    color: #94A3B8;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
.widget-toast {
    position: fixed;
    bottom: 100px;
    right: 20px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    z-index: 100000;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInOut 3s ease forwards;
}

.widget-toast.success {
    background: #10b981;
    color: white;
}

.widget-toast.error {
    background: #ef4444;
    color: white;
}

.widget-toast.info {
    background: #F5A623;
    color: white;
}

@keyframes slideInOut {
    0% { opacity: 0; transform: translateX(100%); }
    10% { opacity: 1; transform: translateX(0); }
    90% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100%); }
}

/* ==========================================
   SCROLLBAR
   ========================================== */
.chat-messages-area::-webkit-scrollbar {
    width: 5px;
}

.chat-messages-area::-webkit-scrollbar-track {
    background: #E2E8F0;
    border-radius: 10px;
}

.chat-messages-area::-webkit-scrollbar-thumb {
    background: #F5A623;
    border-radius: 10px;
}

.chat-messages-area::-webkit-scrollbar-thumb:hover {
    background: #E8871E;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   ENGAGEMENT MODAL - ORANGE/GOLD THEME
   ========================================== */

.engagement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999 !important;
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
}

.engagement-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    animation: modalFadeIn 0.3s ease forwards;
    z-index: 9999998 !important;
}

.engagement-modal-container {
    position: relative;
    background: white;
    border-radius: 24px;
    width: 380px;
    margin-right: 30px;
    margin-bottom: 95px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
    z-index: 9999999 !important;
    animation: modalSlideUpDesktop 0.4s ease forwards;
}

.engagement-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0F2B1F;
    font-size: 16px;
    transition: all 0.2s;
    z-index: 1;
}

.engagement-modal-close:hover {
    background: rgba(245, 166, 35, 0.1);
    transform: scale(1.05);
}

.engagement-modal-content {
    padding: 32px 28px 24px;
    text-align: center;
}

.engagement-modal-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(245, 166, 35, 0.2), rgba(232, 135, 30, 0.15)) !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.engagement-modal-icon i {
    font-size: 32px;
    color: #F5A623 !important;
}

.engagement-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #0F2B1F !important;
    margin-bottom: 10px;
}

.engagement-modal-text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 20px;
}

.engagement-modal-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.feature-item i {
    font-size: 20px;
    color: #F5A623 !important;
}

.feature-item span {
    font-size: 11px;
    font-weight: 500;
    color: #0F2B1F;
}

/* ==========================================
   ENGAGEMENT MODAL BUTTONS
   ========================================== */
.engagement-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    width: 100%;
}

/* TOP ROW: Telegram + WhatsApp side by side */
.modal-top-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.modal-top-row .engagement-modal-btn {
    flex: 1;
    min-width: 0;
}

/* BOTTOM ROW: Live Chat full width */
.engagement-modal-btn.full-width {
    width: 100%;
    flex: none;
}

.engagement-modal-btn {
    padding: 12px 10px;
    border: none;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 44px;
}

.modal-telegram-btn {
    background: #0088cc !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3) !important;
}

.modal-telegram-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4) !important;
}

.modal-telegram-btn i {
    color: white !important;
}

.modal-telegram-btn:active {
    transform: scale(0.97);
}

.modal-whatsapp-btn {
    background: #25D366;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.modal-whatsapp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.modal-whatsapp-btn:active {
    transform: scale(0.97);
}

/* ==========================================
   LIVE CHAT BUTTON - ORANGE/GOLD THEME
   ========================================== */
.modal-livechat-btn {
    color: white !important;
    box-shadow: 0 4px 12px rgba(245, 166, 35, 0.3) !important;
    background: linear-gradient(135deg, #F5A623, #E8871E) !important;
}

.modal-livechat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 166, 35, 0.4) !important;
}

.modal-livechat-btn:active {
    transform: scale(0.97);
}

.engagement-modal-btn i {
    font-size: 15px;
}

.engagement-modal-footer {
    font-size: 11px;
    color: #94a3b8;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUpDesktop {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalBottomSheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ==========================================
   RESPONSIVE - MOBILE
   ========================================== */

@media (max-width: 768px) {
    .chat-widget.bottom-right,
    .chat-widget.bottom-left {
        bottom: 80px !important;
        right: 16px !important;
        gap: 12px !important;
    }

    .telegram-button {
        padding: 10px 18px 10px 14px !important;
        font-size: 0.75rem !important;
    }

    .telegram-button .icon-wrapper {
        width: 28px !important;
        height: 28px !important;
        font-size: 1rem !important;
    }

    .telegram-button .telegram-text {
        font-size: 0.75rem !important;
    }

    .whatsapp-button {
        padding: 10px 18px 10px 14px !important;
        font-size: 0.75rem !important;
    }

    .whatsapp-button .icon-wrapper {
        width: 28px !important;
        height: 28px !important;
        font-size: 1rem !important;
    }

    .whatsapp-button .whatsapp-text {
        font-size: 0.75rem !important;
    }

    .chat-widget-button {
        padding: 12px 24px !important;
    }

    .chat-widget-button .chat-button-text {
        font-size: 14px !important;
    }

    .chat-widget-button .chat-icon i {
        font-size: 18px !important;
    }

    .chat-window {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        display: none !important;
        flex-direction: column !important;
        overflow: hidden !important;
        z-index: 999999999 !important;
    }

    .chat-window.show {
        display: flex !important;
    }

    .chat-messages-area {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        padding: 14px !important;
    }

    .chat-input-area {
        flex-shrink: 0 !important;
        padding-bottom: 12px !important;
    }

    .input-wrapper {
        padding: 10px 14px !important;
        padding-bottom: 18px !important;
    }

    .send-btn {
        width: 42px !important;
        height: 42px !important;
    }

    #chatMessageInput {
        font-size: 16px !important;
        padding: 12px 16px !important;
    }

    .message-bubble {
        max-width: 85% !important;
        padding: 10px 14px !important;
    }

    .message-text {
        font-size: 14px !important;
    }

    /* Mobile Modal - Bottom Sheet */
    .engagement-modal {
        z-index: 999999999 !important;
    }
    
    .engagement-modal-overlay {
        z-index: 999999998 !important;
    }

    .engagement-modal-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0px 0px 0px !important;
        border-radius: 24px 24px 0px 0px !important;
        animation: modalBottomSheetUp 0.4s ease forwards !important;
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        margin-bottom: 0 !important;
        z-index: 999999999 !important;
    }

    .engagement-modal-container::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background-color: #cbd5e1;
        border-radius: 2px;
    }

    .engagement-modal-content {
        padding: 30px 20px 20px !important;
    }

    .engagement-modal-title {
        font-size: 20px !important;
    }

    .engagement-modal-features {
        gap: 14px !important;
        margin-bottom: 20px !important;
    }

    .feature-item i {
        font-size: 18px !important;
    }

    .feature-item span {
        font-size: 10px !important;
    }

    .engagement-modal-buttons {
        gap: 8px !important;
    }

    .modal-top-row {
        gap: 8px !important;
    }

    .engagement-modal-btn {
        padding: 10px 8px !important;
        font-size: 12px !important;
        min-height: 40px !important;
    }

    .engagement-modal-btn i {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .chat-widget.bottom-right,
    .chat-widget.bottom-left {
        bottom: 75px !important;
        right: 12px !important;
        gap: 10px !important;
    }

    .telegram-button {
        padding: 8px 14px 8px 12px !important;
        font-size: 0.65rem !important;
    }

    .telegram-button .icon-wrapper {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.85rem !important;
    }

    .telegram-button .telegram-text {
        font-size: 0.65rem !important;
    }

    .whatsapp-button {
        padding: 8px 14px 8px 12px !important;
        font-size: 0.65rem !important;
    }

    .whatsapp-button .icon-wrapper {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.85rem !important;
    }

    .whatsapp-button .whatsapp-text {
        font-size: 0.65rem !important;
    }

    .chat-widget-button {
        padding: 10px 18px !important;
    }

    .chat-widget-button .chat-button-text {
        font-size: 12px !important;
    }

    .chat-widget-button .chat-icon i {
        font-size: 16px !important;
    }

    .engagement-modal-content {
        padding: 24px 16px 16px !important;
    }

    .engagement-modal-buttons {
        gap: 6px !important;
    }

    .modal-top-row {
        gap: 6px !important;
    }

    .engagement-modal-btn {
        padding: 8px 6px !important;
        font-size: 11px !important;
        min-height: 36px !important;
    }

    .engagement-modal-btn i {
        font-size: 12px !important;
    }
}

/* ==========================================
   iOS SAFE AREA SUPPORT
   ========================================== */

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .chat-widget.bottom-right,
    .chat-widget.bottom-left {
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
        bottom: calc(80px + env(safe-area-inset-bottom)) !important;
    }

    .chat-input-area {
        padding-bottom: env(safe-area-inset-bottom, 12px) !important;
    }
    
    .input-wrapper {
        padding-bottom: max(20px, env(safe-area-inset-bottom)) !important;
    }
    
    .chat-footer {
        padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    }

    .engagement-modal-container {
        padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    }
}

/* ==========================================
   WIDGET VISIBILITY - SHOW BUTTONS WHEN CHAT IS CLOSED
   ========================================== */

/* Show Telegram button when chat is closed */
body:not(:has(.chat-window.show)) .telegram-button {
    display: flex !important;
}

/* Show WhatsApp button when chat is closed */
body:not(:has(.chat-window.show)) .whatsapp-button {
    display: flex !important;
}

/* Ensure Live Chat button is always visible when chat is closed */
body:not(:has(.chat-window.show)) .chat-widget-button {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

div.chat-widget.bottom-right, 
div.chat-widget.bottom-left {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}