:root {
    --bs-primary: #d35400; /* Dark orange (you can customize this) */
}


/* Style checkbox when checked */
input[type="checkbox"]:checked {
    accent-color: #d35400; /* Dark orange */
}

.pagination .page-link {
    color: #d35400; /* Text color for unselected page links */
}

    .pagination .page-link:hover {
        background-color: #fbe9e0; /* Light orange hover */
        border-color: #d35400;
        color: #d35400;
    }

.pagination .page-item.active .page-link {
    background-color: #d35400;
    border-color: #d35400;
    color: white;
}

.btn:focus, .form-control:focus {
    border-color: #d35400;
    box-shadow: 0 0 0 0.25rem rgba(211, 84, 0, 0.25);
}

html, body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.4;
    color: #333;
    background-color: #FFF8F0;
}

/* Ensure proper stacking context */
body {
    position: relative;
}

body {
    background-image: url('..//iabackground2025.jpg');
    background-size: cover; /* Ensures full-screen coverage */
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Optional: Fixed background on scroll */
}


h1, h2, h3, h4, h5, h6 {
    color: #f39114; 
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.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yNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

.sidebar {
    background-color: orange;
}

.navbar-toggler {
    background: orange !important;
}

.navbar-dark {
    background: #FFF8F0 !important;
}

.navbar-light {
    background: #FFF8F0 !important;
}

.nav-scrollable {
    background: #f39114 !important;
}

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

table {
    margin-top: 0;
    margin: 0; /* Reduced from 1em */
    border-collapse: separate; /* Changed from collapse for rounded corners */
    border-spacing: 0;
    border: 0;
    border-top: 0;
    border-radius: 0; /* Only round bottom corners */
    overflow: hidden; /* Ensures corners stay rounded */
    table-layout: auto;
    background-color: #FFF8F0; /* Match your page background */
}

    /* Round corners for thead */
    table thead tr:first-child th:first-child {
        border-top-left-radius: 0px;
    }

    table thead tr:first-child th:last-child {
        border-top-right-radius: 0px;
    }

    /* Round corners for tbody */
    table tbody tr:last-child td:first-child {
        border-bottom-left-radius: 0px;
    }

    table tbody tr:last-child td:last-child {
        border-bottom-right-radius: 0px;
    }


/* Table wrapper */
.table-wrapper {
    position: relative;
    flex-grow: 1;
    overflow: auto;
    /*height: calc(100vh - 120px);*/ /* Adjust based on your header height */
    
}

/* Scrolling container */
.table-responsive {
    display: flex;
    flex-direction: column;
    /*height: 100%;*/
    overflow: hidden;
    margin-top: -1px; /* Helps prevent 1px gap between search and table */
    /*max-height: calc(100vh - 120px);*/ /* Adjust based on your needs */
display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px; /* Only round bottom corners */
    border: 0.3em solid #f39114;
}

caption {
    text-align: left;
    font-style: italic;
    padding: 0.25em 0.5em 0.5em 0.5em;
}

th,
td {
    padding: 0.25em 0.5em 0.25em 1em;
    vertical-align: text-top;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-indent: 0;
}

th {
    vertical-align: bottom;
    background-color: #f39114;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ensure table cells have proper background */
.table-view tbody {
    background-color: white;
    position: relative;
}

/* Reduce space between search and table */
.table-view {
    margin-top: 0;
    border-collapse: separate;
    border-spacing: 0;
}

    .table-view td:focus-within {
        outline: 2px dashed #f39114;
        background-color: #fff3e0;
    }

    .table-view tr.selected {
        background-color: #ffe0b3; /* light warm highlight */
        outline: 2px solid #f39114;
    }

    .table-view tr:hover {
        background-color: #fff0dc; /* soft orange tint */
    }


    /* Selected Row Styling */
    .table-view tr.table-row-selected {
        background-color: #ffe5c2; /* A soft warm orange background */
        color: #000; /* Ensure text remains legible */
    }

        /* Optional: Add border or shadow for extra emphasis */
        /*.table-view tr.table-row-selected td {
            border-left: 4px solid #f39114;
        }*/

.table-scroll-container {
    max-height: 800px; /* or whatever height you want */
    overflow-y: auto;
    border: 1px solid #ddd;
}

/* Table body - scrollable area */
.table-body-scrollable {
    flex-grow: 1;
    overflow-y: auto;
    margin-top: -1px; /* Helps prevent 1px gap */
    max-height: calc(100vh - [header_height] - [search_height]);
}

/* If your table has a thead with sticky headers, adjust padding */
    .table-view thead th {        
        padding-top: 0.2rem; /* Reduce header padding */
        padding-bottom: 0.3rem;
        background-color: #f39114 !important;
        border-radius: 0;
    }

.table-view td, .table-view th {
    transition: background-color 0.2s ease, color 0.2s ease;
}


.table-view th:not(:first-child) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;    
    padding: 8px 12px; /* Ensure consistent padding */
}

.table-view .sortable-header {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-no-wrap {
    table-layout: fixed; /* Enforce fixed column layout */
    width: 100%;          /* Ensure it doesn't shrink too small */
}

.table-no-wrap th,
.table-no-wrap td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-wrap td,
.table-wrap th {
    width: auto !important;
    white-space: normal !important;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word; /* Break long words if needed */
    vertical-align: top;
}



tr:nth-child(even) th[scope="row"] {
    background-color: #f2f2f2;
}

tr:nth-child(odd) th[scope="row"] {
    background-color: #fff;
}

tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.05);
}

tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.05);
}

td:nth-of-type(2) {
    font-style: italic;
}

th:nth-of-type(3),
td:nth-of-type(3) {
    text-align: right;
}

