html,
body {
    height: 100%;
    overflow: hidden;
}

body {
    overflow-y: scroll !important;
    padding-right: 0 !important;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: gainsboro;
}

::-webkit-scrollbar-thumb {
    background: #a8b1bb;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8b1bb;
}

/* Offcanvas scrollbars (body and any inner scrollable section) */
.offcanvas::-webkit-scrollbar,
.offcanvas *::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

/* Keep textarea scrollbars inside the rounded field */
textarea.form-control::-webkit-scrollbar {
    width: 3px;
    cursor: default;
}

textarea.form-control::-webkit-scrollbar-track {
    background: transparent;
    margin: 4px 0;
}

textarea.form-control::-webkit-scrollbar-thumb {
    background: #a8b1bb;
    border-radius: 6px;
    cursor: default;
}

textarea.form-control::-webkit-scrollbar-button {
    display: none;
}

/* Textareas are never resizable */
textarea.form-control { resize: none; }

::-moz-selection {
    color: #fff;
    background: var(--color-primary);
}

::selection {
    color: #fff;
    background: var(--color-primary);
}

input[type="checkbox"]:focus {
    box-shadow: none !important;
    outline: none !important;
}

.input-group {
    border-radius: 0.25rem;
}

body>.preloader {
    background: #ffffff40 !important;
}

.preloader {
    z-index: 10 !important;
}

.light-style .layout-navbar {
    background-color: #efefef !important;
}

.light-style .menu .app-brand.demo {
    padding-top: 16px;
    margin-bottom: 10px;
}

.menu-inner-shadow {
    top: 8rem !important;
    opacity: 0.1;
}

.announcement-count {
    background-color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 1px 0.5rem 0;
    line-height: 1;
}

/* Duplicate rules notice - softer primary */
.alert-solid-primary.alert-duplicate-rules {
    background-color: color-mix(in srgb, var(--color-primary) 85%, #fff);
}

/* Light button inside the solid notices - white at rest, light grey on hover */
.alert-solid-primary.alert-duplicate-rules .btn-light {
    background-color: #fff !important;
    border-color: #fff !important;
    color: var(--color-primary) !important;
}
.alert-solid-primary.alert-duplicate-rules .btn-light:hover,
.alert-solid-primary.alert-duplicate-rules .btn-light:focus,
.alert-solid-primary.alert-duplicate-rules .btn-light:active {
    background-color: #e5e9ed !important;
    border-color: #e5e9ed !important;
    color: var(--color-primary) !important;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.15) !important;
}

/* Duplicate rules notices - 45/55 column split */
@media (min-width: 768px) {
    .duplicate-rules-notices .notice-default { flex: 0 0 45%; max-width: 45%; }
    .duplicate-rules-notices .notice-watched { flex: 0 0 55%; max-width: 55%; }
}

/* Duplicate rule role pairs */
.duplicate-rule-roles .select2-container {
    width: 100% !important;
}

.progress {
    height: 1.5rem;
    font-size: 1rem;
    width: 180px;
}

.bg-light {
    background-color: #F9F9F9 !important;
}

.text-wrap {
    white-space: normal;
}

.width-200 {
    width: 200px;
}

.width-150 {
    width: 150px;
}

.width-100 {
    width: 100px;
}

.width-90 {
    width: 90px;
}

.min-width-200 {
    min-width: 200px;
}
.min-width-300 {
    min-width: 300px;
}
.min-width-400 {
    min-width: 400px;
}
.max-width-200 {
    max-width: 200px;
}
.max-width-300 {
    max-width: 300px;
}
.max-width-400 {
    max-width: 400px;
}
.max-width-500 {
    max-width: 500px;
}

/* University programs page: the table fits the right column, the cells wrap instead of scrolling */
.programs-table-scoped {
    table-layout: fixed;
}
.programs-table-scoped .min-width-300 {
    min-width: 0;
}
.programs-table-scoped .text-nowrap {
    white-space: normal !important;
}
.programs-table-scoped p.d-flex {
    flex-wrap: wrap;
}
.programs-table-scoped .btn {
    white-space: normal;
}
.programs-table-scoped .avatar-wrapper {
    display: none;
}
.programs-table-scoped .text-truncate {
    white-space: normal !important;
    overflow: visible !important;
}
.programs-table-scoped td a.text-body {
    overflow-wrap: anywhere;
}
.programs-table-scoped .btn-icon.btn-sm {
    height: auto;
    padding-top: .25rem;
    padding-bottom: .25rem;
}

/* University pages: filter placeholders never wrap, the row keeps one line */
.university-sticky .search-filters .select2-selection--single .select2-selection__rendered {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}


.offcanvas-end {
    width: 420px;
}

