/* Survey-specific styles for Bootstrap 5 */

/* Survey question table */

/* Keep min-height so radio click targets are comfortable */
.survey-option { min-height: 2.5rem; }

/* Make the survey table its own scroll container so position: sticky works.
   (CSS has no way to have overflow-x: auto without the element also becoming
   the sticky anchor for the y-axis — the only fix is to make it actually scroll.) */
.table-responsive:has(#items) {
    max-height: 65vh;
    overflow-y: auto;
}

/* Sticky column header — works on both desktop and mobile.
   Background must be set explicitly so scrolled rows don't show through. */
#items thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--bs-light);
    /* Reinforce the bottom border which can disappear under sticky */
    box-shadow: inset 0 -1px 0 var(--bs-border-color);
}

/* On mobile, shrink the header text so more columns fit before scrolling */
@media (max-width: 767.98px) {
    #items thead th {
        font-size: 0.65rem;
        padding: 0.3rem 0.15rem;
        line-height: 1.2;
    }
}

/* ASP.NET Core server-side validation → Bootstrap 5 visual integration */
.field-validation-error {
    color: var(--bs-danger);
    font-size: 0.875em;
}
.input-validation-error {
    border-color: var(--bs-danger) !important;
}

/* body {
    background-color: #fffbcc;
} */

/* Multi-column list for student rosters */
ul.columns {
    column-count: 2;
    column-gap: 2rem;
}

@media (max-width: 576px) {
    ul.columns {
        column-count: 1;
    }
}

/* Access code display */
code.access-code {
    font-size: 1.4rem;
    letter-spacing: 2px;
}

/* Completed-reports table gap row */
#completed-reports tr.gap td {
    text-align: center;
    color: #6c757d;
}

/* Vertical-flow card columns for site lists */
.card-columns {
    column-count: 1;
    column-gap: 1rem;
}
.card-columns .card {
    break-inside: avoid;
    margin-bottom: 1rem;
}
@media (min-width: 576px)  { .card-columns { column-count: 2; } }
@media (min-width: 992px)  { .card-columns { column-count: 3; } }
@media (min-width: 1400px) { .card-columns { column-count: 4; } }

/* Sticky site-jump bar — semi-transparent until hovered/focused */
#siteJumpBar {
    background: rgba(255, 255, 255, 1);
    opacity: 0.90;
    transition: opacity 0.2s, background 0.2s;
}
/* Jump-to highlight — uses outline so it doesn't affect layout */
.site-jump-highlight {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
}

#siteJumpBar .ts-wrapper {
    flex: 1 1 500px;
    max-width: 600px;
    min-width: 0;
}
#siteJumpBar:hover,
#siteJumpBar:focus-within {
    background: rgba(255, 255, 255, 1);
    opacity: 1;
}

/* Tom Select sizing for site multiselect */
.ts-wrapper.ts-sites {
    max-width: 500px;
}

/* Simulated-date sash (upper-right corner ribbon) */
.sim-sash {
    position: fixed;
    top: 0;
    right: 0;
    width: 130px;
    height: 130px;
    overflow: hidden;
    pointer-events: none;
    z-index: 9999;
}

.sim-sash span {
    position: absolute;
    top: 28px;
    right: -32px;
    width: 150px;
    background: #e63946;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    font-family: sans-serif;
    text-align: center;
    line-height: 1.3;
    padding: 5px 0;
    transform: rotate(45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
