﻿/* |||||||||||||| PAGE LAYOUT |||||||||||||| */
/* Page layout: sticky header + scrollable content */
/* Updated to use nx-theme.css variables */

.nx-pagelayout {
    display: grid;
    grid-template-rows: auto auto 1fr; /* header + scrollable content */
    height: 100vh;
    min-height: 0; /* allow inner scrolling */
    box-sizing: border-box;
    max-width: 1250px;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--nx-space-small);
    padding-right: var(--nx-space-small);

}

/* Header */
.nx-pagelayout-header {
    display: flex;
    align-items: center;
    gap: var(--nx-space);
    padding: var(--nx-space-small) var(--nx-space);
    border-bottom: var(--nx-border-width) solid var(--nx-border-color);
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--nx-secondary-bg);

    min-height: 30px; /* shared with main menu button */
    margin-bottom: var(--nx-space);
}

/* Title / Menu / Control box */
.nx-pagelayout-title {
    display: flex;
    gap: var(--nx-space-small);
    color: var(--nx-secondary-fg);
    align-items: center;
    flex-wrap: wrap;
    font-weight: 600;
    color: inherit;
}

.nx-pagelayout-menu {
    flex-wrap: wrap;
    width: auto;
    flex: 1;
}

    .nx-pagelayout-menu * {
        margin: 0px;
    }

    .nx-pagelayout-menu > .nx-input {
        max-width: 100px;
    }

.nx-pagelayout-controlbox {
    margin-left: auto; /* push controls to right */
    align-items: center;
    white-space: nowrap;
    width: auto;
    justify-content: right;
    flex: 0;
}

.nx-pagelayout-closebutton {
    background: none;
    border: none;
    box-shadow: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: inherit;
}

    .nx-pagelayout-closebutton:hover {
        color: var(--nx-negative-fg);
    }

/* Scrollable content wrapper */
.nx-pagelayout-scroll {
    overflow: auto;
    min-height: 0; /* critical for correct inner scrolling */
    -webkit-overflow-scrolling: touch;
    background: transparent;
    box-sizing: border-box;
    width: 100%;
    padding: 0.1rem; /* Fix: Required to not cut off shadows */
}

    /* Custom lightweight scrollbar (WebKit) for the scroll container */
    .nx-pagelayout-scroll::-webkit-scrollbar {
       /* width: 12px;
        height: 12px;*/
    }

    .nx-pagelayout-scroll::-webkit-scrollbar-thumb {
      /*  background: rgba(0,0,0,0.12);*/
       /* border-radius: var(--nx-border-radius);*/
    }

        .nx-pagelayout-scroll::-webkit-scrollbar-thumb:hover {
         /*   background: rgba(0,0,0,0.18);*/
        }

/* Firefox scrollbar hint */
.nx-pagelayout-scroll {
/*    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.12) transparent;*/
}

/* Inner content area: center and constrain width */
.nx-pagelayout-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}


.nx-pagelayout-footer {
    display: flex;
    align-items: center;
    gap: var(--nx-space);
    padding: var(--nx-space-small) var(--nx-space);
    border-top: var(--nx-border-width) solid var(--nx-border-color);
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: var(--nx-secondary-bg);
    min-height: 30px; /* shared with main menu button */

    flex-direction: row-reverse;
}

