html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.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;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.password-requirements {
    display: grid;
    gap: 0.35rem;
}

.password-requirements .requirement {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    color: #6c757d;
    line-height: 1.35;
}

.password-requirements .requirement i {
    margin-top: 0.12rem;
    flex: 0 0 auto;
}

.password-requirements .requirement.met {
    color: #198754;
    font-weight: 600;
}

.password-requirements .requirement.met i {
    color: #198754 !important;
}

.password-requirements .requirement:not(.met) i {
    color: #6c757d !important;
}

.register-page .registration-role-option {
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.register-page .registration-role-option:hover {
    border-color: #0d6efd !important;
    box-shadow: 0 0.5rem 1rem rgba(13, 110, 253, 0.08);
    transform: translateY(-1px);
}

.register-page .registration-role-option .form-check-input {
    margin-top: 0.15rem;
}

.register-page .form-check-label {
    line-height: 1.35;
}

.register-page {
    width: 100%;
    max-width: 1920px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(0.75rem, 1.8vw, 2rem);
    padding-right: clamp(0.75rem, 1.8vw, 2rem);
}

.register-page-badge {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
}

.error-field {
    font-family: inherit;
    margin-top: .25rem;
    font-size: 0.875em;
    font-weight: normal;
    color: #dc3545;
}

.input-validation-error {
    border-color: #dc3545;
}

.input-validation-error:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.validation-summary-errors {
    color: #dc3545;
}

.bg-mid-gray {
    background-color: #d6d8db;
}
/* ============================================================
   START: Sorting & Filtering Styles (Matches Dashboard.cshtml)
   ============================================================ */
/* Container for the header text and the arrows */
.sortable-header {
    cursor: pointer;
    user-select: none;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Optional: spreads text and arrows */
}

    .sortable-header:hover {
        color: #0d6efd; /* Bootstrap primary hover color */
    }
/* Container strictly for the two arrows */
.sort-container {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    vertical-align: middle;
}
/* The individual arrow icons */
.sort-icon {
    display: block;
    font-size: 1.1em;
    transition: color 0.15s ease;
    padding: 0;
    margin-right: -5px; /* Pulls the arrows closer together */
    line-height: 1;
}
/* Gray out the arrow that isn't active */
.inactive-sort {
    color: #ccc;
    font-weight: 400;
}
/* Darken the arrow that IS active */
.active-sort {
    color: #333;
    font-weight: 700;
}
/* Fix for action icons (Edit/Delete) having underlines */
td.text-nowrap a {
    text-decoration: none !important;
}
/* Visual styling for disabled nav buttons */
/*.nav-form button.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
    color: #6c757d !important;*/ /* Bootstrap muted gray */
    /*text-decoration: none !important;
}*/

/* ============================================================
   Select Enhancer (merged from vanilla_select.css)
   ============================================================ */
.lis-select {
    display: grid;
    gap: 0.25rem;
    width: 100%;
}

.lis-select-search {
    width: 100%;
}

.floor-plan-row .floor-plan-actions {
    font-size: 0.85rem;
    white-space: nowrap;
}

.floor-plan-actions a {
    text-decoration: underline;
}

.floor-plan-actions .floor-plan-view-edit a {
    font-weight: 600;
}

.floor-plan-actions .floor-plan-link-active {
    color: #0d6efd;
}

.floor-plan-actions .floor-plan-link-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.floorplan-preview {
    max-height: 70vh;
    overflow: auto;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    padding: 0.75rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

.floorplan-preview-stage {
    position: relative;
    display: inline-block;
    transform-origin: center center;
}

.floorplan-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    transform-origin: center center;
}

.floorplan-preview-canvas {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    pointer-events: none;
}

.floorplan-preview .floorplan-pdf {
    width: 100%;
    height: 70vh;
    border: 0;
    display: block;
}

.floorplan-viewport {
    width: 100%;
    height: 60vh;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background: #f8f9fa;
    overflow: hidden;
    position: relative;
    cursor: default;
    user-select: none;
    touch-action: none;
}

.floorplan-viewport.floorplan-marker-mode {
    cursor: crosshair;
}

.floorplan-viewport.floorplan-marker-mode.floorplan-readonly,
.floorplan-viewport.floorplan-readonly {
    cursor: grab;
}

.floorplan-viewport.floorplan-panning {
    cursor: grabbing;
}

.floorplan-viewport.floorplan-panning .floorplan-interaction-layer,
.floorplan-viewport.floorplan-panning .floorplan-no-marker-layer {
    cursor: grabbing;
}

.floorplan-canvas {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    user-select: none;
    background: #ffffff;
}

.floorplan-canvas img {
    display: block;
    max-width: none;
    user-select: none;
    -webkit-user-drag: none;
}

.floorplan-canvas .floorplan-pdf-canvas {
    display: block;
    max-width: none;
    border: 0;
    user-select: none;
    pointer-events: none;
    background: #ffffff;
}

.floorplan-canvas .floorplan-pdf {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    pointer-events: auto;
    user-select: none;
}

.floorplan-interaction-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    cursor: crosshair;
    pointer-events: auto;
}

