/*
 * MikMon-E shared layout overrides.
 *
 * Applied after Minia app.min.css on every dashboard/public template page.
 * The footer remains fixed while page content scrolls, and the topbar is
 * intentionally reduced from Minia's 70px to a more compact 60px height.
 */

/* ------------------------------------------------------------------------- */
/* Fixed footer                                                             */
/* ------------------------------------------------------------------------- */

.footer {
    position: fixed !important;
    bottom: 0;
    z-index: 1000;
    height: 60px;
    box-sizing: border-box;
}

/*
 * Keep the last part of the document clear of the fixed footer so content
 * cannot disappear underneath it while scrolling.
 */
.page-content {
    padding-bottom: 60px !important;
}

/* ------------------------------------------------------------------------- */
/* Compact topbar                                                           */
/* ------------------------------------------------------------------------- */

#page-topbar,
.navbar-header,
.header-item {
    height: 60px;
}

.navbar-header {
    padding-top: 0;
    padding-bottom: 0;
}

.logo {
    line-height: 59px;
}

.app-search {
    padding-top: 10px;
    padding-bottom: 10px;
}

.vertical-menu {
    top: 60px;
}

.main-content .content {
    margin-top: 60px;
}

.page-content {
    padding-top: calc(60px + 1.5rem);
}

/* Horizontal layout uses the same compact topbar. */
body[data-layout="horizontal"] .page-content {
    margin-top: 60px;
    padding-top: calc(55px + 1.5rem);
}

/* The compact header also applies when the sidebar is collapsed. */
body[data-sidebar-size="sm"] .vertical-menu {
    top: 60px;
}

/* Keep the fixed footer aligned with the compact/collapsed sidebar. */
@media (max-width: 991.98px) {
    .footer,
    body[data-sidebar-size="sm"] .footer,
    body[data-layout="horizontal"] .footer {
        left: 0 !important;
    }
}
