/* Bookzy AI Blue & White Modern Theme Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Nastaliq+Urdu:wght@400;700&display=swap');

:root {
    --primary: #1d4ed8;       /* Royal Blue */
    --primary-dark: #1e3a8a;  /* Deep Navy */
    --primary-light: #2563eb; /* Ocean Blue */
    --primary-soft: #eff6ff;  /* Ice Blue */
    --accent: #0284c7;        /* Sky Blue */
    --surface: #ffffff;       /* Pure White */
    --background: #f8fafc;    /* Clean Slate/Ice Background */
    --text-main: #0f172a;     /* High-Contrast Dark Slate */
    --text-muted: #64748b;    /* Secondary Muted Text */
    --border-color: #e2e8f0;
    --border-blue: #bfdbfe;
    --shadow-subtle: 0 4px 20px -2px rgba(29, 78, 216, 0.06);
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text-main);
}

.urdu-text {
    font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', 'Urdu Typesetting', serif;
    line-height: 2;
    direction: rtl;
    text-align: right;
}

/* ===================================================
   CRITICAL CONTRAST & DROPDOWN VISIBILITY FIXES
   Ensures ALL selects, native popups, and dropdown items
   have dark/blue text on clean white surfaces with high z-index.
   =================================================== */
select {
    color: #0f172a !important;
    background-color: #ffffff !important;
}

select option {
    background-color: #ffffff !important;
    color: #0f172a !important;
    padding: 8px 12px !important;
    font-weight: 500;
}

select option:checked {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-weight: 700;
}

/* Top-Right Navbar Active & Contrast Fixes */
.top-navbar-btn {
    color: #0f172a !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 700 !important;
    transition: all 0.2s ease;
}

.top-navbar-btn:hover {
    background-color: #eff6ff !important;
    border-color: #93c5fd !important;
    color: #1d4ed8 !important;
}

/* Dropdown Menus: Clean White Surface, High Contrast Dark/Blue Text, Z-Index, Crisp Borders */
.navbar-dropdown-panel {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.08) !important;
    z-index: 110 !important;
}

.navbar-dropdown-item {
    color: #0f172a !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    transition: all 0.15s ease-in-out;
}

.navbar-dropdown-item:hover {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
}

.navbar-dropdown-item i {
    color: #2563eb !important;
    font-size: 0.75rem;
}

/* Full-Width Responsive App Layout (max-width: 1200px centered) */
.mobile-device-frame {
    width: 100% !important;
    max-width: 1200px !important;
    height: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 auto !important;
}

.mobile-notch,
#mobile-notch,
#mobile-status-bar,
#view-mode-btn {
    display: none !important;
}

/* Scanner Animation Beam (Royal Blue / Cyan) */
.scanner-container {
    position: relative;
    overflow: hidden;
}

.scanner-laser {
    position: absolute;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #38bdf8, #2563eb, transparent);
    box-shadow: 0 0 12px #38bdf8, 0 0 24px #2563eb;
    animation: scanAnimation 2s ease-in-out infinite alternate;
}

@keyframes scanAnimation {
    0% {
        top: 8%;
    }
    100% {
        top: 92%;
    }
}

/* Pulse badge (Blue Glow) */
.pulse-blue {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    animation: pulseB 1.8s infinite;
}

@keyframes pulseB {
    0% {
        transform: scale(0.98);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
    100% {
        transform: scale(0.98);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* Bottom Nav Indicator */
.nav-tab.active {
    color: #1d4ed8 !important;
    font-weight: 700;
}

.nav-tab.active svg,
.nav-tab.active i {
    color: #1d4ed8 !important;
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

/* Clean Cards & Subtle Blue Shadows */
.card-clean {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
    border-radius: 1rem;
    transition: all 0.2s ease-in-out;
}

.card-clean:hover {
    border-color: #bfdbfe;
    box-shadow: 0 10px 25px -5px rgba(29, 78, 216, 0.08);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #93c5fd;
}

/* ===================================================
   CORE LAYOUT: FULL-WIDTH COLUMNAR FLEX FIX
   Fixes horizontal flex bug by forcing <main> and all
   inner application wrappers to display: flex with
   flex-direction: column and full 100% width.
   =================================================== */
main,
#app-shell,
#app-wrapper,
#phone-frame,
.app-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Ensure every section inside main spans full width and centers cleanly */
main section,
#app-shell section,
#app-wrapper section,
#phone-frame section,
section.tab-page,
.shelf-section {
    width: 100% !important;
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Redundant sub-header removal safeguard */
.duplicate-sub-header,
#duplicate-mobile-header,
.inner-mobile-sub-header {
    display: none !important;
}

/* Strictly hide bottom mobile navigation bar on desktop screens (>= 768px) */
@media (min-width: 768px) {
    #mobile-bottom-nav,
    .mobile-bottom-nav {
        display: none !important;
    }
}

/* ===================================================
   RESPONSIVE LAYOUT & MOBILE BEZEL REMOVAL
   Ensures native edge-to-edge full screen on real mobile
   phones and tablets (<= 768px), hiding fake bezel,
   speaker notch, and simulated status bar completely.
   =================================================== */
@media (max-width: 768px) {
    #mobile-notch,
    .mobile-notch,
    #mobile-status-bar,
    #view-mode-btn {
        display: none !important;
    }

    .mobile-device-frame,
    #app-wrapper,
    #app-shell,
    #phone-frame,
    .app-content {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

/* Hide scrollbars for horizontal pill bars */
.scrollbar-none::-webkit-scrollbar {
    display: none;
}
.scrollbar-none {
    -ms-overflow-style: none;
    scrollbar-width: none;
}