.swal2-container {
    padding-top: 1.75rem !important;
    z-index: 1100 !important; /* alerts sit above every offcanvas and modal */
}

.swal2-title {
    margin: 0 !important;
}

.swal2-actions {
    margin-bottom: 0.5em !important;
}
.swal2-html-container {
    margin: .5em 1.6em 0.3em !important;
}

.modal .msg-container .btn-close {
    background-color: unset;
}
.modal .msg-container .alert-dismissible .btn-close {
    padding: 1.05rem 1.25rem;
}

.no-shadow {
    box-shadow: none !important;
}

.select2-selection__rendered {
    max-height: 80px;
    overflow-y: visible !important;
}

.select2-selection--single {
    height: 100% !important;
}
.light-style .select2-container--default .select2-selection--single .select2-selection__rendered,
.light-style .select2-selection--multiple .select2-selection__rendered {
    padding-left: 0.735rem !important;
    padding-right: 0.735rem !important;
}
/* The padding above drops the theme's room for the arrow, the clear keeps it and sits just before the arrow */
.light-style .select2-container--default .select2-selection--single .select2-selection__clear {
    margin-inline-end: 1.75rem;
}

.select2-selection__rendered {
    word-wrap: break-word !important;
    text-overflow: inherit !important;
    white-space: normal !important;
}

.switch-input:focus ~ .switch-toggle-slider {
    box-shadow: none !important;
}

/* A switch without an inner .switch-label keeps the width of its slider so a label placed next to it never overlaps */
.switch:not(:has(.switch-label)) {
    width: 2.5rem;
}

.menu-vertical .menu-inner {
    padding-bottom: 20px !important;
}

.table-link {
    color: #677788;
}
.subtitle {
    font-weight: 500;
}

.list-group-item-action:hover, .list-group-item-action:focus {
    z-index: 0;
}
.layout-navbar .navbar-dropdown .dropdown-menu {
    min-width: 25rem;
}
.layout-navbar .badge-notifications.badge-chat {
    padding: 0.2rem 0.4rem;
}

.iti__country-list {
    margin: -1px 0 0 -1px !important;
}

.dropzone {
    padding: 0 0 1.5rem;
    border: 2px dashed #69809a !important;
    border-top: 0 !important;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-bottom: 20px;
}
.dz-message {
    margin: 0;
    padding: 5rem 0;
}

.light-style .media-dropzone { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .75rem; padding: .75rem; border: 2px dashed #d9dee3 !important; border-radius: .375rem; margin-bottom: 0; min-height: 140px; background: #fff; }
.light-style .media-dropzone .dz-message { grid-column: 1 / -1; padding: 1.5rem 1rem; margin: 0; }
.light-style .media-dropzone.dz-started .dz-message { display: none; }
.light-style .media-dropzone .dz-message .bx { font-size: 2rem; display: block; margin-bottom: .25rem; }
.light-style .media-dropzone .dz-preview { margin: 0; width: auto; max-width: 100%; min-width: 0; box-sizing: border-box; display: block; }
.light-style .media-dropzone .dz-preview .dz-details { width: 100%; }
.light-style .media-dropzone .dz-preview .dz-thumbnail { width: 100%; height: auto; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; border-radius: .375rem .375rem 0 0; }
.light-style .media-dropzone .dz-preview .dz-thumbnail > img, .light-style .media-dropzone .dz-preview .dz-thumbnail > video { position: static; transform: none; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; display: block; }
.light-style .media-dropzone .dz-preview .dz-video-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: #fff; background: rgba(0,0,0,.45); }
.light-style .media-dropzone .dz-preview .dz-existing-badge { position: absolute; top: 4px; left: 4px; z-index: 2; }
.light-style .media-dropzone .dz-preview.dz-video .dz-nopreview { display: none; }
.light-style .media-dropzone .dz-preview .dz-filename { position: static; padding: .5rem .5rem 0; }
.light-style .media-dropzone .dz-preview .dz-filename, .light-style .media-dropzone .dz-preview .dz-filename:hover { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.light-style .media-dropzone .dz-preview .dz-size { padding: 0 .5rem .25rem; }
.light-style .media-dropzone .dz-preview .dz-remove { display: block; text-align: center; padding: .25rem 0 .5rem; }

#studentDocumentsModal .document-title {
    background-color: #69809a;
    color: #fff;
    font-size: 18px;
    font-weight: 400;
    margin: 0;
    padding: 0.7rem 1.25rem;
    border-top-left-radius: 0.3125rem;
    border-top-right-radius: 0.3125rem;
}
.dz-preview .progress {
    left: 1.2rem;
    width: 80%;
}

@media (min-width: 1400px) {
    .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {
        /* max-width: 1600px; */
        max-width: 98%;
    }
}

div.dataTables_wrapper div.dataTables_filter input {
    padding: 0.5rem 0.6rem;
}
div.dataTables_wrapper div.dataTables_length select {
    margin: 0 0.5rem;
    padding: 0.5rem 1.6rem 0.5rem 0.6rem;
    background-position: right 0.4rem center;
}
.dt-buttons {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
}

/* Custom CSS */
.content-wrapper .container-fluid {
    visibility: hidden;
}
.content-wrapper > .blockUI.blockElement {
    top: 200px !important;
}

.menu-vertical .app-brand-logo img {
    height: 100%;
}

.toast-top-right {
    top: 68px !important;
}

.iti {
    display: block !important;
}
.iti__country-list {
    margin: -1px 0 0 -1px !important;
}

.image-avatar {
    border: 1px solid #f1f1f1;
    background-color: #fbfbfb;
}


/* Custom offcanvas */
.offcanvas-header {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Modals open above offcanvases (the theme gives both z-index 1090, so DOM order decided) */
.modal {
    z-index: 1095;
}
.modal-backdrop {
    z-index: 1094;
}

/* Task offcanvases open above the record details they come from */
#task-details-offcanvas {
    z-index: 1092;
}
#task-form-offcanvas {
    z-index: 1094;
}
.offcanvas-backdrop ~ .offcanvas-backdrop {
    z-index: 1091;
}
.offcanvas-backdrop ~ .offcanvas-backdrop ~ .offcanvas-backdrop {
    z-index: 1093;
}

