/* BOOSTER STYLES - FINAL JS-DRIVEN FIX V5.1 (DESKTOP SAFEGUARD) */

/* DESKTOP MENU RESTORATION FIX */
@media screen and (min-width: 769px) {
    .mobile_time_block {
        display: inline !important;
        position: static !important;
    }

    .i_post_shared_time {
        position: static !important;
    }

    .i_post_menu {
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        display: block !important;
        z-index: 100 !important;
        width: auto !important;
        height: auto !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .i_post_menu_dot {
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* MOVER PANEL DE PRIVACIDAD A LA IZQUIERDA (SOLO ESCRITORIO) */
    .i_privacy_helper_fix {
        transform: translateX(-160px) !important;
        z-index: 500 !important;
        left: -50px !important;
        position: absolute !important;
        pointer-events: auto !important;
    }

    /* Ensure privacy menu options are clickable */
    .i_privacy_helper_fix .i_whoseech_menu_item_out,
    .i_privacy_helper_fix .wsUpdate {
        pointer-events: auto !important;
        cursor: pointer !important;
    }

    /* HIDE FLOATING ICONS ON DESKTOP WHEN MODAL IS OPEN */
    body.body-modal-open .i_pb_premiumPost,
    body.body-modal-open .glass-diamond-btn,
    body.body-modal-open .point_pr,
    body.body-modal-open .footer_container,
    body.body-modal-open .i_pb_emojis {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        z-index: 1 !important;
    }
}

/* GLOBAL ANIMATION FIXES */
.i_pb_premiumPost,
.i_pb_premiumPostBox,
.i_pb_premium_box,
.icon-pulse-wrapper,
.point_pr,
.glass-diamond-btn,
.footer_container,
.btest {
    overflow: visible !important;
}

/* GLOBAL MODAL FIXES - Only target backgrounds for fixed positioning */
.i_modal_bg_in,
.i_modal_container,
.i_modal_bg {
    z-index: 999998 !important;
    /* High but below my new css.php override */
    position: fixed !important;
}

/* HEADER GLASSMORPHISM RESTORED - Outer Only */
.header {
    background: rgba(22, 25, 35, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.header_wrapper,
.header_menu_mobile {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.header,
.header_wrapper,
.header_menu_mobile {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    opacity: 1 !important;
    transform: none !important;
    perspective: none !important;
    filter: none !important;
    z-index: 2000 !important;
}

/* SEARCH STYLES REMOVED - NOW HANDLED IN HEADER.PHP CURTAIN STRATEGY */

/* MOBILE SPECIFIC FIXES (iPhone) */
/* Reduced breakpoint to 600px to avoid hitting PWA/Tablet Desktop windows */
@media screen and (max-width: 600px) {

    /* 1. RESTORE PRIVACY PANEL - Reverted to safe previous state */
    .i_choose_ws_wrapper.i_privacy_helper_fix {
        transform: none !important;
        left: auto !important;
        right: 0 !important;
        position: absolute !important;
        z-index: 20 !important;
    }

    /* 2. JS-DRIVEN VISIBILITY TOGGLE - THE ULTIMATE FIX */
    /* When body has class 'body-modal-open', hide the diamond icons AND EMOJIS */
    /* ONLY APPLY THIS ON TRUE MOBILE (<600px) */
    body.body-modal-open .i_pb_premiumPost,
    body.body-modal-open .glass-diamond-btn,
    body.body-modal-open .point_pr,
    body.body-modal-open .footer_container,
    body.body-modal-open .i_pb_emojis {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transition: opacity 0.1s ease !important;
    }

    /* 3. BASIC DIAMOND ICON STYLES (Restored clean state) */
    .i_pb_premiumPost {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        border-radius: 50% !important;
        position: relative !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 1 !important;
        /* Low z-index */
    }

    /* Ensure icon itself is visible */
    .i_pb_premiumPost svg {
        display: block !important;
        margin: auto !important;
        width: 20px !important;
        height: 20px !important;
        fill: #f65169;
    }

    .i_pb_premiumPostBox,
    .i_pb_premium_box {
        position: relative !important;
        overflow: visible !important;
    }

    /* 4. POST PANEL PULSE WRAPPER */
    .i_pb_premium_box .icon-pulse-wrapper {
        width: 100% !important;
        height: 100% !important;
    }

    /* 5. BUY BUTTON SPECIFIC */
    .glass-diamond-btn .icon-pulse-wrapper {
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
    }
}

/* ----------------------------------------------------------- */
/* FEED GLASS REMOVAL (USER REQUEST - STACKING FIX)            */
/* ----------------------------------------------------------- */

/* 1. Publication Panel */
/* 1. Publication Panel - SPECIFICITY BOOST */
html body .i_postFormContainer {
    background: #1e1e1e !important;
    /* Solid background */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 24px !important;
    box-shadow: 0 5px 20px -5px rgba(0, 0, 0, 0.3) !important;
    margin-bottom: 15px !important;
    padding-bottom: 15px !important;

    /* CRITICAL: Allow Popups to float over feed */
    overflow: visible !important;
    z-index: 50 !important;
}

/* 2. Feed Posts - SPECIFICITY BOOST */
html body .i_post_body {
    background: #1e1e1e !important;
    /* Solid background */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 24px !important;
    box-shadow: 0 5px 20px -5px rgba(0, 0, 0, 0.3) !important;
    margin-bottom: 20px !important;
    padding-bottom: 0 !important;

    z-index: 1 !important;
}