/* ============================================================
   NSightCenter - Site.css  (Bootstrap 5 base overrides)
   ============================================================ */

/* Fixed navbar offset + sticky footer base */
html {
    height: 100%;
}
body {
    padding-top: 60px;
    font-family: Tahoma, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
/* ASP.NET wraps everything in a form — make it stretch too */
body > form {
    display: flex;
    flex-direction: column;
    flex: 1;
}
/* Content area grows to fill space, footer stays at bottom */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
    flex: 1 0 auto;
}
footer {
    flex-shrink: 0;
}

/* ---- Responsive form inputs ---- */
input, select, textarea {
    max-width: 100%;
}

/* ---- Navbar brand ---- */
.navbar-brand {
    font-weight: bold;
    letter-spacing: 1px;
}

/* ---- Navbar background — matte brand green ---- */
.bg-nsight {
    background-color: #21a957 !important;
}

/* ---- Nav link text — fully visible on green, clear hover ---- */
.navbar-nav .nav-link {
    color: rgba(255,255,255,0.92) !important;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #fff !important;
    background-color: rgba(0,0,0,0.18);
    border-radius: 4px;
}

/* ---- Primary button — override Bootstrap blue with brand green ---- */
.btn-primary {
    --bs-btn-bg:                #21a957;
    --bs-btn-border-color:      #1d9a4e;
    --bs-btn-hover-bg:          #1a8a45;
    --bs-btn-hover-border-color:#177a3d;
    --bs-btn-active-bg:         #177a3d;
    --bs-btn-active-border-color:#146e36;
    --bs-btn-disabled-bg:       #21a957;
    --bs-btn-disabled-border-color: #21a957;
    --bs-btn-focus-shadow-rgb:  33, 169, 87;
}

/* ---- Language switcher ---- */
.lang-switcher {
    margin-top: 6px;
}
.lang-switcher select {
    min-width: unset;
}

/* ---- Form layout table ---- */
.formTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}

.formTd {
    vertical-align: top;
    padding-top: 8px;
    white-space: nowrap;
    font-size: small;
    font-weight: 600;
    width: 1%;
}

/* ---- Grid ---- */
.mGrid {
    width: 100%;
    background-color: #fff;
    margin: 5px 0 10px 0;
    border: solid 1px #dee2e6;
    border-collapse: collapse;
    text-align: center;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}
.mGrid td {
    padding: 8px 10px;
    border: solid 1px #dee2e6;
    color: #495057;
    height: 38px;
    font-size: 0.9rem;
    vertical-align: middle;
}
/* Hover highlight on data rows */
.mGrid tbody tr:hover td {
    background-color: #e8f8ee !important;
}
.mGrid th {
    height: 44px;
    padding: 8px 10px;
    border: solid 1px #198a45;
    background-color: #21a957;
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
    font-weight: 600;
}
/* Sort link inside header */
.mGrid th a {
    color: #fff !important;
    text-decoration: none;
}
.mGrid th a:hover {
    color: #c8f5d8 !important;
    text-decoration: underline;
}
.mGrid .alt { background: #f4fdf7; }
.mGrid .pgr { background: #187a3e; }
.mGrid .pgr table { margin: 4px auto; }
.mGrid .pgr td {
    border-width: 0;
    padding: 0 2px;
    height: 20px;
    border: solid 1px #187a3e;
    font-weight: bold;
    color: #fff;
    line-height: 12px;
}
.mGrid .pgr td table tbody tr td {
    border-right: solid 1px #2dc96a;
    border-left: 0; border-bottom: 0; border-top: 0;
    padding: 0 6px;
}
.mGrid .pgr a { color: #a8efc4; text-decoration: none; }
.mGrid .pgr a:hover { color: #d4f8e4; text-decoration: none; }
/* Pager row hover — override the very light body-row hover with a green-appropriate shade */
.mGrid .pgr:hover td { background-color: #1fa84d !important; }

/* ---- Grid status badge / action button — fixed width so AR & EN columns are uniform ---- */
.grid-badge {
    display: inline-block;
    min-width: 110px;
    text-align: center;
}
.grid-btn {
    min-width: 90px;
    text-align: center;
}
/* Text label next to icon — hidden on small screens, spacing handled here not on icon */
.btn-text {
    margin-inline-start: 0.25rem;
}
@media (max-width: 576px) {
    .btn-text   { display: none; }
    .grid-badge { min-width: 32px; }
    .grid-btn   { min-width: 32px; }
}

/* ---- Misc helpers ---- */
.removeBlue {
    background-color: white !important;
    color: black !important;
}

.buttomBorder {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 3px solid #ff9900;
}

/* ---- Report area (screen only) ---- */
.report-area {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
}

/* ---- Report block - used for A4 print breaks ---- */
.report-block {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 14px;
}

/* ---- Print styles ---- */
@media print {
    body {
        display: block !important;
        padding-top: 0 !important;
        font-size: 11pt;
    }
    body > form {
        display: block !important;
    }
    .navbar, .no-print, .btn, footer {
        display: none !important;
    }
    .container, .body-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .report-block {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    @page {
        size: A4 portrait;
        margin: 20mm 12mm;
    }
}

/* ---- Responsive tweaks ---- */

/* Collapsed navbar — public, lg breakpoint (below 992px) */
@media (max-width: 991.98px) {
    .navbar-collapse .navbar-nav {
        flex-direction: column !important;
    }
    .navbar-collapse .nav-item {
        width: 100%;
    }
    .navbar-collapse .nav-link {
        padding: 0.5rem 0.75rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .navbar-collapse .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    .lang-switcher {
        margin-top: 10px;
        padding-bottom: 4px;
    }
}
/* Collapsed navbar — admin logged in, xxl breakpoint (below 1400px, more items) */
@media (max-width: 1399.98px) {
    html.is-admin .navbar-collapse .navbar-nav {
        flex-direction: column !important;
    }
    html.is-admin .navbar-collapse .nav-item {
        width: 100%;
    }
    html.is-admin .navbar-collapse .nav-link {
        padding: 0.5rem 0.75rem;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    html.is-admin .navbar-collapse .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    html.is-admin .lang-switcher {
        margin-top: 10px;
        padding-bottom: 4px;
    }
}

@media screen and (max-width: 768px) {
    .formTd {
        white-space: normal;
    }
    .hiddenCol { display: none; }
}

@media screen and (max-width: 480px) {
    .hiddenColSmall { display: none; }
}