/* Date and time pickers open above the offcanvases and modals they sit in, below SweetAlert and the gallery */
body .datepicker.datepicker-dropdown,
.flatpickr-calendar {
    z-index: 1099 !important;
}

/* The Fanzy assistant floats above offcanvases and modals, below SweetAlert and the gallery */
.fanzy-launcher, .fanzy-panel {
    z-index: 1096;
}

/* Modal headers match offcanvas headers */
.modal-header {
    padding: 1rem 1.5rem;
}
.modal-header .btn-close {
    padding: 0.5625rem;
    margin: -0.5625rem;
    margin-inline-start: auto;
}
[dir="rtl"] .modal-header .btn-close {
    margin-left: -0.5625rem;
    margin-right: auto;
}
.offcanvas-header .btn-close {
    position: absolute;
    left: -35px;
    top: 22px;
    background-color: #fff;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.offcanvas-body {
    overflow-y: scroll;
    height: 100%;
}

/* Tabs inside any offcanvas: square, fixed 40px height, tinted when active, highlighted on hover */
.offcanvas .nav .nav-link:hover,
.offcanvas .nav .nav-link:focus {
    color: var(--bs-nav-tabs-link-active-color);
}
.offcanvas .nav-tabs .nav-link {
    border-radius: 0;
    padding: 0.5rem 0.5rem;
    line-height: 1.5rem;
}
.offcanvas .tabs-line.nav-tabs .nav-link.active {
    background-color: #77777710;
}

/* Stage requirements, stage actions and contract templates cards: the tabs sit on the header's bottom border beside the save button */
.stage-requirements-card .card-header,
.stage-actions-card .card-header,
.contract-templates-card .card-header {
    padding: 0 1rem;
}
.stage-requirements-card .stage-requirements-pipelines,
.stage-actions-card .stage-actions-pipelines,
.contract-templates-card .contract-templates {
    margin: 0;
    border-bottom: 0;
    flex-wrap: wrap;
    min-width: 0;
}
.stage-requirements-card .stage-requirements-pipelines .nav-link,
.stage-actions-card .stage-actions-pipelines .nav-link,
.contract-templates-card .contract-templates .nav-link {
    padding-top: 1rem;
    padding-bottom: 1rem;
    white-space: nowrap;
}
/* The settings tabs keep their resting colour on hover and focus, only the active underline differs */
.stage-requirements-card .stage-requirements-pipelines .nav-link:not(.active):hover,
.stage-requirements-card .stage-requirements-pipelines .nav-link:not(.active):focus,
.stage-actions-card .stage-actions-pipelines .nav-link:not(.active):hover,
.stage-actions-card .stage-actions-pipelines .nav-link:not(.active):focus,
.contract-templates-card .contract-templates .nav-link:not(.active):hover,
.contract-templates-card .contract-templates .nav-link:not(.active):focus,
.settings-tabs .nav-link:not(.active):hover,
.settings-tabs .nav-link:not(.active):focus,
.stages-subtabs .nav-link:not(.active):hover,
.stages-subtabs .nav-link:not(.active):focus {
    color: var(--bs-nav-link-color);
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}
.stage-requirements-card .stage-requirements-pipelines .nav-link.active:hover,
.stage-requirements-card .stage-requirements-pipelines .nav-link.active:focus,
.stage-actions-card .stage-actions-pipelines .nav-link.active:hover,
.stage-actions-card .stage-actions-pipelines .nav-link.active:focus,
.contract-templates-card .contract-templates .nav-link.active:hover,
.contract-templates-card .contract-templates .nav-link.active:focus,
.settings-tabs .nav-link.active:hover,
.settings-tabs .nav-link.active:focus,
.stages-subtabs .nav-link.active:hover,
.stages-subtabs .nav-link.active:focus {
    color: var(--bs-nav-tabs-link-active-color);
}
.stage-requirements-card .save-stage-requirements,
.stage-actions-card .save-stage-actions-order,
.contract-templates-card .card-header > div {
    flex-shrink: 0;
    margin: 0.5rem 0;
}

