﻿/* General layout adjustments */

input[type="text"] {
    font-weight: bold;
}

select {
    font-weight: bold; /* Makes the selected value bold */
}

    select option {
        font-weight: bold; /* Makes the options in the dropdown bold */
    }
/* Style the selected item */
.select2-selection__rendered {
    font-weight: bold;
}

/* Style the options inside the dropdown */
.select2-results__option {
    font-weight: bold;
}


.container {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
}

.card_trasaction {
    background-color: white;
    border: 1px solid #f2f2f2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
/* Tab styles */
.nav-pills .nav-link {
    color: #333;
    background-color: #e9ecef;
    border-radius: 5px;
    margin-right: 5px;
    padding: 10px 15px;
    font-weight: bold;
}

    .nav-pills .nav-link.active {
        background-color: #007bff;
        color: #fff;
    }

.nav-link {
    transition: background-color 0.3s;
}

    .nav-link:hover {
        background-color: #0056b3;
        color: #fff;
    }

.btn {
    transition: background-color 0.3s;
}

    .btn:hover {
        opacity: 0.8;
    }
/* Table styles */
.table-bordered {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    background-color: #f0f4f8;
    color: #333;
    padding: 10px;
    font-weight: bold;
}

.table td {
    padding: 10px;
    color: #555;
}

#transactionTableBody tr.selected {
    background-color: #6583f2 !important;
    color: #fff !important;
}

/* Card styles */
.custom-card .card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: box-shadow 0.3s ease-in-out;
}

    .custom-card .card:hover {
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    }

.card-header {
    font-weight: bold;
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

    .card-header.bg-primary {
        background-color: #007bff !important;
        color: #fff;
    }

    .card-header.bg-success {
        background-color: darkviolet !important;
        color: #fff;
    }

/* Form styling */
.form-control-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    color: #495057;
    background-color: #ffffff;
    border: 1px solid #ced4da;
}

label.small-text {
    font-size: 0.9rem;
    font-weight: bold;
}

/* Editable cells */
.editable[contenteditable="true"] {
    background-color: #fffbe6;
    border: 1px dashed #888;
    padding: 5px;
}

/* Button group */
.btn-group .btn {
    margin-right: 5px;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.d-flex.justify-content-center .btn-group {
    margin-top: 10px;
}

.btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

    .btn-outline-primary:hover {
        background-color: #007bff;
        color: #fff;
    }

.btn-outline-info {
    border-color: #17a2b8;
    color: #17a2b8;
}

    .btn-outline-info:hover {
        background-color: #17a2b8;
        color: #fff;
    }

.btn-outline-success {
    border-color: #28a745;
    color: #28a745;
}

    .btn-outline-success:hover {
        background-color: #28a745;
        color: #fff;
    }

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}




    .btn-outline-danger:hover {
        background-color: #dc3545;
        color: #fff;
    }

/* Badge styling */
.badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
}

    .badge.bg-danger {
        background-color: #dc3545;
        color: #fff;
    }

    .badge.bg-success {
        background-color: #28a745;
        color: #fff;
    }

/* Modal styling */
.modal-content {
    border-radius: 8px;
}




.modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.modal-footer {
    border-top: none;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

#doneButton {
    font-size: 15px;
    padding: 12px 24px;
}

.custom-button-group .btn {
    font-size: 18px;
    padding: 12px 24px;
    width: 100%;
}





.form-label {
    font-weight: bold;
}

.sensitivity-section {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.list-box {
    width: 70%;
    height: 150px;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 5px;
    overflow-y: auto;
    background-color: #fff;
}

.text-area-box {
    width: 30%;
    height: 150px;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 5px;
    resize: vertical;
}

.note-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

    .note-section input {
        flex: 1;
    }

.sensitivity-section label {
    display: block;
    text-align: center;
    font-weight: bold;
    margin-bottom: 5px;
}

.done-btn {
    background-color: #ffcc00;
    color: #000;
    font-weight: bold;
}

.resize-vertical {
    resize: vertical;
}

.checkbox-label {
    display: flex;
    align-items: center;
}

.text-area-box {
    width: 200px;
}

.custom-scroll {
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #888 transparent; /* For Firefox */
}

    .custom-scroll::-webkit-scrollbar {
        width: 6px; /* Reduced scrollbar width */
    }

    .custom-scroll::-webkit-scrollbar-thumb {
        background: #888; /* Scrollbar thumb color */
        border-radius: 4px; /* Rounded edges */
    }

        .custom-scroll::-webkit-scrollbar-thumb:hover {
            background: #555; /* Darker on hover */
        }

    .custom-scroll::-webkit-scrollbar-track {
        background: transparent; /* Background of the scrollbar */
    }
/* For Cards */
.SelectTestfrombtn {
    cursor: pointer;
}

/* For List Items */
#selectFromLists li {
    cursor: pointer;
}

