/*
Theme Name: Vixera Premium App Theme
Theme URI: https://vixera.in
Author: Vixera Global
Description: 100% Native Dark Theme with Fixed Premium Spacing, Edge-to-Edge Layout & Self-Hosted Fonts.
Version: 1.4.1
Text Domain: Vixera
*/

/* ==========================================================
   🚀 SELF-HOSTED FONTS (Zero Bloat - Registered Only) 
   No forced sizes or styles. 100% frontend control.
   ========================================================== */

/* DM Sans (Base Font) */
@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/dm-sans-v17-latin-regular.woff2') format('woff2');
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/dm-sans-v17-latin-500.woff2') format('woff2');
}

@font-face {
    font-family: 'DM Sans';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/dm-sans-v17-latin-700.woff2') format('woff2');
}

/* Syne (Premium Accent/Headings Font) */
@font-face {
    font-family: 'Syne';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/syne-v24-latin-700.woff2') format('woff2');
}

@font-face {
    font-family: 'Syne';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('fonts/syne-v24-latin-800.woff2') format('woff2');
}


/* ==========================================================
   🚀 CSS Reset & Base Variables (Native Dark Theme) 
   ========================================================== */
:root {
    --sr-bg-color: #080b12;       /* 🔥 Updated to exactly match New Premium Hero & Mobile App */
    --sr-bg-secondary: #0d1117;   /* 🔥 Updated darker panels to blend seamlessly */
    --sr-text-main: #f8fafc;      /* Pure White Text */
    --sr-text-muted: #94a3b8;     /* Slate Gray for secondary text */
    --sr-primary-color: #3b82f6;  /* Premium Blue Accent */
    --sr-border-color: rgba(255, 255, 255, 0.07); /* 🔥 Subtle premium dark borders */
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 🚀 PREMIUM SCROLLBAR (Dark Mode Adapted) */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--sr-bg-secondary); }
::-webkit-scrollbar-thumb { background: #253552; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #3b82f6; }

/* 🚀 FORCE PURE DARK BACKGROUND ACROSS ENTIRE SITE (Kills White Flash FOUC) */
html, 
body, 
body.custom-background, 
.site, 
.site-content, 
#page, 
#content,
.site-main {
    background-color: var(--sr-bg-color) !important;
    background-image: none !important;
}

body {
    color: var(--sr-text-main);
    /* Set DM Sans as the global default font. Fallbacks added for ultimate speed */
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}

/* 🚀 BASE UTILITY (Desktop) */
.container {
    width: 100%;
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 30px; 
}

/* ==========================================================
   🚀 SMART UNIVERSAL GAP KILLER 
   ========================================================== */
div[id*="-premium-"] {
    padding-top: 30px; 
    padding-bottom: 50px;
}

.entry-content > *:first-child:not(.sr-desk-hero-wrapper):not([class*="-banner"]),
.wp-block-post-content > *:first-child:not(.sr-desk-hero-wrapper):not([class*="-banner"]),
.site-main > *:first-child:not(.sr-desk-hero-wrapper):not([class*="-banner"]) {
    padding-top: 24px !important; 
    margin-top: 0 !important;
}

.entry-content > *:last-child,
.wp-block-post-content > *:last-child,
.site-main > *:last-child {
    padding-bottom: 50px !important;
    margin-bottom: 0 !important;
}

/* ==========================================================
   📱 ULTRA AGGRESSIVE MOBILE EDGE-TO-EDGE FIX (PREMIUM)
   ========================================================== */
@media (max-width: 767px) {
    
    /* 🔥 1. CLEAN THEME PADDINGS BUT KEEP SAFE WIDTH */
    .site-content, .site-inner, #content, #page, .site-main,
    .container, .ast-container, .grid-container, .wrap,
    .entry-content, .post-inner, .type-post, .type-page {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important; 
        overflow-x: hidden !important;
    }

    /* 🔥 2. ADD EXACT PREMIUM MICRO-GAP (16px) */
    .sr-post-content,
    .sr-1250-container,
    .sr-app-breakout > .sr-master-container {
        padding-left: 16px !important; 
        padding-right: 16px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* 🔥 3. FIX TABLES ON MOBILE (Edge-to-Edge) */
    .sr-table-responsive {
        margin-left: -16px !important; 
        margin-right: -16px !important;
        width: calc(100% + 32px) !important;
        border-radius: 0 !important; 
        border-left: none !important;
        border-right: none !important;
        padding: 0 16px; 
    }

    /* 🔥 4. APP NAV SAFE AREA (Bottom Space) */
    div[id*="-premium-"],
    .entry-content > *:last-child,
    .wp-block-post-content > *:last-child,
    .site-main > *:last-child {
        padding-bottom: 110px !important; 
        margin-bottom: 0 !important;
    }
}

/* 🚀 DESKTOP TOP SPACE BALANCE */
@media (min-width: 992px) {
    body {
        padding-top: 0 !important; 
    }
    
    .site-main, 
    .site-content, 
    .entry-content {
        margin-top: 20px !important; 
    }
    
    /* Fix for WP Admin Bar spacing if header is fixed */
    body.admin-bar .your-custom-header-class {
        top: 32px !important; 
    }
}