/* Stages tab: the sub tabs open a bordered panel holding their notes and their pipeline card */
.nav-align-top > .stages-subtabs + .tab-content .stage-requirements-card,
.nav-align-top > .stages-subtabs + .tab-content .stage-actions-card {
    box-shadow: none;
    border: 1px solid #d4d8dd;
}

/* Timeline search, a floating control in the top end corner of the events pane */
.timeline-search-fab {
    position: absolute;
    top: 0.75rem;
    inset-inline-end: 1rem;
    z-index: 3;
    display: flex;
    align-items: center;
    height: 2rem;
    border: 1px solid #d9dee3;
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(67, 89, 113, 0.08);
    overflow: hidden;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}
.timeline-search-fab:hover,
.timeline-search-fab.is-open {
    opacity: 1;
}
.timeline-search-fab .timeline-search {
    width: 0;
    border: 0;
    outline: 0;
    padding: 0;
    background: transparent;
    font-size: 0.875rem;
    color: #566a7f;
    transition: width 0.2s ease, padding 0.2s ease;
}
.timeline-search-fab.is-open .timeline-search {
    width: 180px;
    padding-inline-start: 0.75rem;
}
.timeline-search-fab .timeline-search::placeholder {
    color: #a1acb8;
}
.timeline-search-toggle {
    width: 2rem;
    height: 2rem;
    border: 0;
    padding: 0;
    background: transparent;
    color: #697a8d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.timeline-search-toggle:hover,
.timeline-search-fab.is-open .timeline-search-toggle {
    color: #566a7f;
}
@media (max-width: 575.98px) {
    .timeline-search-fab.is-open .timeline-search {
        width: 140px;
    }
}

.ck-content {
    height: 260px;
}

.ck-balloon-panel {
    z-index: 10000 !important;
}

.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label {
    width: 6em !important;
}

.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item {
    min-width: 8em !important;
}

.ck.ck-button:focus,
a.ck.ck-button:active,
a.ck.ck-button:focus {
    box-shadow: none !important;
    outline: none !important;
    border-color: #41378E !important;
    background-color: #41378E !important;
    color: #fff !important;
}

.ck.ck-input:focus {
    box-shadow: none !important;
    border-color: #41378E !important;
}

.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable) {
    border-color: #41378E !important;
    box-shadow: none !important;
}

[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label {
    left: unset !important;
}

.ck.ck-powered-by {
    display: none !important;
}

/* Tables typed in the announcement editor, in the card preview, the sidebar and the details modal */
.announcement-short-content figure.table,
#announcements-container figure.table,
#announcement-content figure.table {
    margin: 0 0 1rem;
    overflow-x: auto;
}

.announcement-short-content table,
#announcements-container table,
#announcement-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.announcement-short-content th,
.announcement-short-content td,
#announcements-container th,
#announcements-container td,
#announcement-content th,
#announcement-content td {
    border: 1px solid #d9dee3;
    padding: 0.5rem 0.75rem;
    text-align: start;
    vertical-align: top;
}

.announcement-short-content th,
#announcements-container th,
#announcement-content th {
    background-color: #f5f6f9;
    font-size: inherit;
    letter-spacing: normal;
    text-transform: none;
}

.fv-plugins-bootstrap5-row-invalid .ck.ck-editor .ck-toolbar,
.fv-plugins-bootstrap5-row-invalid .ck.ck-editor .ck-content,
.fv-plugins-bootstrap5-row-invalid .ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable) {
    border-color: #ff5b5c !important;
}

.select2-container--default .select2-search--inline .select2-search__field {
    width: 100% !important;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    white-space: normal;
}
/* Long user names and emails wrap inside the dropdown options instead of scrolling sideways:
   the text wraps beside its icon / id, the avatar keeps its size */