/* Hover Effect for Departments List */
#Departments li {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    #Departments li:hover {
        background-color: #f0f0f0; /* Light grey */
    }

/* Hover Effect for Test Data List */
.TestDataOfDepartment div {
    cursor: pointer;
    transition: background-color 0.3s ease;
}

    .TestDataOfDepartment div:hover {
        background-color: #f0f0f0; /* Light grey */
    }

.result-checkbox {
    margin-right: 10px;
}

#selectAllCheckbox {
    margin-bottom: 10px;
}

select {
    text-align: center;
    text-align-last: center; /* For Firefox */
}

option {
    text-align: center;
}

#selectFromList .invoice-application,
#selectTests .invoice-application {
    border: 1px solid #e6edf7;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.package-picker-pane {
    flex: 0 0 32%;
    max-width: 32%;
}

.package-selected-pane {
    flex: 1 1 36%;
    min-width: 0;
}

#selectFromList .d-flex > .w-50,
#selectFromList .package-picker-pane,
#selectFromList .package-selected-pane,
#selectTests .d-flex > .w-25,
#selectTests .d-flex > .w-45,
#selectTests .d-flex > .w-30 {
    min-height: 330px;
}

#selectPackageList,
#selectProfileList,
#Departments {
    list-style: none;
    margin: 0;
    padding: 0;
}

#selectPackageList li,
#selectProfileList li,
#Departments li {
    border-bottom: 1px solid #edf2f7;
    cursor: pointer;
}

#selectPackageList li > div,
#selectProfileList li > div,
#Departments li > div {
    border-radius: 8px;
    margin: 4px 8px;
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

#selectPackageList li:hover > div,
#selectProfileList li:hover > div,
#Departments li:hover > div {
    background-color: #f6f9ff;
}

#selectPackageList li.selected > div,
#selectProfileList li.selected > div,
#Departments li.selected > div {
    background-color: #eef4ff;
    border: 1px solid #5d87ff;
    box-shadow: inset 4px 0 0 #5d87ff;
}

#selectPackageList li.selected h6,
#selectProfileList li.selected h6,
#Departments li.selected h6 {
    color: #1f4fd6;
    font-weight: 700;
}

.TestDataOfselectList,
.TestDataOfDepartment,
.TestSelected {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selected-source-group {
    border: 1px solid #e6edf7;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.selected-source-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fbff;
    border-bottom: 1px solid #e6edf7;
}

.selected-source-type,
.selected-source-count {
    border-radius: 999px;
    background: #e8f0ff;
    color: #2f5de5;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    white-space: nowrap;
}

.selected-source-tests {
    padding: 8px;
}

.selected-test-row,
.test-choice {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    background: #fff;
}

.selected-test-name,
.test-choice-name {
    color: #2a3550;
    line-height: 1.25;
}

.selected-test-code,
.test-choice-code {
    color: #53637d;
    font-size: 12px;
    font-weight: 700;
    background: #f1f5f9;
    border-radius: 999px;
    padding: 3px 8px;
    white-space: nowrap;
}

.test-choice {
    grid-template-columns: auto 1fr;
}

.test-choice-label,
.selected-test-label {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    margin: 0;
    width: 100%;
    cursor: pointer;
}

.test-choice.is-selected,
.selected-test-pill {
    background: #f4f8ff;
    border-color: #9db7ff;
}

.selected-tests-empty {
    color: #7b8798;
    background: #f8fafc;
    border: 1px dashed #d7dee8;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}
/* Center-align the selected option in the dropdown input box */
.select2-container--default .select2-selection--single {
    text-align: center; /* Centers the selected text */
    text-align-last: center; /* Ensures text is centered */
}

/* Center-align the dropdown options */
.select2-container--default .select2-results__option {
    text-align: center; /* Centers the dropdown options */
}
.modal-body {
    max-height: 80vh; /* Ensure the modal body is scrollable if content exceeds the screen height */
    overflow-y: auto;
}

.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto; /* Horizontal scroll for the table */
    white-space: nowrap; /* Prevent table cells from breaking into multiple lines */
}



#labelModal .modal-body span.fw-bold {
    font-size: 16px;
    font-weight: bold;
}
#GroupResultWordTable {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

/* ✅ خلي العرض مرن لكن يلتزم بحد أدنى جيد */
.result-group-table-container {
    flex: 1 1 45%;
    min-width: 320px;
    max-width: 100%;
}

.result-scroll-wrapper {
    max-height: 255px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-top: none;
}

    /* ✅ حدد auto layout لكن بدون min-width الكبير */
    .result-scroll-wrapper > table {
        table-layout: auto;
        width: 100%;
        /* احذف min-width حتى ما يفرض عرض أكبر من الحاجة */
    }

    /* ✅ تحسين عرض الخلايا */
    .result-scroll-wrapper td,
    .result-scroll-wrapper th {
        padding: 8px 10px;
        white-space: nowrap;
    }

