body {
    background-color: #FFFFFF;
}

a {
    cursor: pointer;
}

.active-column {
    background-color: rgba(243, 112, 33, 0.3);
}

#pdf_ProjectID_label {
    font-size: 10px;
    font-weight: bold;
    color: #003399;
}

#pdf_ProjectID {
    font-size: 10px;
    font-weight: bold;
    color: #003399;
}

#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #000;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading {
    width: 50px;
    height: 50px;
    border: 10px solid #fff0;
    border-top: 10px solid #fff;
    border-bottom: 10px solid #fff;
    border-radius: 50%;
    animation: spin 2s infinite;
}

p {
    word-wrap: break-word; /* Break long words */
    overflow: hidden;      /* Hide overflow content */
    white-space: normal;   /* Ensure text wraps correctly */
}

.job-complete-field {
    background-color: lightgray;
    border: 1px solid black;
    width: 200px;
}

.wo-update-flag {
    color: #c1121f;
    font-weight: bold;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.img-fluid {
    width: 150px;
    height: 90px;
}

.open_project_btn {
    background-color: #F37021;
    color: white;
}

.openProjectModal, .addProductModal {
    padding-left: 80px;
    padding-right: 80px;
    background-color: white;
}

.navbar-brand {
    font-weight: bold;
    margin-left: 107px;
}

.logged_in_user {
    color: white;
    font-size: 20px;
    margin-left: 10px;
}

.loading_text {
    color: white;
    font-size: 20px;
    margin-left: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.dollar-sign {
    margin-block: auto;
    margin-right: -21px;
    font-size: 30px;
}

#loader.hidden {
    display: none;
}

.header-container {
    margin-left: -12px;
    margin-right: -13px;
    margin-bottom: 20px;
    margin-top: 20px;
}

#product_list_admin_container {
    background-color: #fff;
    flex-direction: column;
    color: white;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    margin: 0;
    box-sizing: border-box;
}

.draggable-list {
    border: 1px solid #636464;
    color: black;
    box-sizing: border-box;
    padding: 0;
    list-style-type: none;
}

.draggable-list li {
    background-color: #fff;
    display: flex;
    flex: 1;
}

.draggable-list li:not(:last-of-type) {
    border-bottom: 1px solid #636464;
}

.draggable-list .proposal_detail {
    margin: 0 5px 0 0;
}

.draggable {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px;
    flex: 1;
    font-size: 12px;
}

.draggable.over {
    opacity: 0.5;
    border-top: 5px solid darkred;
}

.draggable.dragging {
    background-color: #676161;
}

.manufacturer-label {
    font-size: 12px;
    font-weight: bold;
}

.checkbox-lg {
    width: 38px;
    height: 38px;
}

.proposal-header-2, .option-header-2 {
    font-size: 8px;
    border: 2px solid black;
}

.h2-job-info-table {
    font-size: 8px;
}

.tr-outlined-darker {
    background-color: darkgrey;
}

.tr-lightgray {
    background-color: lightgray;
}

.pdf-disclaimer {
    font-size: 8px;
    font-weight: bold;
    text-align: center;
}

/* Construction Monitor Excel Sheet Selection */
#sheet-list .list-group-item {
    padding: 1rem;
    transition: background-color 0.2s;
}

#sheet-list .list-group-item:hover {
    background-color: #f8f9fa;
}

#sheet-list .list-group-item.selected {
    background-color: #e7f3ff;
    border-left: 3px solid #0d6efd;
}

.sheet-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sheet-details {
    flex: 1;
    min-width: 200px;
}

.sheet-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sheet-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.sheet-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sheet-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.sheet-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.replace-checkbox {
    width: 16px;
    height: 16px;
    margin-left: 0.5rem;
}

#sheet-import-result .alert {
    margin-bottom: 0.5rem;
}

.sheet-result-item {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    border-left: 3px solid #28a745;
    background-color: #f8f9fa;
}

.sheet-result-item.error {
    border-left-color: #dc3545;
}

.sheet-result-item .sheet-result-name {
    font-weight: 600;
}

