/* wwwroot/css/site.css */

/* --- Color & Font Variables --- */
:root {
    --jp-primary: #0d6efd; 
    --jp-sidebar-bg: #212529;
    --jp-sidebar-text: rgba(255, 255, 255, 0.75);
    --jp-sidebar-hover: #ffffff;
    --jp-content-bg: #f8f9fa;
    --jp-card-border: #dee2e6;
    --jp-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
}

html {
    font-size: 14px;
}

html, body {
    height: 100vh;       /* Exact viewport height */
    overflow: hidden;    /* Remove window scrollbars completely */
    margin: 0;
}
/* --- Sidebar Layout --- */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: var(--jp-sidebar-bg);
    color: var(--jp-sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 1rem;
    height: 100vh;       /* Ensure sidebar is full height */
    overflow-y: auto;    /* Allow sidebar to scroll if menu is long */
}

.sidebar-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    padding: 0.5rem 0.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sidebar-header .bi-box-seam {
    margin-right: 0.75rem;
    color: var(--jp-primary);
}

.sidebar-nav .nav-link {
    color: var(--jp-sidebar-text);
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.sidebar-nav .nav-link .bi {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: var(--jp-primary);
    color: var(--jp-sidebar-hover);
}

/* --- Main Content Area --- */
.main-content {
    height: 100vh;
    display: grid !important; 
    grid-template-rows: auto 1fr auto; /* Row 1: Header (auto), Row 2: Main (fills space), Row 3: Footer (auto) */
    overflow: hidden;    /* Prevent the wrapper itself from scrolling */
}

.main-content header {
    border-bottom: 1px solid var(--jp-card-border);
    background-color: #fff;
    z-index: 10;
}

main {
    overflow-y: auto;    /* The scrollbar appears ONLY here */
    padding: 2rem;
    /* Grid automatically stretches this to fill the middle space */
}
.footer {
    border-top: 1px solid var(--jp-card-border);
    background-color: #fff;
    z-index: 10;
    padding: 0.75rem 0;
}

/* --- Component Overhauls --- */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,.075);
    border: 1px solid var(--jp-card-border);
}

.table {
    border-color: var(--jp-card-border);
}

/* Sample Type Color Palette */
.badge-sample-STD { background-color: #e9ecef !important; color: #212529 !important; }
.badge-sample-FLD { background-color: #ffc107 !important; color: #212529 !important; }
.badge-sample-FLC { background-color: #fd7e14 !important; color: #fff !important; }
.badge-sample-FL  { background-color: #ffc107 !important; color: #212529 !important; }
.badge-sample-ML  { background-color: #198754 !important; color: #fff !important; }
.badge-sample-SU  { background-color: #dc3545 !important; color: #fff !important; }
.badge-sample-SW  { background-color: #0d6efd !important; color: #fff !important; }
.badge-sample-URS { background-color: #d63384 !important; color: #fff !important; }
.badge-sample-WRS { background-color: #0dcaf0 !important; color: #212529 !important; }
.badge-sample-RWS { background-color: #20c997 !important; color: #212529 !important; }
.badge-sample-RFL { background-color: #ffc107 !important; color: #212529 !important; }
.badge-sample-WW  { background-color: #6ea8fe !important; color: #212529 !important; }

/* --- Reusable list/table search input (used by _TableSearchInput.cshtml) --- */
.app-search-wrap {
    position: relative;
    max-width: 340px;
}
.app-search-wrap .app-search-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    pointer-events: none;
    font-size: 0.85rem;
}
.app-search-input {
    padding-left: 2rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}
.app-search-empty {
    padding: 1.25rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}