/* ✅ اجعل select يمتد حسب الحاجة */
select.selectable-options-dropdown {
    min-width: 100px;
    max-width: 100%;
    width: 100%;
}

/* زر ملاحظة بنفسجي */
  .btn-note{
    background:#6f42c1;           /* Purple */
    border-color:#5a36a3;
    color:#fff;
    border-radius:.5rem;
  }
  .btn-note:hover{ background:#5a36a3; color:#fff; }
  .btn-note:focus{ box-shadow:0 0 0 .2rem rgba(111,66,193,.25); }

  /* الأيقونة صغيرة ومزروعة على الشمال */
  .btn-note .note-icon{ font-size:.9rem; margin-right:.35rem; line-height:1; }

  /* الشارة الحمراء */
  .btn-note .note-badge{
    background:#e63946;   /* Red */
    color:#fff;
    font-weight:700;
    font-size:.65rem;
    padding:.05rem .35rem;
    border-radius:999px;
    margin-left:.35rem;
    vertical-align:middle;
    display:inline-block;
  }



/* شريط العنوان */
.txn-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px; /* مسافة واضحة بين العنوان والأيقونة */
}

/* زر الإيموجي */
.note-emoji-btn {
    appearance: none;
    background: rgba(255,255,255,.25); /* كبسولة شفافة خفيفة */
    border: 0;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 20px; /* حجم الإيموجي */
    line-height: 1;
    display: grid;
    place-items: center;
    position: relative;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(0,0,0,.08), inset 0 0 0 1px rgba(255,255,255,.25);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

    /* تباين أفضل على الخلفية الزرقاء */
    .note-emoji-btn:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,.35);
        box-shadow: 0 6px 14px rgba(0,0,0,.12), inset 0 0 0 1px rgba(255,255,255,.35);
    }

/* الشارة الحمراء */
.note-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444; /* أحمر */
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px rgba(0,0,0,.08);
}

/* Result-entry layout: keep wide result data inside its own workspace. */
body:has(#resultsTab.active) .body-wrapper > .container-fluid {
    max-width: 1380px;
    padding-left: 16px;
    padding-right: 16px;
}

#SingleResultTable,
.group-result-test-sidebar,
.group-result-workspace,
.group-result-workspace > .tab-content,
.group-result-workspace .card {
    min-width: 0;
    max-width: 100%;
}

.single-result-table-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #dce5f3;
    border-radius: 8px;
    background: #fff;
}

.single-result-table-scroll:focus-visible {
    outline: 2px solid #5d87ff;
    outline-offset: 2px;
}

#SingleResultTable .single-result-entry-table {
    width: 100%;
    min-width: 950px;
    table-layout: fixed;
}

#SingleResultTable .single-result-entry-table > :not(caption) > * > * {
    padding: .42rem .35rem;
    text-align: center;
    vertical-align: middle;
    font-size: .875rem;
}

#SingleResultTable .single-result-entry-table thead th {
    text-align: center;
    vertical-align: middle;
}

#SingleResultTable .single-result-entry-table td {
    white-space: nowrap;
}

#SingleResultTable .single-result-entry-table td.test-name,
#SingleResultTable .single-result-entry-table td.test-ranges {
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: center;
}

#SingleResultTable #WordResultSection td.test-result {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
}

#SingleResultTable #ValueRangeResultSection td.test-result.has-last-previous-result {
    position: relative;
    padding-top: 1.65rem;
}

#SingleResultTable #ValueRangeResultSection td.test-result.has-last-previous-result::before {
    content: "Previous Result: " attr(data-last-previous-result);
    position: absolute;
    top: .3rem;
    left: .25rem;
    right: .25rem;
    color: #6c757d;
    font-size: .68rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: normal;
    overflow-wrap: anywhere;
    pointer-events: none;
}

#SingleResultTable .single-result-entry-table th:nth-child(1) { width: 38px; }
#SingleResultTable .single-result-entry-table th:nth-child(2) { width: 140px; }
#SingleResultTable .single-result-entry-table th:nth-child(3) { width: 170px; }
#SingleResultTable .single-result-entry-table th:nth-child(4) { width: 120px; }
#SingleResultTable .single-result-entry-table th:nth-child(5) { width: 96px; }
#SingleResultTable .single-result-entry-table th:nth-child(6) { width: 76px; }
#SingleResultTable .single-result-entry-table th:nth-child(7) { width: 96px; }
#SingleResultTable .single-result-entry-table th:nth-child(8) { width: 46px; }
#SingleResultTable .single-result-entry-table th:nth-child(9) { width: 144px; }
#SingleResultTable .single-result-entry-table th:nth-child(15) {
    width: 86px;
    padding-left: 0;
    padding-right: 0;
    text-align: center !important;
}
#SingleResultTable .single-result-entry-table th:nth-child(16) { width: 104px; }