.sheet-result-item .sheet-result-stats {
    font-size: 0.875rem;
    color: #6c757d;
}

.pdf-proposal-table, .pdf-option-table {
    font-size: 14px;
    width: 100%;
    border-width: 1px;
}

#revision {
    width: 110px;
}

.change_detected {
    background-color: lightcoral;
}

#nav-2 {
    background-color: #e2e2e2;
    padding-left: 10px;
    padding-right: 10px;
    justify-content: center;
    height: fit-content;
    margin-top: -25px;
    padding-bottom: 10px;
    padding-top: 10px;
    border-bottom: 2px solid #F37021;
}

.field-name {
    vertical-align: middle;
    padding-right: 4px;
}

.field-data {
    padding-right: 10px;
}

.header-bar {
    justify-content: space-evenly;
    margin-right: 20px;
    margin-left: 20px;
    margin-top: 13px;
}

#nav-3 {
    background-color: #e2e2e2;
    padding-left: 10px;
    padding-right: 10px;
    justify-content: center;
    height: fit-content;
    border-bottom: 2px solid #F37021;
}

#nav-1 {
    align-items: center;
    justify-content: center;
    background-color: azure;
}

.welcome-message {
    font-size: 20px;
    font-weight: bold;
    color: white;
    position: absolute;
    right: 0;
    margin-right: 20px;
    margin-top: 20px;
}

#stage-container {
    color: darkred;
}

.foot-header {
    text-align: center;
    font-style: italic;
    text-decoration: underline;
}

.title-open-project {
    color: black;
    margin-bottom: 0px;
    margin-left: 14px;
}

.onproposalcheck {
    align-content: center;
    margin-bottom: 10px;
}

/* Keep onproposal checkboxes visible when disabled (for Job/Invoiced/CEA stages) */
input[type="checkbox"].onproposalcheck:disabled {
    opacity: 1 !important;
    cursor: default !important;
    background-color: #cfe2ff !important;  /* Light blue background */
    accent-color: #000000 !important;  /* Black checkmark */
}

/* Ensure all disabled checkboxes maintain visibility with light blue background */
input[type="checkbox"]:disabled {
    opacity: 1 !important;
    filter: none !important;
    background-color: #cfe2ff !important;  /* Light blue background */
    accent-color: #000000 !important;  /* Black checkmark */
}

/* Override Bootstrap's white checkmark SVG globally */
.form-check-input:checked[type=checkbox] {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    border-color: #000000 !important;
}

/* Ensure disabled checkboxes also keep the black checkmark & blue background */
.form-check-input:disabled:checked[type=checkbox],
input[type="checkbox"]:disabled:checked {
    background-color: #cfe2ff !important;
    border-color: #000000 !important;
}

.proposal_summary {
    height: 1036px;
}

.page-break {
    page-break-before: always;
    break-before: page;
    margin-top: 20px;
    border-top: 2px solid #dee2e6;
    padding-top: 20px;
    height: 1px;
    width: 100%;
    clear: both;
}

@media print {
    .page-break {
        page-break-before: always;
        break-before: page;
        margin-top: 0;
        border-top: none;
        padding-top: 0;
    }
    
    #spray-foam-work-log-container {
        page-break-before: always;
        break-before: page;
        clear: both;
        display: block;
        margin-top: 0;
        padding-top: 0;
    }
    
    /* Force page break for Spray Foam Work Log in print */
    #spray-foam-work-log-container::before {
        content: "";
        display: block;
        page-break-before: always;
        break-before: page;
        height: 0;
        margin: 0;
        padding: 0;
    }
    
    .new-page-container {
        page-break-before: always;
        break-before: page;
        margin-top: 20px;
        clear: both;
        display: block;
    }
    
    /* Additional page break enforcement */
    #spray-foam-work-log-container.visible {
        page-break-before: always !important;
        break-before: page !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* Scope Selection Styles */
#scope-selection-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#scope-selection-container h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 10px;
}

#scope-checkboxes .form-check-inline {
    margin-right: 15px;
    margin-bottom: 8px;
}