.floorplan-interaction-layer.is-readonly {
    cursor: grab;
}

.floorplan-interaction-layer.pdf-toolbar-offset {
    top: var(--fp-pdf-toolbar-height, 48px);
    height: calc(100% - var(--fp-pdf-toolbar-height, 48px));
}

.floorplan-no-marker-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--fp-pdf-toolbar-height, 56px);
    z-index: 3;
    cursor: default;
    pointer-events: none;
}

.floorplan-viewport.floorplan-readonly .floorplan-no-marker-layer.is-active {
    cursor: grab;
}

.floorplan-no-marker-layer.is-active {
    pointer-events: auto;
}

.floorplan-marker {
    width: var(--fp-marker-size, 16px);
    height: var(--fp-marker-size, 16px);
    border-radius: var(--fp-marker-radius, 50%);
    background: var(--fp-marker-color, #dc3545);
    border: 2px solid #ffffff;
    position: absolute;
    z-index: 2;
    transform: translate(-50%, -50%) rotate(var(--fp-marker-rotate, 0deg));
    cursor: grab;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.floorplan-marker.dragging {
    cursor: grabbing;
}

.floorplan-marker.is-locked {
    cursor: not-allowed;
    opacity: 0.85;
}
/* Sample Results: outlet photo hover preview and lab optgroup hints */
.action-cell .sample-not-collected-note {
    display: block;
    text-align: center;
    margin: 0 auto;
    white-space: normal;
    max-width: 140px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.outlet-photo-card {
    position: relative;
    width: 110px;
}
.outlet-floorplan-preview-card {
    width: 122px;
}
.outlet-floorplan-thumbnail {
    width: 96px;
    height: 72px;
    margin: 0 auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.outlet-floorplan-stage {
    position: relative;
    flex: 0 0 auto;
}
.outlet-floorplan-thumbnail img,
.outlet-floorplan-thumbnail canvas {
    display: block;
}
.outlet-photo-thumb {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 4px;
}
.outlet-photo-preview {
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translate(-50%, -8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: #fff;
    padding: 6px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    z-index: 1060;
}
.outlet-photo-preview-img {
    width: 240px;
    height: 180px;
    max-width: 70vw;
    max-height: 50vh;
    object-fit: contain;
    display: block;
}
.outlet-photo-card:hover .outlet-photo-preview {
    opacity: 1;
    visibility: visible;
}
#lab_LIS_MTB_LAB_CONTRACTED_NAME_ID optgroup,
#lab_LIS_MTB_LAB_ANALYZINGSAMPLE_NAME_ID optgroup {
    color: var(--bs-secondary-color);
    font-style: italic;
    font-weight: 600;
}
#lab_LIS_MTB_LAB_CONTRACTED_NAME_ID optgroup option,
#lab_LIS_MTB_LAB_ANALYZINGSAMPLE_NAME_ID optgroup option {
    color: var(--bs-body-color);
    font-style: normal;
    font-weight: 400;
}

/* Testing Period Workflow page styles */
.testing-period-workflow-page .workflow-action-card {
    display: block;
    height: 100%;
    padding: 1.25rem;
    border: 1px solid #d7dee7;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #f9fbfd 0%, #edf4fb 100%);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    color: inherit;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.testing-period-workflow-page .workflow-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
    text-decoration: none;
}

.testing-period-workflow-page .workflow-action-card.disabled {
    background: #f5f5f5;
    color: #6c757d;
    box-shadow: none;
    cursor: not-allowed;
}

.testing-period-workflow-page .workflow-action-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.testing-period-workflow-page .workflow-summary-card {
    border: 1px solid #d7dee7;
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.testing-period-workflow-page .workflow-metric {
    padding: 0.9rem 1rem;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.testing-period-workflow-page .workflow-metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.testing-period-workflow-page .workflow-help-list {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
}

.testing-period-workflow-page .sampling-event-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 22rem;
}

.testing-period-workflow-page .sampling-event-primary-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.testing-period-workflow-page .sampling-event-docs {
    display: grid;
    gap: 0.6rem;
}

.testing-period-workflow-page .sampling-event-doc-card {
    border: 1px solid #d7dee7;
    border-radius: 0.8rem;
    background: #f8fafc;
    padding: 0.75rem;
}

.testing-period-workflow-page .sampling-event-doc-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.testing-period-workflow-page .sampling-event-doc-meta {
    min-height: 1.25rem;
}

.testing-period-workflow-page .sampling-events-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.testing-period-workflow-page .sampling-events-context-selector-host {
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 2.25rem;
}

.testing-period-workflow-page .testing-periods-context-selector {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}