#SingleResultTable .single-result-entry-table .result-actions-cell {
    min-width: 104px;
    overflow: hidden;
}

#SingleResultTable .single-result-entry-table .result-actions-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .25rem;
    width: 100%;
}

#SingleResultTable .single-result-entry-table .result-actions-stack .btn {
    width: 100%;
    min-width: 0;
    margin-inline: 0 !important;
    justify-content: center;
    white-space: nowrap;
}

#SingleResultTable .single-result-entry-table .open-note-modal {
    max-width: 100%;
    padding: .3rem .42rem;
    gap: .25rem !important;
    font-size: .75rem;
    white-space: nowrap;
}

#SingleResultTable .single-result-entry-table input,
#SingleResultTable .single-result-entry-table select,
#SingleResultTable .single-result-entry-table textarea {
    max-width: 100%;
}

.group-result-layout {
    min-width: 0;
    --bs-gutter-x: 1rem;
}

.group-result-test-sidebar .card-body {
    min-width: 0;
    padding: .65rem;
}

#TestResult .list-group {
    width: 100%;
    min-width: 0;
    gap: .5rem;
    background: transparent !important;
}

#TestResult .list-group:empty {
    display: none;
}

#TestResult .GroupResultValueRangeTestInfo,
#TestResult .GroupResultWordGetTestInfo,
#TestResult .ResultSemenGetTestInfo,
#TestResult .GroupResultMicropolgyTestInfo,
#TestResult .AllergenResultTestInfo {
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: .35rem;
    padding: .55rem !important;
    overflow: hidden;
    border-color: #dce5f3 !important;
    border-radius: 8px;
    background: #fff;
    transition: border-color .15s ease, background-color .15s ease;
}

#TestResult .GroupResultValueRangeTestInfo:hover,
#TestResult .GroupResultWordGetTestInfo:hover,
#TestResult .ResultSemenGetTestInfo:hover,
#TestResult .GroupResultMicropolgyTestInfo:hover,
#TestResult .AllergenResultTestInfo:hover {
    border-color: #9db7ff !important;
    background: #f4f8ff;
}

#TestResult .GroupResultValueRangeTestInfo > h5,
#TestResult .GroupResultWordGetTestInfo > h5,
#TestResult .ResultSemenGetTestInfo > h5,
#TestResult .GroupResultMicropolgyTestInfo > h5,
#TestResult .AllergenResultTestInfo > h5 {
    width: 100%;
    min-width: 0;
    font-size: .86rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    #SingleResultTable .single-result-entry-table {
        min-width: 950px;
    }

    .group-result-test-sidebar {
        margin-bottom: .25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    #TestResult .GroupResultValueRangeTestInfo,
    #TestResult .GroupResultWordGetTestInfo,
    #TestResult .ResultSemenGetTestInfo,
    #TestResult .GroupResultMicropolgyTestInfo,
    #TestResult .AllergenResultTestInfo {
        transition: none;
    }
}

/* Keep invoice document actions clear without changing their enabled state. */
.invoice-document-action:disabled,
.invoice-document-action.disabled {
    opacity: 1 !important;
    cursor: not-allowed;
    pointer-events: none;
}

/* Selection actions stay white; only their original outline colors are darker. */
#selectedResultSelectVisible,
#selectedResultClearVisible,
#selectedResultSelectSingles,
#selectedResultSelectGroups,
#selectedResultClearAll,
#selectedResultSelectVisible:hover,
#selectedResultClearVisible:hover,
#selectedResultSelectSingles:hover,
#selectedResultSelectGroups:hover,
#selectedResultClearAll:hover,
#selectedResultSelectVisible:focus,
#selectedResultClearVisible:focus,
#selectedResultSelectSingles:focus,
#selectedResultSelectGroups:focus,
#selectedResultClearAll:focus,
#selectedResultSelectVisible:active,
#selectedResultClearVisible:active,
#selectedResultSelectSingles:active,
#selectedResultSelectGroups:active,
#selectedResultClearAll:active {
    background-color: #fff !important;
    font-weight: 500;
    border-width: 1.5px;
    box-shadow: none !important;
    filter: none;
}

#selectedResultSelectVisible { color: #0066ff; border-color: #0066ff; }
#selectedResultClearVisible { color: #6c2bff; border-color: #6c2bff; }
#selectedResultSelectSingles { color: #00a3b8; border-color: #00a3b8; }
#selectedResultSelectGroups { color: #ff8500; border-color: #ff8500; }
#selectedResultClearAll { color: #ff2448; border-color: #ff2448; }
