﻿/*-----------------------
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-size: 0.8rem;
        font-weight: 600;
        color: #333;
        border-bottom: 1px solid #ccc;
        padding-top: 3px;
        padding-bottom: 3px;
        background-color: #dee2e6; /* f9f9f9*/
    }

/* ------------------------
   Labels and inputs
-------------------------*/
.form-label {
    font-weight: 500;
    margin-bottom: 1px;
    color: #444;
    font-size: 14px;
}

.form-control,
.form-select {
    font-size: 13px;
    padding-top: 4px;
    padding-bottom: 4px;
    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;
}

.textarea-larg {
    /*height: 28px;*/
    padding: 2px 6px;
    font-size: 13px;
    line-height: 1.2;
    min-height: calc(5.5em + .75rem + 2px);
    width: 100%;
    resize: vertical; /* Optional: allow users to resize vertically */
}
/*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;*/
    font-weight: 400;
    font-size: 0.8rem;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, system-ui, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
    color: rgb(107 114 128 / var(--tw-text-opacity));
}

    /* Uniform row height in tbody */
    .table tbody tr td {
        padding: 2px 2px;
        line-height: 1.2;
        height: 25px; /* Fixed visual height */
        vertical-align: middle;
        /*white-space: nowrap;*/ /* Prevent text wrapping */
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Header styling */
    .table thead th {
        padding: 2px 2px;
        background-color: #f9f9f9;
        font-weight: 600;
        vertical-align: middle;
        white-space: normal;
        height: 2.4rem;
    }

    /* 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 {
    width: 100px;
    min-width: 70px;
    max-width: 150px;
    white-space: nowrap !important;
    /*white-space: nowrap;*/ /* Keeps content in one line */
}

.number-column {
    min-width: 20px;
    max-width: 70px;
    /*white-space: nowrap;*/ /* Keeps content in one line */
}

.checkbox-column {
    min-width: 20px;
    max-width: 50px;
    /*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;
}

.custom-multiselect {
    height: 120px;
    padding: 6px;
    /*font-size: 1rem;*/
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}

    .custom-multiselect option {
        padding: 4px;
    }

.mainlayout-dropdown {
    width: auto;
    min-width: 40px;
    background-color: #f7f7f7;
    border-color: #f7f7f7;
}

    .mainlayout-dropdown i {
        font-size: 17px;
        vertical-align: middle;
        margin-right: 5px;
        color: $gray-600;
    }

    .mainlayout-dropdown span {
        margin-top: 5px;
    }

.page-item {
    height: 32px;
    padding: 1px;
    /*display: initial !important;*/
}

.page-link {
    height: 31px;
    margin-top: 1px;
    /*padding: 1px;*/
    display: initial !important;
}

.boldtext {
    font-weight: 600;
}

.rz-cell-data {
    white-space: normal !important;
    /* word-break: break-word;*/
}
/*.user-dropdown {
    position: absolute;
    top: 10px;
    right: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    z-index: 1000;
}

.user-name {
    cursor: pointer;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.2s ease-in-out;
}

    .user-name:hover {
        background-color: #e0e0e0;
    }

.dropdown-menu {
    margin-top: 5px;
    padding: 0;
    list-style: none;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: absolute;
    right: 0;
    display:block;
}

    .dropdown-menu li {
        border-bottom: 1px solid #eee;
    }

        .dropdown-menu li:last-child {
            border-bottom: none;
        }

    .dropdown-menu a,
    .dropdown-button {
        display: block;
        width: 100%;
        padding: 10px 15px;
        text-decoration: none;
        color: #333;
        background: none;
        border: none;
        text-align: left;
        cursor: pointer;
    }

        .dropdown-menu a:hover,
        .dropdown-button:hover {
            background-color: #f0f0f0;
        }
*/