.select2-results__options {
    overflow-x: hidden;
}
.select2-results__option {
    overflow-wrap: anywhere;
}
.select2-results__option .d-flex.flex-column {
    min-width: 0;
    flex: 1 1 auto;
}
.select2-results__option .d-flex.flex-column p > * {
    min-width: 0;
}
.select2-results__option .d-flex.flex-column p > small {
    flex: 0 0 auto;
    white-space: nowrap;
}
.select2-results__option .d-flex.flex-column p.align-items-center {
    align-items: flex-start !important;
}
.select2-results__option .d-flex.flex-column p > .bx {
    flex: 0 0 auto;
    margin-top: .2em;
}
.select2-results__option .avatar {
    flex: 0 0 auto;
}
.select2-results__option .avatar img {
    object-fit: cover;
}
/* Select2 group headers: padded on a grey band so the text never touches the edge */
.light-style .select2-container--default .select2-results__group {
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: #566a7f;
    background-color: #e4e8ef;
    padding: .5rem .75rem;
}
/* Options under a group header keep a side gap, their text never touches the edge */
.light-style .select2-container--default .select2-results__option[role="group"] .select2-results__option {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* Manage displayed fields: the group boxes flow like newspaper columns, no gap under a short group */
.fields-groups {
    column-count: 2;
    column-gap: 1rem;
}
.fields-groups .fields-group {
    break-inside: avoid;
}
@media (max-width: 767.98px) {
    .fields-groups {
        column-count: 1;
    }
}

/* Stages progress */
[dir=ltr] .stages-progres ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    overflow-x: scroll;
    user-select: none;
    cursor: grab;
    /* scrollbar-width: none; */
    /* scroll-behavior: smooth; */
}
[dir=ltr] .stages-progres ul:active {
    cursor: grabbing;
}
[dir=ltr] .stages-progres ul::-webkit-scrollbar {
    height: 2px;
}

[dir=ltr] .stages-progres ul li {
    flex: 1;
    position: relative;
    background-color: #e7ebef;
    color: white;
    padding: 10px 30px 10px 40px;
    font-weight: 500;
    text-align: center;
    margin-right: 12px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    height: 36px;
    opacity: 0.3;
}
[dir=ltr] .stages-progres ul li.active {
    opacity: 1;
}

[dir=ltr] .stages-progres ul li .after {
    position: absolute;
    top: 0;
    right: -14.75px;
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 15px solid #e7ebef;
}
[dir=ltr] .stages-progres ul li .before {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-top: 18px solid transparent;
    border-bottom: 18px solid transparent;
    border-left: 15px solid white;
}

[dir=ltr] .stages-progres ul li:first-child {
    padding-left: 20px;
    /* border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem; */
}
[dir=ltr] .stages-progres ul li:first-child .before {
    display: none;
}

[dir=ltr] .stages-progres ul li:last-child {
    padding-right: 20px;
    /* border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem; */
    margin-right: 0;
}
[dir=ltr] .stages-progres ul li:last-child .after {
    display: none;
}
.stages-progres.stages-readonly li {
    cursor: default;
}

/* Notes */
.notes {
    border: 1px solid #e7ebef;
}
.notes h5 {
    background-color: #e7ebef;
    text-align: center;
    margin-bottom: 0;
    padding: 15px 0;
}
.notes .timeline-content {
    max-height: calc(100vh - 500px);
    transition: max-height 0.3s ease-in-out;
}
.notes.msg-visible .timeline-content {
    max-height: calc(100vh - 562px);
}

.notes .timeline-content {
    overflow-y: auto;
    padding: 30px 35px 45px;
}
.notes .timeline {
    margin-bottom: 0;
}

/* Notifications */
.dropdown-notifications-item b {
    font-weight: 600 !important;
}

/* Custom rtl */
.form-control[dir="rtl"]:focus::placeholder {
    transform: translate(-5px) !important;
}

/* Sticky table */
.sticky-table {
    position: relative;
    overflow-y: auto;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    margin-bottom: 1rem;
}

.sticky-table::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.sticky-table::-webkit-scrollbar-track {
    background: #f2f2f290;
}

.sticky-table::-webkit-scrollbar-thumb {
    background-color: #c7c7c750;
}

.sticky-table::-webkit-scrollbar-thumb:hover {
    background-color: #a8a8a850;
}

.sticky-table table {
    border-collapse: separate;
    border-spacing: 0;
}

.sticky-table table thead {
    position: sticky;
    top: 0;
    z-index: 3;
}