#scope-checkboxes .form-check-input {
    margin-right: 5px;
}

#scope-checkboxes .form-check-label {
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

/* Loosefill subtype styling */
#scope-checkboxes .loosefill-checkbox {
    margin-left: 20px;
}

#scope-checkboxes .loosefill-checkbox + .form-check-label {
    color: #6c757d;
    font-style: italic;
}

/* Mutually exclusive checkbox styling */
#scope-checkboxes .form-check-inline:has(.loosefill-checkbox) {
    border-left: 2px solid #dee2e6;
    padding-left: 15px;
    margin-left: 10px;
}

#scope-checkboxes .loosefill-checkbox:checked + .form-check-label {
    color: #007bff;
    font-weight: 600;
}

#scope-checkboxes .scope-checkbox:checked + .form-check-label {
    color: #28a745;
    font-weight: 600;
}

/* Visual indicator for mutually exclusive options */
#scope-checkboxes .form-check-inline:has(.loosefill-checkbox)::before {
    content: "↔";
    color: #6c757d;
    font-size: 12px;
    margin-right: 5px;
    font-weight: bold;
}

/* Scope Group Headers */
.text-primary {
    color: #007bff !important;
}

.text-secondary {
    color: #6c757d !important;
}

/* Subtotal Rows */
.border-top {
    border-top: 2px solid #dee2e6 !important;
}

.pt-2 {
    padding-top: 0.5rem !important;
}

.hidden-menu-item {
    display: block;
}

.process-flow-bar {
    background-color: #a0c7d3;
    justify-content: center;
    height: fit-content;
    padding: 10px;
    margin-left: auto;
    margin-right: auto;
    width: 1278px;
}
.process-flow-bar .nav li {
    margin-right: 12px;
}
.process-flow-bar .nav li:last-child {
    margin-right: 0;
}

.navbar-lower {
    background-color: #2786a3;
    height: fit-content;
    padding: 10px;
    margin-left: auto;
    margin-right: auto;
    width: 1278px;
}

.proposal-table-container, .option-table-container, .coi-body-table {
    min-height: 100px;
    height: auto;
    margin-bottom: 20px;
}

.pdf-10pt-font {
    font-size: 14px;
}

.pdf-10pt-font-bold {
    font-size: 14px;
    font-weight: bold;
}

/* Professional Layout Styling */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

.card-header h6 {
    font-size: 0.875rem;
    margin: 0;
}



/* Financial Summary Table */
.table-borderless td {
    padding: 0.5rem 0.75rem;
    vertical-align: middle;
}

.text-end {
    text-align: right !important;
}

/* Task Type Breakdown Table Styling */
#task-type-breakdown-container {
    margin-top: 0;
    margin-bottom: 0;
}

#task-type-breakdown-container h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 5px;
}

#task-type-breakdown-container .table {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
}

#task-type-breakdown-container .table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
    padding: 8px 12px;
    font-size: 13px;
}

#task-type-breakdown-container .table tbody td {
    padding: 8px 12px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

#task-type-breakdown-container .table tbody tr:last-child td {
    border-bottom: none;
}

/* Task Type Amount Fields */
.task-type-amount,
.task-type-gp-dollar,
.task-type-gp-percent {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
    color: #495057 !important;
    font-weight: 500;
}

