/* Space Gate Nova — minimal catalog pages + fixed bottom navigation
   Loaded last. Keeps the approved old visual identity, removes catalog header/statistics only. */
:root {
    --sg-catalog-top-gap: calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 8px);
    --sg-bottom-fixed-z: 2147483000;
}

/* لا تجعل أي حاوية عليا تصنع containing block يجعل المنيو السفلي يتحرك مع المحتوى */
html,
body,
#app,
.app-root,
.main-layout-shell,
.oscar-app,
.native-view,
.catalog-landing-app,
.nova-app-shell {
    transform: none !important;
    perspective: none !important;
    filter: none !important;
}

/* صفحات كل الأفلام/كل المسلسلات/كل الأنمي: حذف الرأس والإحصائيات بالكامل */
.nova-catalog-page {
    padding-top: var(--sg-catalog-top-gap) !important;
    padding-bottom: calc(var(--bottom-nav-h, 76px) + var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 26px) !important;
    background: #000 !important;
}

.nova-catalog-hero,
.nova-catalog-stats,
.nova-eyebrow,
.nova-result-summary:not(.silent) {
    display: none !important;
}

/* زر رجوع أيقوني فقط، بدون رأس، مفيد للويندوز ولا يضيف شريطًا بصريًا */
.nova-catalog-minimal-actions {
    min-height: 38px;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.nova-catalog-back-plain,
.nova-catalog-back-plain:hover,
.nova-catalog-back-plain:focus,
.nova-catalog-back-plain:focus-visible,
.nova-catalog-back-plain:active {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #fff !important;
    transform: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.nova-catalog-back-plain::before,
.nova-catalog-back-plain::after {
    content: none !important;
    display: none !important;
}

.nova-catalog-back-plain:active { opacity: .68; }

/* اجعل الفلاتر والأنواع هي أول ما يراه المستخدم */
.nova-catalog-controls {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    border: 0 !important;
    box-shadow: none !important;
}

.nova-category-strip {
    margin-top: 8px !important;
    margin-bottom: 14px !important;
    padding-bottom: 2px !important;
}

.nova-category-strip button small,
.nova-category-strip .count,
.nova-category-strip [data-count] {
    display: none !important;
}

/* شريط تحديث صامت بدون أرقام أو إحصائيات */
.nova-result-summary.silent {
    min-height: 18px !important;
    height: 18px !important;
    margin: 0 0 6px !important;
    padding: 0 !important;
    justify-content: center !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* تثبيت المنيو السفلي بشكل صارم حتى لا يتحرك مع المحتوى */
nav.oscar-bottom-nav.original-bottom-nav,
body nav.oscar-bottom-nav.original-bottom-nav,
html body nav.oscar-bottom-nav.original-bottom-nav {
    position: fixed !important;
    z-index: var(--sg-bottom-fixed-z) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    top: auto !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: calc(var(--bottom-nav-h, 76px) + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
    margin: 0 !important;
    transform: translate3d(0,0,0) !important;
    will-change: transform !important;
    contain: layout paint style !important;
    pointer-events: auto !important;
    overscroll-behavior: contain !important;
}

/* مساحة حماية حتى لا تختفي البطاقات خلف المنيو */
.oscar-app,
.native-view,
.catalog-landing-main,
.nova-catalog-page,
.movies-catalog-page,
.series-catalog-page,
.anime-catalog-page,
.wrestling-catalog-page {
    padding-bottom: calc(var(--bottom-nav-h, 76px) + var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 24px) !important;
}

/* منع أي animation/transition من تحريك المنيو */
nav.oscar-bottom-nav.original-bottom-nav,
nav.oscar-bottom-nav.original-bottom-nav * {
    animation-name: none !important;
}

nav.oscar-bottom-nav.original-bottom-nav.sg-bottom-nav-locked {
    position: fixed !important;
    bottom: 0 !important;
}

@media (max-width: 680px) {
    .nova-catalog-page { padding-inline: 12px !important; }
    .nova-catalog-minimal-actions { min-height: 32px; margin-bottom: 6px; }
    .nova-catalog-back-plain { width: 34px !important; height: 34px !important; min-width: 34px !important; min-height: 34px !important; }
    .nova-select-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
