/**
 * Global application overrides.
 * Loaded by Sneat and app layouts.
 */

/* Full border on every Bootstrap table (outer + cell borders) */
.table {
    border: 1px solid var(--bs-table-border-color, #d9dee3) !important;
    border-collapse: collapse;
}

.table > :not(caption) > * {
    border-width: 1px 0;
    border-style: solid;
    border-color: var(--bs-table-border-color, #d9dee3);
}

.table > :not(caption) > * > * {
    border-width: 1px !important;
    border-style: solid !important;
    border-color: var(--bs-table-border-color, #d9dee3) !important;
}

.table > :not(caption) > *:first-child > *:first-child {
    border-top-left-radius: 0;
}

.table > :not(caption) > *:first-child > *:last-child {
    border-top-right-radius: 0;
}

.table > :not(caption) > *:last-child > *:first-child {
    border-bottom-left-radius: 0;
}

.table > :not(caption) > *:last-child > *:last-child {
    border-bottom-right-radius: 0;
}

/* Match Select2 single controls to Bootstrap .form-select size and fill the column */
.select2-container,
span.select2.select2-container {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.select2-container .selection {
    display: block;
    width: 100%;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--single.select2-selection--clearable {
    width: 100% !important;
    min-height: calc(1.375em + 1.086rem + 2px);
    height: calc(1.375em + 1.086rem + 2px);
    padding: 0.543rem 2.625rem 0.543rem 0.9375rem;
    font-size: 0.9375rem;
    font-weight: 400;
    line-height: 1.375;
    border: var(--bs-border-width, 1px) solid color-mix(in sRGB, var(--bs-base-color, #697a8d) 22%, var(--bs-paper-bg, #fff));
    border-radius: var(--bs-border-radius, 0.375rem);
    background-color: transparent;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: 1.375;
    color: var(--bs-heading-color, #566a7f);
    display: block;
    width: 100%;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 0.5rem;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    margin-right: 1.5rem;
    height: auto;
    line-height: 1.375;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--bs-primary, #0c77bd);
}