/* Task Type Add/Subtract Fields */
.task-type-add,
.task-type-subtract {
    border: 1px solid #ced4da !important;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.task-type-add:focus,
.task-type-subtract:focus {
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.task-type-add {
    border-left: 3px solid #28a745 !important;
}

.task-type-subtract {
    border-left: 3px solid #dc3545 !important;
}

/* Clean card styling for the new design */
.card {
    transition: all 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-1px);
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 1rem 1.25rem;
}

/* Subtle shadows and borders */
.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Form field styling */
.form-control.border-0.bg-light,
.form-select.border-0.bg-light {
    background-color: #f8f9fa !important;
    transition: background-color 0.2s ease;
}

.form-control.border-0.bg-light:focus,
.form-select.border-0.bg-light:focus {
    background-color: #ffffff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Task type row styling and hover effects */
.task-type-row {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.task-type-row:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Task type row color coding */
.task-type-row[data-tasktype-id] {
    border-radius: 4px;
    margin: 2px 0;
}

/* Enhanced bid row highlighting */
.bid-item-row.highlighted,
[id^="bid_item_row_"].highlighted {
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Bid row highlighting */
.bid-item-row.highlighted,
[id^="bid_item_row_"].highlighted {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    transition: all 0.2s ease;
}

.newProductModalBtn {
    width: auto;
    margin-top: 12px;
    margin-bottom: 12px;
}

.copyForm {
    width: fit-content;
    margin: 14px;
    margin-left: 383px;
}

.blank-row {
    height: 10px;
}

.pdf-12pt-font {
    font-size: 16px;
    font-weight: bold;
}

.pdf-8pt-font {
    font-size: 12px;
    color: black;
}

.pdf-8pt-font-bold {
    font-size: 12px;
    font-weight: bold;
}

.initials_field {
    background-color: lightgray;
    border: 1px solid black;
}

.coi-body, .prop-body, .option-body, .wo-body {
    background-color: white;
}

.wo_details_body {
    font-size: medium;
    border: 1px solid black;
    height: auto;
}

.wo_supplies_body {
    font-size: medium;
}

.coi-body-header, .wo-title {
    font-size: 12px;
    border: 1px solid black;
    background-color: darkgray;
    text-align: center;
    font-weight: bold;
}

.wo-directions, .wo-job-details {
    height: 218px;
    word-wrap: normal;
    color: black;
}

.pac-container {
    z-index: 10000 !important;
}

.removed {
    display: none;
}

.wo_total_detail {
    justify-content: flex-end;
}

.pdf-label {
    font-size: 10px;
    font-weight: bold;
}

.coi-body-header-gap {
    border: 1px solid black;
    background-color: white;
    height: 30px;
}

.coi-body-spacer-dark {
    border: 1px solid black;
    background-color: darkgray;
    height: 30px;
}

.coi-body-bold {
    font-size: 10px;
    font-weight: bold;
    border: 1px solid black;
    text-align: left;
}

.coi-light-gray {
    background-color: lightgray;
}

.coi-body-table {
    font-size: 8px;
    height: 500px;
    background-color: white;
}

.pdf-coi-table {
    font-size: 8px;
    border: 1px solid black;
}

.table-cell-light-gray {
    background-color: lightgray;
    border: 2px solid black;
}

tr {
    vertical-align: top;
}

.page-break {
    page-break-after: always;
}

/* Select2 Scrollable Dropdown Styles */
.select2-dropdown-scrollable .select2-results__options {
    max-height: 300px !important;
    overflow-y: auto !important;
}

.select2-container--default .select2-results > .select2-results__options {
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* Make the search box more visible */
.select2-search--dropdown .select2-search__field {
    padding: 8px !important;
    margin-bottom: 5px !important;
    border: 1px solid #ced4da !important;
}

/* Improve dropdown appearance */
.select2-dropdown {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Hover state for options */
.select2-results__option--highlighted {
    background-color: #0d6efd !important;
    color: white !important;
}

/* PDF Table Styles */
.table-page-break-target {
    display: block;
    height: 1px;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Work Order Table Styles */
#wo-body table {
    width: 100%;
    border-collapse: collapse;
    page-break-inside: avoid !important; /* Prevent breaks within tables */
}

#wo-body table[data-keep-together="true"] {
    page-break-inside: avoid !important;
}

/* Table section dividers for proper spacing */
.table-section-divider {
    height: 40px;
    width: 100%;
    clear: both;
    display: block;
}

#wo_details_table,
#wo_total_detail_table,
#wo_installer_details,
#wo_supplies_table {
    margin-bottom: 20px;
    page-break-inside: avoid !important;
}

/* Ensure tables have sufficient space between them */
#wo_details_table_container,
#wo_total_detail,
#wo_installer_details_container,
#wo_supplies_table {
    margin-bottom: 30px;
    page-break-inside: avoid !important;
}

/* Specific fix for installer details table */
#wo_installer_details_container {
    page-break-before: always !important;
    page-break-inside: avoid !important;
}

#wo_installer_details {
    page-break-inside: avoid !important;
}

#wo_installer_details tr {
    page-break-inside: avoid !important;
    height: 40px !important;
    min-height: 40px !important;
}

