﻿/*-----------------------
Form layout & spacing
-------------------------*/
form {
    /*background-color: #fff;*/
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    /*margin-top: 30px;
    margin-bottom: 30px;*/
}

/* Headings */
form h5 {
    margin-top: 20px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
}

/* ------------------------
   Labels and inputs
-------------------------*/
.form-label {
    font-weight: 500;
    margin-bottom: 1px;
    color: #444;
    font-size: 14px;
}

.form-control,
.form-select {
    font-size: 13px;
    padding: 4px 10px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid #ced4da;
    transition: border-color 0.2s ease;
}

    .form-control:focus,
    .form-select:focus {
        border-color: #80bdff;
        outline: none;
        box-shadow: none;
    }

/*.form-floating form-control {
    margin-left: -1rem;
}*/

/* Validation messages */
.text-danger {
    font-size: 13px;
    margin-top: 2px;
}

/* ------------------------
   Checkboxes
-------------------------*/
.form-check-input {
    width: 16px;
    height: 16px;
    margin-top: 6px;
    vertical-align: middle;
}
/* ------------------------
   Checkboxes
-------------------------*/
.form-email-body {
    height: 150px!important;
    /*margin-top: 6px;
    vertical-align: middle;*/
}
/* ------------------------
   Buttons
-------------------------*/
button.btn,a.btn, input.btn {
    /*margin-top: 10px;*/
    margin-right: 10px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 500;
    line-height:1rem;
}
/*input.btn {*/
    /*margin-top: 10px;*/
    /*margin-right: 10px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1rem;
}*/
button.btn-only, input.btn-only, a.btn-only {
    margin-top: 22px;
    /* margin-right: 10px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1rem;*/
}

/*input.btn-only {
    margin-top: 22px;*/
    /*margin-right: 10px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1rem;*/
/*}*/

/* ------------------------
   Table styling
-------------------------*/
/*.table {
    width: 100%;
    font-size: 14px;
    border-collapse: collapse;
}

    .table th,
    .table td {
        padding: 6px 10px;
        vertical-align: middle;
        border: 1px solid #dee2e6;
        background-color: #fff;
    }

    .table thead th {
        background-color: #f8f9fa;
        font-weight: 600;
    }

    .table tbody tr:hover {
        background-color: #f1f1f1;
    }*/

    /* Make inputs inside tables smaller */
    /*.table .form-control,
    .table .form-select,
    .table .form-check-input {
        font-size: 13px;
        height: 30px;
        padding: 2px 6px;
    }*/

/* Responsive wrapping */
/*.table-responsive {
    overflow-x: auto;
       width: 100%;
}*/
tr {
    border-width: 1px; /* border */
    --tw-border-opacity: 1; /* border-gray-200 */
    border-color: rgb(229 231 235 / var(--tw-border-opacity)); /* border-gray-200 */
}
    /* Subtle stripe effect */
    tr:nth-child(even) {
        background: rgba(255, 255, 255, 0.4);
        background-color: #f8f9fa;
    }

:is(.dark tr) {
    --tw-border-opacity: 1; /* dark:border-gray-700 */
    border-color: rgb(55 65 81 / var(--tw-border-opacity)); /* dark:border-gray-700 */
}

:is(.dark thead) {
    background-color: rgb(55 65 81 / var(--tw-bg-opacity)); /* dark:bg-gray-700 */
    color: rgb(255 255 255 / var(--tw-text-opacity)); /* dark:text-white */
}

/* Make table full width and readable */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

    /* Uniform row height in tbody */
    .table tbody tr td {
        padding: 4px 8px;
        line-height: 1.2;
        height: 32px; /* Fixed visual height */
        vertical-align: middle;
        white-space: nowrap; /* Prevent text wrapping */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Header styling */
    .table thead th {
        padding: 6px 10px;
        background-color: #f9f9f9;
        font-weight: 600;
        vertical-align: middle;
        white-space: normal;
    }

    /* Align all form controls neatly */
    .table .form-check-input,
    .table .form-control,
    .table .form-select {
        height: 28px;
        padding: 2px 6px;
        font-size: 13px;
        line-height: 1.2;
    }

    /* Optional: Reduce default margins of checkboxes */
    .table .form-check-input {
        margin-top: 0;
        margin-bottom: 0;
    }

    /* Ensure select elements look consistent */
    .table .form-select {
        padding: 2px 6px;
    }

    /* Optional: style borders */
    .table,
    .table th,
    .table td {
        border: 1px solid #dee2e6;
    }
tr.required-row {
    background-color: #ffe6e6 !important;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.action-column {
    min-width: 50px;
    max-width: 100px;
    white-space: nowrap;
}
.long-text-column {
    min-width: 150px;
    max-width: 300px;
    /*white-space: nowrap;*/ /* Keeps content in one line */
}
.small-text-column {
    min-width: 20px;
    max-width: 150px;
   
    /*white-space: nowrap;*/ /* Keeps content in one line */
}
/* Optional: reduce spacing between form columns */
.col-md-3, .col-md-4, .col-md-6 {
    margin-bottom: 6px;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.5); /* rgba(0, 0, 0, 0.5);*/ /* Semi-transparent background */
    z-index: 9999; /* Make sure it stays on top */
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: all; /* Ensures it blocks clicks */
    cursor: wait; /* Optional: change cursor */
}

body.loading-active {
    overflow: hidden;/* Prevent scrolling while loading */
  /* pointer-events: none; *//* Prevent user interaction */
}

    /*body.loading-active  {
        pointer-events: none;*/ /* Block interaction with all elements */
    /*}*/

    body.loading-active .loading-overlay {
        pointer-events: all !important; /* Allow spinner overlay to handle events (if needed) */
    }
/*.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

    .loading-overlay .spinner {
        border: 5px solid #ccc;
        border-top: 5px solid #007bff;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        animation: spin 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}*/

.required-field {
color:red;
}
h5 {
    margin-top: 20px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
}
.observationpass {
  
    background-color: green !important;
}
.observationfail{
    background-color: red !important;
}
.align-bottom {
    vertical-align: bottom;
}
.sample-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ccc;
    margin-top: 1rem;
    font-size: 0.9rem; /* Slightly smaller text */
}

    .sample-table td {
        border: 1px solid #ddd;
        padding: 4px 8px; /* Reduced vertical and horizontal padding */
        text-align: left;
        vertical-align: middle;
        line-height: 1.2; /* More compact line spacing */
    }

.sample-cell {
    min-width: 100px; /* Slightly narrower cells */
}

.sample-label {
    margin-left: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #333;
}

.sample-table tr:hover {
    background-color: #f1f7ff;
}
