/**
 * EDU NIXA School Management System - Mobile APK & WebView Optimizations
 * Enables native app-like look, slide-over drawer, sticky bottom bar, and touch responsiveness.
 */

/* App-Like Root Environment */
html, body {
    overflow-x: hidden !important;
    -webkit-tap-highlight-color: transparent !important;
    touch-action: manipulation;
    -webkit-font-smoothing: antialiased;
}

/* Safe Area Insets for iOS & Android Notches */
.edunixa-app-container {
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 70px);
    min-height: 100vh;
}

/* Tactile Fast Touch Feedback */
button, .edunixa-btn, .edunixa-nav-item, .edunixa-mobile-nav-item {
    transition: transform 0.1s ease, background-color 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

button:active, .edunixa-btn:active, .edunixa-mobile-nav-item:active {
    transform: scale(0.95) !important;
}

/* Sticky Bottom Mobile App Navigation Bar */
.edunixa-bottom-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    z-index: 9999;
    box-shadow: 0 -4px 16px rgba(8, 31, 61, 0.06);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.edunixa-bottom-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.edunixa-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: #64748B;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
    gap: 3px;
    position: relative;
}

.edunixa-bottom-item svg, .edunixa-bottom-item i {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.edunixa-bottom-item.active {
    color: #FF7A00;
}

.edunixa-bottom-item.active svg, .edunixa-bottom-item.active i {
    transform: translateY(-2px);
}

.edunixa-bottom-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    width: 24px;
    height: 3px;
    background: #FF7A00;
    border-radius: 0 0 4px 4px;
}

/* Mobile Slide-Over Drawer */
.edunixa-drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 31, 61, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.edunixa-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -280px;
    width: 280px;
    background: #FFFFFF;
    z-index: 10001;
    box-shadow: 8px 0 24px rgba(8, 31, 61, 0.15);
    transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.edunixa-drawer.open {
    left: 0;
}

.edunixa-drawer-backdrop.open {
    display: block;
    opacity: 1;
}

/* Mobile Responsive Breakpoint */
@media (max-width: 768px) {
    .edunixa-sidebar {
        display: none !important;
    }
    .edunixa-bottom-bar {
        display: block !important;
    }
    .edunixa-main-content {
        padding: 16px !important;
        padding-bottom: 84px !important;
    }
    .edunixa-table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}
