/*
 * Compatibility bundle input.
 * Global layout and form rules are maintained in the common CSS files loaded
 * by Views/_Shared/_common_css.cshtml.
 */

/*
 * Compatibility bundle input.
 * Shared application rules now live in tokens.css, base.css, forms.css,
 * buttons.css, tables.css, modals.css, statuses.css, transactions.css,
 * utilities.css, and print.css.
 */

.configuration-page .configuration-page-header {
    background: var(--bs-card-bg, #fff);
    border: 1px solid var(--bs-border-color, #e9e9ef);
    border-radius: .35rem;
    box-shadow: 0 1px 2px rgba(18, 38, 63, .04);
    padding: 1rem 1.25rem;
}

.configuration-page .configuration-page-title {
    color: var(--bs-body-color, #343a40);
    font-size: 1rem;
    font-weight: 600;
}

.configuration-page .configuration-page-actions .btn {
    min-width: 112px;
}

.configuration-page .configuration-card {
    border: 1px solid var(--bs-border-color, #e9e9ef);
    box-shadow: 0 1px 2px rgba(18, 38, 63, .04);
}

.configuration-page .configuration-card > .card-header {
    border-bottom: 1px solid var(--bs-border-color, #e9e9ef);
    min-height: 48px;
}

.configuration-page .configuration-card .card-title {
    font-size: .9rem;
    font-weight: 600;
}

.configuration-page .configuration-section-title {
    color: var(--bs-body-color, #343a40);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .025em;
    text-transform: uppercase;
}

.configuration-page .configuration-preview-sticky {
    position: sticky;
    top: 82px;
}

.configuration-page .configuration-preview-canvas {
    background: var(--bs-tertiary-bg, #eef1f5);
    border: 1px solid var(--bs-border-color, #e9e9ef);
    border-radius: .3rem;
    min-height: 420px;
    overflow: auto;
    padding: 1.25rem;
}

.configuration-page .icon-action {
    align-items: center;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 30px;
}

.configuration-page .table > :not(caption) > * > * {
    border-color: var(--bs-border-color, #e9e9ef);
}

.configuration-page .table thead th {
    color: var(--bs-secondary-color, #74788d);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .015em;
    text-transform: uppercase;
}

.configuration-page .empty-state {
    color: var(--bs-secondary-color, #74788d);
    padding: 2rem 1rem;
    text-align: center;
}

.receipt-config-page .receipt-sections-table .section-row {
    transition: background-color .15s ease, box-shadow .15s ease;
}

.receipt-config-page .receipt-sections-table .section-row:hover {
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.receipt-config-page .receipt-sections-table .section-row.table-active {
    box-shadow: inset 3px 0 var(--bs-primary, #556ee6);
}

.receipt-config-page .receipt-preview-paper {
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: .25rem;
    box-shadow: 0 4px 14px rgba(18, 38, 63, .1);
    color: #212529;
    margin: auto;
    max-width: 340px;
    min-height: 160px;
    overflow: hidden;
    padding: .75rem .625rem;
    width: 100%;
}

@media (max-width: 991.98px) {
    .configuration-page .configuration-preview-sticky {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .configuration-page .configuration-page-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .configuration-page .configuration-page-actions .btn,
    .configuration-page .configuration-page-actions .form-select {
        min-width: 0;
        width: 100% !important;
    }

    .configuration-page .configuration-page-actions .configuration-action-field {
        grid-column: 1 / -1;
    }

    .configuration-page .configuration-preview-canvas {
        min-height: 280px;
        padding: .75rem;
    }
}

/* Custom Webkit Scrollbar */
:not(.mobile-detected)::-webkit-scrollbar,
:not(.mobile-detected).modal-open .modal::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

    :not(.mobile-detected)::-webkit-scrollbar:hover,
    :not(.mobile-detected).modal-open .modal::-webkit-scrollbar:hover {
        background-color: rgba(0, 0, 0, 0.02);
    }

:not(.mobile-detected)::-webkit-scrollbar-track-piece,
:not(.mobile-detected).modal-open .modal::-webkit-scrollbar-track-piece {
    background-color: rgba(0, 0, 0, 0.05);
}

    :not(.mobile-detected)::-webkit-scrollbar-track-piece:hover,
    :not(.mobile-detected).modal-open .modal::-webkit-scrollbar-track-piece:hover {
        background-color: rgba(0, 0, 0, 0.1);
    }

:not(.mobile-detected)::-webkit-scrollbar-thumb:vertical,
:not(.mobile-detected).modal-open .modal::-webkit-scrollbar-thumb:vertical,
:not(.mobile-detected)::-webkit-scrollbar-thumb:horizontal,
:not(.mobile-detected).modal-open .modal::-webkit-scrollbar-thumb:horizontal {
    background-color: lightgray;
    border-radius: 2rem;
}

    :not(.mobile-detected)::-webkit-scrollbar-thumb:vertical:hover,
    :not(.mobile-detected).modal-open .modal::-webkit-scrollbar-thumb:vertical:hover,
    :not(.mobile-detected)::-webkit-scrollbar-thumb:horizontal:hover,
    :not(.mobile-detected).modal-open .modal::-webkit-scrollbar-thumb:horizontal:hover {
        background-color: dimgray;
    }

/* Base DataTable Styles */
.dataTables_empty {
    font-size: 1.5rem !important;
    color: var(--bs-danger);
}

.dataTable-bottom .dataTables_length,
.dataTable-bottom .dataTables_info {
    display: inline-block;
}

.dataTable-bottom .dataTables_info {
    margin-left: 15px;
}

/*.dataTables_scrollBody {
    min-height: 100px;
}*/

/* Table Cell Styles */
.dataTable th,
.dataTable td {
    padding: 2px !important;
    vertical-align: middle;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .dataTable th[data-filter="true"] {
        text-overflow: inherit !important;
    }

    .dataTable th.no-min-width, .dataTable td.no-min-width {
        min-width: 1% !important;
    }

.dataTables_scrollHead .dataTable thead tr:first-child th {
    font-weight:500;
    padding-right: 25px !important;
}

    .dataTables_scrollHead .dataTable thead tr:first-child th:has(input[type="checkbox"]) {
        padding-right: 5px !important;
    }

.dataTables_scrollHead .dataTable thead tr:last-child th {
    padding: 3px !important;
}

/*
.dataTables_scrollHead .dataTable thead tr:last-child input,
.dataTables_scrollHead .dataTable thead .select2-selection,
.dataTables_scrollHead .dataTable thead select {
    border-radius: 0px !important;
    background-color: #f1f4ff !important;
    border-color: #e0e2e5 !important;
}*/

/* Scroll Head/Foot Styles */
.dataTables_scroll .dataTables_scrollHead table,
.dataTables_scroll .dataTables_scrollFoot table {
    table-layout: fixed;
}

    .dataTables_scroll .dataTables_scrollHead table th,
    .dataTables_scroll .dataTables_scrollHead table td,
    .dataTables_scroll .dataTables_scrollFoot table th,
    .dataTables_scroll .dataTables_scrollFoot table td {
        overflow: hidden;
    }

.dataTables_scrollBody > table > thead > tr > th,
.dataTables_scrollBody > table > tfoot > tr > th,
.table th:empty {
    padding: 0px !important;
}

/* Sorting Indicators */
table.dataTable thead .sorting:before,
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_asc_disabled:before,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:before,
table.dataTable thead .sorting_desc_disabled:after {
    position: absolute !important;
    bottom: .5em !important;
    display: block !important;
    opacity: .3 !important;
}

table.dataTable thead .sorting:before,
table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_asc_disabled:before,
table.dataTable thead .sorting_desc_disabled:before {
    right: 1em !important;
    content: "\2191" !important;
}

table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:after {
    right: .5em !important;
    content: "\2193" !important;
}

table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:after {
    opacity: 1 !important;
}

/* Row States */
table.dataTable tbody > tr > td {
    border-top: 1px solid transparent !important;
    border-left: 1px solid transparent !important;
    border-right: 1px solid transparent !important;
}

table.dataTable tbody > tr.selected {
    background-color: #006bff1f !important;
    box-shadow: none !important;
}

    table.dataTable tbody > tr.selected > td {
        border-bottom: 1px solid #006bff95 !important;
        border-top: 1px solid #006bff95 !important;
    }

        table.dataTable tbody > tr.selected > td:first-child {
            border-left: 1px solid #006bff95 !important;
        }

        table.dataTable tbody > tr.selected > td:last-child {
            border-right: 1px solid #006bff95 !important;
        }

table.dataTable tbody > tr:hover {
    background-color: #006bff1f !important;
    box-shadow: none !important;
}

    table.dataTable tbody > tr:hover > td {
        border-bottom: 1px solid #006bff95 !important;
        border-top: 1px solid #006bff95 !important;
    }

        table.dataTable tbody > tr:hover > td:first-child {
            border-left: 1px solid #006bff95 !important;
        }

        table.dataTable tbody > tr:hover > td:last-child {
            border-right: 1px solid #006bff95 !important;
        }

/* Special Row Styles */
tr.details > td {
    border: 2px solid #fff1be;
    border-radius: 5px;
    background-color: #fff9e4;
}

tr.row-disabled {
    background-color: #f5f5f5 !important;
}

tr.error {
    background-color: #ffe0e0;
}

/* Highlighting */
span.highlight {
    background-color: #ffce66;
}

td.mismatch {
    background-color: #f700002e;
}

tr.mismatch td {
    border-bottom: 1px solid #f00;
}

/* Simple Table Styles */
table.simpletable {
    width: 100%;
}

    table.simpletable th,
    table.simpletable td {
        padding: 3px;
    }

    table.simpletable th {
        border-top: 1px solid #ddd;
        border-bottom: 2px solid #ddd;
    }

    table.simpletable tr + tr td {
        padding: 3px;
        border-top: 1px solid #ddd;
    }

    table.simpletable a.nav-link {
        padding: 3px 5px;
    }

/* Form Elements in Tables */
.dataTable thead th input,
.dataTable tfoot th input {
    padding: 2px 5px !important;
}

.dataTable thead tr:nth-child(2) {
    padding: 2px 5px !important;
}

/* Pagination */
.dataTable-bottom .pagination .page-item {
    min-width: 36px;
    height: 27px;
    text-align: center;
}

    .dataTable-bottom .pagination .page-item + .page-item {
        margin-left: 8px;
    }

    .dataTable-bottom .pagination .page-item .page-link {
        min-width: 36px;
        height: 27px;
        text-align: center;
        padding: 3px 10px;
        vertical-align: central;
    }

.dataTable-bottom .pagination .paginate_input_group {
    margin-left: 8px;
    margin-right: 8px;
}

.dataTable-bottom .dataTables_length select {
    height: 27px;
    padding: 3px 15px;
}

/* Select2 Integration */
.dataTables_scroll .select2-container .select2-search--inline .select2-search__field {
    height: 24px !important;
    margin-top: 0px !important;
}

.dataTables_scroll .select2-selection,
.dataTables_scroll .select2-selection--multiple {
    min-height: 27px !important;
    max-height: 27px !important;
}

.dataTables_scroll .select2-container .select-all {
    position: absolute;
    top: 6px;
    right: 4px;
    width: 20px;
    height: 20px;
    margin: auto;
    display: block;
    cursor: pointer;
    z-index: 999;
}

.dataTables_scroll .select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none;
}

.dataTables_scroll .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 27px !important;
    margin-top: 0px !important;
}

.dataTables_scroll .select2-container .select2-selection--multiple .select2-selection__rendered.p-2,
.dataTables_scroll .select2-container .select2-selection--multiple .select2-selection__rendered.p-1 {
    padding: 5px !important;
}

.dataTable-bottom .custom-select {
    text-align: center;
    padding-top: 6px;
}

/* Miscellaneous */
.dt-buttons {
    display: none !important;
}

.dataTables_processing {
    z-index: 10;
    border: 2px solid gray;
    font-weight: bold;
}

div.dataTables_wrapper div.dataTables_info {
    white-space: pre-wrap !important;
    padding-top: 0px;
}

.min-width-100,
table.dataTable.nowrap th:not(:first-child),
table.dataTable.nowrap th:not(:first-child) .select2-container {
    min-width: 100px !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #a3b3ff !important;
    /*color: #343a40;*/
}

/* Responsive Styles */
@media (max-width: 768px) {
    div .dataTables_wrapper div.dataTables_paginate ul.pagination {
        text-align: center !important;
        justify-content: center !important;
    }

    .dataTables_scroll .select2-container .select-all {
        top: 5px !important;
        right: 2px !important;
    }
}

@media (max-width: 425px) {
    div.dataTables_wrapper div.dataTables_paginate ul.pagination {
        overflow-x: scroll !important;
        overflow-y: hidden !important;
    }

    .dataTable-bottom .pagination .page-item + .page-item {
        margin-left: 3px !important;
    }

    .dataTables_scroll .select2-selection,
    .dataTables_scroll .select2-selection--multiple {
        min-height: 24px !important;
        max-height: 24px !important;
    }

    .dataTables_scroll .select2-container .select2-selection--multiple .select2-selection__rendered.p-2,
    .dataTables_scroll .select2-container .select2-selection--multiple .select2-selection__rendered.p-1 {
        padding: 9px !important;
    }

    .dataTables_scroll .select2-container .select-all {
        top: 4px !important;
        right: 2px !important;
    }

    table.dataTable.nowrap th .form-control {
        line-height: 0.5 !important;
    }
}

.select2-container--open .select2-dropdown {
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}