/* Fixed Headers */

th {
    /*   position: -webkit-sticky; */
    position: relative;
    /*   top: 0; */
    inset-block-start: 0;
    z-index: 2;
}

    th[scope="row"] {
        /*   position: -webkit-sticky; */        
        /*   left: 0; */
        inset-inline-start: 0;
        z-index: 1;
        /*   background: linear-gradient(
    90deg,
    transparent 0%,
    transparent calc(100% - 0.09em),
    #f00 calc(100% - 0.09em),
    #f00 100%
  ); */
    }

        th[scope="row"]::after {
            content: "";
            position: absolute;
            /*   inset-inline: calc(100% - .1em) 0; */
            inset-inline-end: 0;
            inset-block: 0;
            border-inline-end: .05em solid #d6d6d6;
        }

    th[scope="row"] {
        vertical-align: top;
        color: inherit;
        background-color: inherit;
        /*   background: linear-gradient(
    90deg,
    transparent 0%,
    transparent calc(100% - 0.09em),
    #d6d6d6 calc(100% - 0.09em),
    #d6d6d6 100%
  ); */
    }

table:nth-of-type(2) th:not([scope="row"]):first-child {
    left: 0;
    z-index: 3;
    background: linear-gradient( 90deg, #666 0%, #666 calc(100% - 0.05em), #ccc calc(100% - 0.05em), #ccc 100% );
}


/* First column (checkbox column) */
th:first-child,
td:first-child {
    width: 30px; /* Minimal width */
    white-space: nowrap;
    padding: 0.5em;
}

/* Data columns */
th:not(:first-child),
td:not(:first-child) {
    width: auto; /* Width based on content */
    min-width: 100px; /* Minimum reasonable width */
    max-width: 300px; /* Maximum before truncation */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-view td:not(:first-child) a {
    color: #c5760c; /* Darker shade of your main orange */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.table-view td {
    /* Match your header-cell widths */
    padding: 8px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* Hover state */
.table-view tr td:not(:first-child) a:hover {
    color: #f39114; /* Your orange color on hover */
    text-decoration: underline;
}

/* Visited links */
.table-view tr td:not(:first-child) a:visited {
    color: #6a3b0d; /* Dark brown-orange */
}


/* Strictly for making the scrolling happen. */

th[scope="row"] + td {
    min-width: 24em;
}

th[scope="row"] {
    min-width: 20em;
}


.sortable-header {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.sortable-header:hover {
    text-decoration: underline; /* Optional on hover */
 }

.label-orange {
    background-color: #f39114;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    font-weight: bold;
}

.tri-state-checkbox {
    width: 1.2em;
    height: 1.2em;
    cursor: pointer;
}

/*Search Box Elements */
.search-container {    
    background-color: #f39114;
    padding: 0.4rem;
    color: white;
}



.records-count {
    background-color: #e07b11;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: bold;
    white-space: nowrap;
    margin-right: 0.1rem; /* Added space between count and search */
}

.search-group {
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 250px;
}

.search-label {
    margin-left: 0.5rem; /* New space before "Search" */
    margin-right: 0.75rem;
    font-weight: bold;
    white-space: nowrap;
}

.search-input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid #d6d6d6;
    border-radius: 4px;
    min-width: 200px;
}

.search-container {
    display: flex;
    align-items: center; /* Vertically align the items */
    justify-content: flex-start; /* Align items to the left */
    gap: 10px; /* Optional: adds spacing between items */
}

/* Style for records count */
.records-count {
    margin-right: 15px; /* Optional: adds spacing between the record count and the search box */
}

/* Style for the search label and input */
.search-label {
    margin-right: 5px; /* Optional: adds spacing between label and input */
}

.search-input {
    padding: 5px;
    width: 200px; /* Adjust the width of the search input */
}

/* Responsive stacking - ensures space is removed when stacked */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .search-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .records-count {
        margin-right: 0; /* Remove extra space when stacked */
        margin-bottom: 0.5rem;
    }

    .search-label {
        margin-left: 0; /* Remove extra space when stacked */
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .table-responsive {
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    th, td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
}



/* Table header row */
.table-header-row {
    display: flex;
    background-color: #f39114;
    color: white;
    border-radius: 0;
}

.header-cell {
    padding: 8px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
    border-radius: 0;
}

/* Table body container */
.table-body-container {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 0.5rem;    
}

.btn-xs {
    padding: 0.3rem 0.3rem;
    font-size: 0.65rem;
    line-height: 1;
    border-radius: 0.15rem;
}

    .btn-xs i {
        font-size: 0.75rem;
    }

.menubox {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    column-gap: 10px;
    list-style-type: disc;
    background-color: #fff0dc;
    border-radius: 1.0rem;
    padding: 0.6rem 1.2rem;
    margin-bottom: 12px;
}

.menutitle {
    display: flex;
    padding: 0.2rem 0.1rem;
    color: #b5660c; /* Darker shade of your main orange */
    text-decoration: none;
    font-weight: 800;
    background-color: #fff0dc; /* A soft warm orange background */
}

.menuitem a {
    display: flex;
    padding: 0.2rem 0.1rem;
    color: #c5760c; /* Darker shade of your main orange */
    text-decoration: none;
    font-weight: 500;
    text-indent: 0.6em;
    border-radius: 0.3rem;
    background-color: #fff0dc; /* A soft warm orange background */
}

    .menuitem a:hover {
        display: flex;
        padding: 0.2rem 0.1rem;
        text-decoration: none;
        font-weight: 500;
        text-indent: 0.6em;
        transition: color 0.2s ease;
        background-color: #ffe0b3; /* A soft warm orange background */
    }