/* Reduce Time In, Time Out, and Lunch column widths to make room for Date column */
#wo_installer_details .time-col {
    width: 150px !important;
    max-width: 150px !important;
}

/* Work Order Details Table Column Widths */
/* SKU column (1st) */
#wo_details_table th:nth-child(1),
#wo_details_table td:nth-child(1) {
    width: 120px !important;
    max-width: 120px !important;
}

/* Material Needed (5th), Install Labor (6th), Square Feet (7th) columns */
#wo_details_table th:nth-child(5),
#wo_details_table td:nth-child(5),
#wo_details_table th:nth-child(6),
#wo_details_table td:nth-child(6),
#wo_details_table th:nth-child(7),
#wo_details_table td:nth-child(7) {
    width: 70px !important;
    max-width: 70px !important;
}

/* Make Notes column same width as Proposal Detail column */
#wo_details_table .proposal-detail-col,
#wo_details_table .notes-col {
    width: auto !important;
    min-width: 150px !important;
}

/* Add word-wrap to all cells in work order details table */
#wo_details_table td,
#wo_details_table th {
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    vertical-align: top !important;
}

@media print {
    #wo-body table {
        page-break-inside: avoid !important;
    }
    
    #wo-body table tr {
        page-break-inside: avoid !important;
    }
    
    #wo_installer_details_container {
        page-break-before: always !important;
    }
    
    /* Create clear sections for each table to avoid duplication */
    #wo_details_table_container,
    #wo_total_detail,
    #wo_installer_details_container,
    #wo_supplies_table {
        display: block !important;
        position: relative !important;
        overflow: visible !important;
        page-break-inside: avoid !important;
    }
}

/* Explicit page break for PDF generation */
.explicit-page-break {
    display: block;
    width: 100%;
    height: 1px;
    page-break-after: always !important;
    page-break-before: auto !important;
    margin-top: 40px !important;
    margin-bottom: 40px !important;
    clear: both !important;
}

@media print {
    .explicit-page-break {
        display: block !important;
        page-break-after: always !important;
        height: 1px !important;
    }
    
    /* Force job complete to stay with its section */
    .wo_total_detail {
        page-break-after: always !important;
        page-break-inside: avoid !important;
        display: block !important;
        margin-bottom: 80px !important;
    }
    
    /* Force installer table to start on new page */
    #wo_installer_details_container {
        page-break-before: always !important;
        page-break-inside: avoid !important;
        display: block !important;
        margin-top: 50px !important;
    }
    
    #wo_installer_details {
        page-break-before: always !important;
        page-break-inside: avoid !important;
        margin-top: 50px !important;
    }
}

/* Add spinning animation for cache refresh button */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Professional totals styling */
.pdf-proposal-table .row:has(.text-end strong) {
    background-color: #f8f9fa;
    border-radius: 4px;
    margin: 8px 0;
    padding: 12px 0;
}

.pdf-proposal-table .row.border-top {
    border-top: 2px solid #dee2e6 !important;
    background-color: #e9ecef;
    font-weight: 600;
}

.pdf-proposal-table .row:last-child {
    background-color: #007bff;
    color: white;
    border-radius: 6px;
    margin-top: 16px;
}

.pdf-proposal-table .row:last-child strong {
    color: white;
}

/* Scope subtotal styling */
.pdf-proposal-table .row:has([class*="Subtotal"]) {
    background-color: #f1f3f4;
    border-left: 4px solid #28a745;
    padding-left: 16px;
}

/* Other items subtotal styling */
.pdf-proposal-table .row:has([class*="Other Items"]) {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding-left: 16px;
}
