﻿/* =========================================================
   ReMeBox – Layout CSS
   Applies ONLY to _Layout.cshtml
   ========================================================= */


/* =========================
   BASE RESET
========================= */
html, body {
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
}


    /* =========================
   APP ROOT
========================= */
    body.app-layout {
        /*        height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: hidden;
*/

        margin: 0;
        align-items:center;
        min-height: 100vh;
        display: flex;
    }


/* =========================
   BACKGROUND LAYER
========================= */
.app-bg {
    /*   position: fixed;
    inset: 0;
    background-image: url('/images/remeboxback.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;*/
    position: fixed;
    inset: 0;
    background-image: url('/images/remeboxback.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
}

.header {
    height: 7%;
}

.inner-app-container {
    width: 100%;
    height: 100%;
}
/* =========================
   PAGE STRUCTURE
========================= */
.page-wrapper {
    flex: 1 auto;
    display: flex;
    flex-direction: column;
}
.page-center {
    min-height: calc(100vh - 140px); /* navbar + footer space */
    display: flex;
    align-items: flex-start; /* forms usually top aligned */
    justify-content: center;
}
body.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main.container-fluid {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 12px;
    -webkit-overflow-scrolling: touch;
}
/* ======================
MAIN CONTENT
====================== */

.main-content {
    flex: 1;
    padding: 12px;
    overflow: auto;
}

/* =========================
   ERP WIDTH CONTROL
========================= */
.rb-navbar .container-fluid,
main.container-fluid,
.footer-custom .container-fluid {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}


.navbar-nav > li.nav-item {
    margin-right: 1rem;
}


/* =========================
   DROPDOWNS (ERP MODE)
========================= */
.dropdown-menu {
    width: auto !important;
    min-width: 220px;
    max-width: 340px;
}

.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        position: absolute;
        top: 0;
        left: 100%;
        display: none;
        margin-left: 2px;
    }

        .dropdown-submenu:hover > .dropdown-menu,
        .dropdown-submenu > .dropdown-menu.show {
            display: block;
        }


/* =========================
   DROPDOWN ITEMS
========================= */
.navbar .dropdown-menu .dropdown-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 500;
}

    .navbar .dropdown-menu .dropdown-item:hover {
        background: rgba(255,255,255,0.2);
        border-radius: 4px;
    }


/* =========================
   BOOTSTRAP COLLAPSE FIX
========================= */

/* DESKTOP */
@media (min-width: 992px) {

    .navbar-nav {
        flex-direction: row;
        width: auto;
    }

        .navbar-nav .nav-item {
            width: auto;
        }

        .navbar-nav .dropdown-menu {
            position: absolute;
        }
}

/* MOBILE & TABLET */
@media (max-width: 991px) {

    .navbar-collapse {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        min-width: 0;
    }

    .navbar-nav {
        flex-direction: column !important;
        width: 100%;
    }

        .navbar-nav .nav-item {
            width: 100%;
        }

        .navbar-nav .nav-link {
            white-space: normal;
            padding: 10px 14px;
        }

        .navbar-nav .dropdown-menu {
            position: static !important;
            width: 100%;
            box-shadow: none;
            margin: 0;
        }
}


/* ===============================
   ERP WIDTH CONSTRAINT
================================ */

.rb-navbar .container-fluid {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

main.container-fluid {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 15px;
    box-sizing: border-box;
    min-width: 0;
    height: 90%;
}


/* =========================
   REAL MOBILE (PHONES)
========================= */
@media (max-width: 575px) {

    .rb-navbar .container-fluid,
    main.container-fluid {
        max-width: 100%;
        padding-left: 8px;
        padding-right: 8px;
    }

    .navbar-nav {
        flex-direction: column !important;
        width: 100% !important;
    }

        .navbar-nav .dropdown-menu {
            position: static !important;
            width: 100% !important;
        }
}


/* =========================
   FORM CONTAINER
========================= */

.form-container {
    max-width: 100%;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    box-sizing: border-box;
    width: 100%;
    height: calc(100vh - 140px);
}


    /* optional title strip */

    .form-container h2 {
        background: #2c6fb7;
        color: #fff;
        padding: 10px 15px;
        border-radius: 5px;
        margin: -20px -25px 20px -25px;
        font-size: 18px;
    }


/* =========================
   FORM SCROLL WRAPPER
========================= */

.form-scroll-wrapper {
    width: 100%;
    max-width: 100vw;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}


/* =========================
   FLOATING BUTTON SAFETY
========================= */

#floatingButtons {
    position: fixed;
    right: 10px;
    bottom: 60px;
    z-index: 1050;
}


/* =========================
   FILTER ROW
========================= */

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .filter-row input {
        width: auto;
    }