.sticky-table table thead tr th {
    background-clip: padding-box;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    border-top: 1px solid var(--bs-border-color, #dee2e6);
    border-right: 1px solid var(--bs-border-color, #dee2e6);
    border-left: 0;
}

.sticky-table table thead tr th:last-child {
    border-left: 1px solid var(--bs-border-color, #dee2e6);
}

.sticky-table table tbody tr td {
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    border-left: 0;
}

.sticky-table table tbody td:last-child {
    border-left: 1px solid var(--bs-border-color, #dee2e6);
}

.sticky-table table tbody tr:last-child td {
    border-bottom: 0;
}

table.dataTable.table-striped > tbody > tr:nth-of-type(2n+1) > * {
    box-shadow: inset 0 0 0 9999px rgb(0 0 0 / 2%) !important;
}

/* Receipt */
.receipt-logo {
    height: 50px;
}

#receipt-table th {
    padding: 10px 0 !important;
    line-height: 1.6;
    border: none;
}

#receipt-table td {
    padding: 2px 0 !important;
    line-height: 1.6;
    border: none;
}

#receipt-table #receipt-items td:first-child {
    text-align: end;
    word-break: break-word;
}

#receipt-table #receipt-items td:nth-child(2) {
    text-align: center !important;
}

#receipt-table #receipt-items td:last-child {
    text-align: left !important;
    direction: ltr;
}

/* Auto columns */
.auto-cols {
    display: flex;
    flex-wrap: wrap;
}

.auto-cols > .col-md-4 {
    flex: 0 0 calc(100% / 3);
    max-width: calc(100% / 3);
}
.auto-cols:has(> .col-md-4:first-child:nth-last-child(1)) > .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
}
.auto-cols:has(> .col-md-4:first-child:nth-last-child(2)) > .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
}
.auto-cols:has(> .col-md-4:nth-child(4)) > .col-md-4 {
    flex: 0 0 25%;
    max-width: 25%;
}

