/* Cookie Bar Fix - Proper positioning without overlaps */

.cookie-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999999 !important;
    background: rgba(30, 30, 40, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 24px 0 !important;
    transform: translateY(100%) !important;
    transition: transform 0.3s ease !important;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.5) !important;
}

.cookie-bar.show {
    transform: translateY(0) !important;
    display: block !important;
}

.cookie-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
}

/* Ensure footer has proper spacing ONLY when cookie bar is visible */
footer {
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    position: static !important;
    z-index: 100 !important;
    transition: margin-bottom 0.3s ease !important;
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
}

/* Add spacing only when cookie bar is showing */
body:has(.cookie-bar.show) footer {
    margin-bottom: 180px !important;
}

/* Override style.min.css footer positioning */
footer.footer-space {
    bottom: auto !important;
    position: static !important;
}

.content + footer,
main + footer {
    position: static !important;
    bottom: auto !important;
    margin-left: 0 !important;
}

/* Bottom Menu - Hide on desktop, show fixed on mobile */
.bottom-menu {
    display: none;
}

@media (max-width: 1199px) {
    .bottom-menu {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 999;
        background: rgba(10, 10, 15, 0.98);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
    }
    
    .bottom-menu .navbar-nav {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        height: 70px;
        margin: 0;
        padding: 0;
    }
    
    .bottom-menu .nav-item {
        flex: 1;
        text-align: center;
    }
    
    .bottom-menu .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 4px;
        color: rgba(255, 255, 255, 0.6);
    }
    
    .bottom-menu .nav-item.active .nav-link {
        color: #00B8D4;
    }
    
    .bottom-menu .nav-link small {
        font-size: 10px;
        text-transform: capitalize;
    }
    
    body:not(:has([data-page="home"])) {
        padding-bottom: 80px;
    }
}

/* Hide bottom menu on home page */
body:has([data-page="home"]) .bottom-menu {
    display: none;
}

/* Cookie bar buttons */
.cookie-btn {
    padding: 12px 28px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-family: 'Inter', sans-serif !important;
}

.cookie-btn.accept {
    background: linear-gradient(135deg, #00B8D4 0%, #0D47A1 100%) !important;
    color: white !important;
}

.cookie-btn.accept:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 20px rgba(0, 184, 212, 0.4) !important;
}

.cookie-btn.reject {
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.cookie-btn.reject:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Wrapper and Content - Mobile First Approach */
.wrapper {
    position: relative;
    margin-left: 0;
    width: 100%;
    min-height: calc(100vh - 80px);
    padding-top: 0 !important;
}

.content {
    margin-left: 0;
    width: 100%;
    padding: 20px 16px;
}

/* Only add sidebar spacing on desktop */
@media (min-width: 1200px) {
    .wrapper {
        margin-left: 240px;
        width: calc(100% - 240px);
        padding-top: 0 !important;
    }
    
    .content {
        padding: var(--space-xl) var(--space-lg);
    }
}

/* Hide OLD sidebar completely */
.side-nav,
nav.side-nav {
    display: none;
}

/* Hide NEW sidebar on mobile */
@media (max-width: 1199px) {
    .sidebar-space,
    aside.sidebar-space {
        display: none;
    }
}

/* Ensure content never overlaps */
body {
    position: relative !important;
}

/* Fix footer jumping issue */
html {
    scroll-behavior: smooth !important;
}

footer {
    position: static !important;
    transform: none !important;
    will-change: auto !important;
}

/* Prevent layout shifts */
* {
    scroll-margin-top: 80px;
}

/* Ensure wrapper doesn't move footer */
.wrapper {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    position: relative !important;
}

.content {
    flex: 1 0 auto !important;
    position: relative !important;
    padding-bottom: 0 !important;
}

/* Force footer to bottom and prevent movement */
footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    body:has(.cookie-bar.show) footer {
        margin-bottom: 200px !important;
    }
    
    .cookie-container {
        padding: 0 16px !important;
    }
    
    .cookie-btn {
        width: 100% !important;
        margin-bottom: 12px !important;
    }
    
    /* Fix daily bonus widget on mobile */
    .daily-bonus-widget .bonus-card {
        grid-template-columns: 1fr !important;
        text-align: center;
        padding: 20px !important;
    }
    
    .daily-bonus-widget .bonus-stats {
        flex-direction: row;
        justify-content: space-around;
    }
}

