/* Stories CSS Fix - Essential Styles Only */

/* Instagram Stories - Ultra Premium & Compact */
.stories-section {
    padding-top: 50px;
    height: 170px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

    .stories-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.03) 0%, transparent 70%);
        pointer-events: none;
    }

.stories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.stories-text {
    flex: 0 0 auto;
    width: 250px;
}

.stories-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #ffffff 0%, #e50914 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stories-subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.4;
}

.stories-container-wrapper {
    flex: 1;
    max-width: 600px;
}

.stories-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 45px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .stories-container::-webkit-scrollbar {
        display: none;
    }

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 65px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

    .story-item:hover {
        transform: translateY(-5px);
    }

.story-ring {
    width: 65px;
    height: 65px;
    background: linear-gradient(45deg, #E50914, #ff6b35, #00c853);
    border-radius: 50%;
    padding: 3px;
    position: relative;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    transition: all 0.3s ease;
}

    .story-ring:hover {
        box-shadow: 0 6px 25px rgba(255, 107, 53, 0.5);
        transform: scale(1.05);
    }

.story-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #000000;
    position: relative;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .story-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* Avatar with initials (no image) */
    .story-avatar[data-initials="true"] {
        background: linear-gradient(135deg, #e50914 0%, #ff6b35 50%, #ffd700 100%);
        font-size: 24px;
        font-weight: 900;
        color: rgba(255, 255, 255, 0.95);
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        letter-spacing: -1px;
    }

.story-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-align: center;
    max-width: 65px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* ========== ULTRA PREMIUM WHATSAPP WIDGET Z-INDEX FIX ========== */
/* WhatsApp Widget Mobile Z-Index Fix */
.whatsapp-widget,
#whatsapp-widget,
div[style*="position: fixed"][style*="bottom"],
div[style*="position: fixed"][style*="right"] {
    z-index: 99999 !important;
}

/* WhatsApp Button */
.whatsapp-float-btn,
#whatsapp-btn,
button[style*="background"][style*="linear-gradient"][style*="25d366"] {
    z-index: 99999 !important;
    position: relative !important;
}

/* WhatsApp Popup */
.whatsapp-popup,
#whatsapp-popup,
div[style*="width: 350px"][style*="background: white"],
div[style*="width: 300px"][style*="background: white"],
div[style*="width: 280px"][style*="background: white"] {
    z-index: 100000 !important;
    position: absolute !important;
}

/* Footer Override for Mobile WhatsApp */
.ultra-premium-footer,
footer {
    z-index: 1000 !important;
}

/* Mobile Specific WhatsApp Fixes */
@media (max-width: 768px) {
    /* Force WhatsApp widget above everything on mobile */
    .whatsapp-widget,
    #whatsapp-widget,
    div[style*="position: fixed"][style*="bottom: 20px"],
    div[style*="position: fixed"][style*="right: 20px"] {
        z-index: 999999 !important;
        position: fixed !important;
    }

    /* WhatsApp Button Mobile */
    .whatsapp-float-btn,
    #whatsapp-btn,
    button[style*="width: 60px"],
    button[style*="width: 70px"] {
        z-index: 999999 !important;
        position: relative !important;
        background: linear-gradient(135deg, #25d366 0%, #128c7e 100%) !important;
        border: none !important;
        border-radius: 50% !important;
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4) !important;
    }

    /* WhatsApp Popup Mobile */
    .whatsapp-popup,
    #whatsapp-popup,
    div[style*="width: 300px"],
    div[style*="width: 280px"] {
        z-index: 1000000 !important;
        position: absolute !important;
        background: white !important;
        border-radius: 20px !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    }

    /* Ensure Footer stays below WhatsApp */
    .ultra-premium-footer,
    footer,
    .footer-bottom,
    div[style*="Designed & Developed by"] {
        z-index: 500 !important;
        position: relative !important;
    }

        /* Social Media Icons in Footer - Lower Z-Index */
        .footer a,
        .footer-bottom a,
        div[style*="background: linear-gradient"][style*="padding: 12px"] a {
            z-index: 600 !important;
        }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    /* WhatsApp Widget Extra Protection */
    .whatsapp-widget,
    #whatsapp-widget {
        z-index: 9999999 !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 15px !important;
    }

    /* WhatsApp Button Extra Protection */
    .whatsapp-float-btn,
    #whatsapp-btn {
        z-index: 9999999 !important;
        width: 55px !important;
        height: 55px !important;
        font-size: 26px !important;
    }

    /* WhatsApp Popup Extra Protection */
    .whatsapp-popup,
    #whatsapp-popup {
        z-index: 10000000 !important;
        width: calc(100vw - 30px) !important;
        max-width: 320px !important;
        bottom: 80px !important;
        right: 0 !important;
    }
}

/* Force Override All Potential Conflicting Elements */
.whatsapp-widget * {
    z-index: inherit !important;
}

#whatsapp-widget * {
    z-index: inherit !important;
}

/* Prevent Footer Elements from Interfering */
.ultra-premium-footer * {
    z-index: 1000 !important;
}

footer * {
    z-index: 1000 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .stories-section {
        height: auto;
        min-height: 200px;
        padding: 30px 0;
    }

    .stories-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        text-align: left;
    }

    .stories-text {
        width: 100%;
    }

    .stories-title {
        font-size: 1.1rem;
    }

    .stories-container-wrapper {
        width: 100%;
        max-width: none;
    }

    .stories-container {
        gap: 12px;
        padding: 10px 5px;
    }

    .story-item {
        min-width: 60px;
    }

    .story-ring {
        width: 60px;
        height: 60px;
    }

    .story-avatar[data-initials="true"] {
        font-size: 22px;
    }

    .story-name {
        max-width: 60px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .stories-section {
        height: auto;
        min-height: 180px;
        padding: 25px 0;
    }

    .stories-title {
        font-size: 1rem;
    }

    .story-item {
        min-width: 55px;
    }

    .story-ring {
        width: 55px;
        height: 55px;
    }

    .story-avatar[data-initials="true"] {
        font-size: 20px;
    }

    .story-name {
        max-width: 55px;
        font-size: 9px;
    }
}

/* ========== WHATSAPP WIDGET MOBILE TOUCH FIXES ========== */
/* Mobile Touch Optimization for WhatsApp */
@media (hover: none) and (pointer: coarse) {
    .whatsapp-widget,
    #whatsapp-widget {
        touch-action: manipulation !important;
        -webkit-touch-callout: none !important;
    }

    .whatsapp-float-btn,
    #whatsapp-btn {
        touch-action: manipulation !important;
        -webkit-touch-callout: none !important;
        min-height: 44px !important;
        min-width: 44px !important;
    }

        /* Remove hover effects on touch devices */
        .whatsapp-float-btn:hover,
        #whatsapp-btn:hover {
            transform: none !important;
            box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4) !important;
        }
}

/* iOS Specific Fixes */
@supports (-webkit-touch-callout: none) {
    .whatsapp-widget,
    #whatsapp-widget {
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
    }
}