.auto-cols > .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}
.auto-cols > .col-md-6:only-child {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Padding classes */
.pe-3-plus-6px {
    padding-inline-end: calc(1rem + 6px);
}

/* height */
.min-h-0 {
    min-height: 0;
}

@media (min-width: 992px) {
    .auto-cols > .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .auto-cols > .col-lg-6:only-child {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Fix select2 multiple field */
.light-style .select2-container--default .select2-selection--multiple {
    min-height: unset !important;
}
.select2-container .select2-search--inline .select2-search__field {
    margin-top: 5.5px !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-container--default .select2-selection--multiple .select2-search--inline {
    float: none !important;
}
.select2-container--default .select2-selection--multiple .select2-search--inline {
    flex: 1 0 0;
    min-width: 1ch;
    display: flex;
}
.select2-container--default .select2-selection--multiple .select2-search__field {
    width: 100% !important;
    min-width: 0;
}

/* Swal alert */
.swal2-popup.alert-notes-container {
    width: 700px;
}
.swal2-popup.alert-notes-container .swal2-icon {
    margin-top: 2em;
}
.swal2-popup.alert-notes-container .swal2-title {
    padding-top: 0.5em;
    max-width: unset !important;
}
.swal2-popup.alert-notes-container .swal2-html-container {
    margin: .5em 1em 0 !important;
}
.swal2-popup.alert-notes-container .swal2-actions {
    margin-top: 0;
}
.swal2-popup.alert-notes-container .swal2-title {
    max-width: unset;
}
.swal2-popup.alert-notes-container .alert-notes ul {
    list-style-type: "✔ ";
    line-height: 1.4;
}
.swal2-popup.alert-notes-container .alert-notes ul li ul {
    list-style-type: "- ";
}


/* Masonry layout */
.masonry-layout {
    column-count: 2;
    column-gap: 1rem;
}
.masonry-layout .masonry-item {
    break-inside: avoid;
}
.masonry-layout .masonry-item.full-width {
  column-span: all;
}

@media (max-width: 992px) {
    .masonry-layout {
        column-count: 1;
    }
}

/* Custom responsive style */
@media (min-width: 768px) {
    html:not([dir="rtl"]) .border-md-end {
        border-right: 1px solid #d4d8dd !important;
    }
    html[dir="rtl"] .border-md-end {
        border-left: 1px solid #d4d8dd !important;
    }
    .border-md-bottom-0 {
        border-bottom: 0 !important;
    }
}

@media (min-width: 992px) {
    html:not([dir="rtl"]) .border-lg-end {
        border-right: 1px solid #d4d8dd !important;
    }
    html[dir="rtl"] .border-lg-end {
        border-left: 1px solid #d4d8dd !important;
    }
}

@media (max-width: 767.98px) {
    .offcanvas {
        max-width: 90% !important;
    }

    .btn {
        --bs-btn-padding-x: 0.85rem;
    }
    .card {
        --bs-card-spacer-x: 1rem;
        --bs-card-cap-padding-x: 1rem;
    }

    /* swal2-container */
    .swal2-container {
        padding-top: 3.9rem !important;
    }
    .swal2-container .swal2-popup {
        width: 92% !important;
    }
    .swal2-container .swal2-popup .swal2-icon {
        width: 4em !important;
        height: 4em !important;
        margin-top: 2em !important;
    }
    .swal2-container .swal2-popup .swal2-title {
        font-size: 1.5rem !important;
        padding-top: 0.5em !important;
        max-width: unset !important;
    }
    .swal2-container .swal2-popup .swal2-html-container {
        margin-top: 0.5em !important;
    }
    .swal2-container .swal2-popup .swal2-confirm {
        margin-right: 0.5rem !important;
    }
    .swal2-container div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line] {
        top: 2em !important;
        width: 2em !important;
    }
    div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip] {
        top: 2.5em !important;
        left: 0.1em !important;
    }
    div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long] {
        top: 2em !important;
        right: .25em !important;
    }

    .notes .timeline-content {
        padding: 20px 25px 35px;
    }
}

/* Table row actions: two icon buttons per line */
.table-row-actions {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 0.5rem;
    align-items: start;
}

/* Workflow column: the tiny label keeps both stage badges on the same x */
.workflow-stage-label { display: inline-block; min-width: 2.4rem; font-size: .75rem; line-height: 1; }

/* Document upload buttons: the icon glyphs carry blank space at their start */
.upload-document-btn .bx,
.upload-version-btn .bx { margin-inline-start: -2px; }

/* Application wizard (views/partials/components/application-wizard.ejs) */
/* The vendor stepper rules carry html/:first-child selectors, the few they would win keep !important */
.bs-stepper.application-wizard {
    box-shadow: none !important;
}
.bs-stepper.application-wizard .bs-stepper-header {
    padding: 0 0 1rem;
}
.bs-stepper.application-wizard .bs-stepper-header .step .step-trigger {
    flex-direction: column;
    gap: .35rem;
    padding: 0 .25rem .55rem !important;
}
.bs-stepper.application-wizard .bs-stepper-header .step .step-trigger .bs-stepper-label {
    margin: 0 !important;
    text-align: center;
}
/* The vendor line-height of 1 clips the descenders, the trigger padding above takes back the extra leading */
.bs-stepper.application-wizard .bs-stepper-header .step .step-trigger .bs-stepper-label .bs-stepper-title {
    line-height: 1.4;
}
/* Each circle holds the step icon, a passed step swaps it for a check */
.bs-stepper.application-wizard .bs-stepper-header .step .bs-stepper-circle {
    align-items: center;
    padding: 0;
}
.application-wizard .bs-stepper-circle .bx {
    font-size: 1.125rem;
    line-height: 1;
}
.application-wizard .bs-stepper-circle .wizard-step-done,
.application-wizard .step.crossed .bs-stepper-circle .wizard-step-icon {
    display: none;
}
.application-wizard .step.crossed .bs-stepper-circle .wizard-step-done {
    display: inline-block;
}
/* The connector sits at the circle's vertical centre (.25rem circle margin + half of its 2.375rem) */
.bs-stepper.application-wizard .bs-stepper-header .line {
    flex: 1 1 auto;
    align-self: flex-start;
    min-width: 1rem;
    height: 2px;
    margin-top: calc(1.4375rem - 1px);
    border-radius: 1px;
    background-color: #d4d8dd;
}
.bs-stepper.application-wizard .bs-stepper-header .step.crossed + .line {
    background-color: var(--bs-primary);
}
.bs-stepper.application-wizard .bs-stepper-content {
    padding: 1rem 0 0 !important;
}
/* The step message: 16px from the steps bar (content padding) and 16px to the step, none when empty */
.application-wizard .bs-stepper-content > .msg-container {
    margin: 0;
}
.application-wizard .bs-stepper-content > .msg-container .alert {
    margin-bottom: 1rem;
}
/* Degree group headers of the wizard: a click picks the whole group, a disabled group's header greys out */
.light-style .application-wizard-offcanvas .select2-container--default .select2-results__group {
    cursor: pointer;
}
.light-style .application-wizard-offcanvas .select2-container--default .select2-results__group.is-disabled {
    color: #a1acb8;
    cursor: default;
}
/* Programs step: the cards scroll alone, the rest of the offcanvas stays in place */
.application-wizard-offcanvas.wizard-programs-step .offcanvas-body {
    flex-grow: 1 !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.application-wizard-offcanvas.wizard-programs-step .application-wizard,
.application-wizard-offcanvas.wizard-programs-step .bs-stepper-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.application-wizard-offcanvas.wizard-programs-step .bs-stepper-header,
.application-wizard-offcanvas.wizard-programs-step .bs-stepper-content > .msg-container,
.application-wizard-offcanvas.wizard-programs-step .offcanvas-body > .wizard-actions {
    flex-shrink: 0;
}
.bs-stepper.application-wizard .content.wizard-step-programs.active {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}
.wizard-step-programs > :not(.wizard-program-cards) {
    flex-shrink: 0;
}
/* One 1rem rhythm: the card rows use row-gap, so nothing trails the last card or field */
.application-wizard .wizard-program-cards {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    align-content: flex-start;
    row-gap: 1rem;
}
/* Block labels start at the top of their cell, inline-block ones sit 4px lower on the parent's line box */
.application-wizard .form-label {
    display: block;
}
.application-wizard .wizard-program-cards > .mb-3 {
    margin-bottom: 0 !important;
}
.application-wizard .wizard-fields-groups .row,
.application-wizard .wizard-documents-groups .row {
    row-gap: .5rem;
}
.application-wizard .wizard-fields-groups .row > .mb-2,
.application-wizard .wizard-documents-groups .row > .mb-2 {
    margin-bottom: 0 !important;
}
.application-wizard-offcanvas .wizard-program-reason { line-height: 1.3; }
.application-wizard .wizard-selected-collapse .wizard-selected-scroll {
    max-height: 9rem;
    overflow-x: hidden;
    overflow-y: auto;
}
.application-wizard .wizard-step-programs .wizard-pager-side {
    flex: 1 1 0;
}
/* Multiple filters stay one line high, the chosen chips scroll sideways inside the box */
.application-wizard .wizard-program-filters .select2-container--default .select2-selection--multiple {
    height: 2.375rem;
    min-height: 0;
    overflow: hidden;
}
.application-wizard .wizard-program-filters .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    height: 100%;
}
.application-wizard .wizard-program-filters .select2-selection--multiple .select2-selection__rendered::-webkit-scrollbar {
    display: none;
}
.application-wizard .wizard-program-filters .select2-selection--multiple .select2-selection__choice,
.application-wizard .wizard-program-filters .select2-selection--multiple .select2-search--inline {
    float: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.application-wizard .wizard-program-filters .select2-selection--multiple .select2-search__field {
    min-width: 4ch;
}
.wizard-step-programs .wizard-selected-toggle .bx {
    transition: transform .2s ease;
}
.wizard-step-programs .wizard-selected-toggle[aria-expanded="true"] .bx {
    transform: rotate(180deg);
}
/* Long texts wrap inside their boxes, with the normal line height and small row gaps */
.application-wizard-offcanvas .wizard-shrink,
.application-wizard-offcanvas .wizard-icon-item,
.application-wizard-offcanvas .wizard-summary-grid > *,
#student-applications-cards .wizard-shrink {
    min-width: 0;
}
.application-wizard-offcanvas .wizard-summary-grid > * {
    overflow-wrap: anywhere;
}
/* Pipeline labels of the student application cards */
.student-application-pipeline {
    font-size: .875rem;
}
.application-wizard-offcanvas .wizard-icon-row {
    column-gap: 1rem;
    row-gap: .125rem;
}
/* Card actions (remove, upload, new version), lighter than the theme's btn-icon size */
.application-wizard-offcanvas .wizard-remove-program .bx,
.application-wizard-offcanvas .document-card-action .bx {
    font-size: 1rem;
}
/* The item centres its icon against the text, the icon keeps its 14px size */
.application-wizard-offcanvas .wizard-icon-item > .bx {
    font-size: .875rem;
    flex-shrink: 0;
}
.application-wizard .wizard-summary-grid {
    display: grid;
    grid-template-columns: minmax(0, max-content) 1fr;
    column-gap: .5rem;
    row-gap: .25rem;
    align-items: baseline;
}
/* The fixed program card above the steps */
.application-wizard-summary .summary-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: .5rem;
    row-gap: .25rem;
    align-items: baseline;
}
/* Student picker results, one line between the students */
.wizard-student-dropdown .select2-results__option + .select2-results__option {
    border-top: 1px solid rgba(38, 60, 85, .07);
}
/* Scholarship available badge on the programs table */
.scholarship-badge {
    background-color: #f6a812;
    color: #fff;
}

/* ApexCharts: the theme anchors y-axis labels at their start on RTL pages, which draws a right (opposite) axis over the plot.
   Charts sit in a dir="ltr" box, there Apex's own per-axis anchors (left end, right start) apply again */
[dir=rtl] [dir=ltr] .apexcharts-canvas .apexcharts-yaxis text {
    text-anchor: revert-layer;
}
