@import url('base/variables.css');
@import url('base/reset.css');
@import url('base/typography.css');

@import url('layout/header.css');
@import url('layout/nav.css');
@import url('layout/footer.css');
@import url('layout/game-layout.css');

@import url('components/buttons.css');
@import url('components/cards.css');
@import url('components/forms.css');
@import url('components/search.css');
@import url('components/tables.css');

@import url('pages/home.css');
@import url('pages/fish-list.css');
@import url('pages/fish-show.css');
@import url('pages/search-page.css');
@import url('pages/waterbodies.css');

@import url('admin/admin-layout.css');
@import url('admin/admin-forms.css');
@import url('admin/admin-tables.css');

/* =========================================================
   FINAL PUBLIC/ADMIN SAFETY OVERRIDES
========================================================= */

/* Viešas puslapis: be bendro scroll, viduje scrollina tik zonos */
body.rf4-layout {
    position: fixed !important;
    inset: 0 !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
}

body.rf4-layout > .rf4-site-main {
    min-height: 0 !important;
    overflow: hidden !important;
}

body.rf4-layout .rf4-game-page {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

body.rf4-layout .rf4-game-sidebar,
body.rf4-layout .rf4-game-content {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* Admin: normalus naršyklės scroll */
body.rf4-admin-body {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    display: block !important;
}

/* =========================================================
   ADMIN SCROLL FORCE FIX
   Veikia tik admin layoutui su <html class="rf4-admin-html">
========================================================= */

html.rf4-admin-html {
    position: static !important;
    width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
}

html.rf4-admin-html body.rf4-admin-body {
    position: static !important;
    inset: auto !important;

    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;

    overflow: visible !important;
    display: block !important;

    margin: 0 !important;
    background: var(--rf4-admin-bg) !important;
    color: var(--rf4-admin-text) !important;
}

html.rf4-admin-html .rf4-admin-wrapper {
    position: static !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex !important;
    align-items: stretch !important;
}

html.rf4-admin-html .rf4-admin-sidebar {
    position: sticky !important;
    top: 0 !important;
    align-self: flex-start !important;
    min-height: 100vh !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

html.rf4-admin-html .rf4-admin-main {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 90px !important;
}
