/*
 * Bootstrap 5 migration compatibility layer.
 *
 * This file is intentionally local and small: network access is restricted, so
 * the current base templates load the legacy vendored Bootstrap CSS followed by
 * these Bootstrap 5-style utilities and Bootstrap 3 bridge classes. When real
 * Bootstrap 5 vendor files are added locally, keep this file after them until
 * all page templates have been migrated.
 */

:root {
    --vtm-primary: #0d6efd;
    --vtm-secondary: #6c757d;
    --vtm-success: #198754;
    --vtm-info: #0dcaf0;
    --vtm-warning: #ffc107;
    --vtm-danger: #dc3545;
    --vtm-light: #f8f9fa;
    --vtm-dark: #212529;
    --vtm-border: #dee2e6;
    --vtm-body: #212529;
    --vtm-muted: #6c757d;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
}

.bg-white {
    background-color: #fff !important;
}

.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: .5rem 0;
}

.navbar > .container,
.navbar > .container-fluid {
    display: flex;
    flex-wrap: inherit;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    margin-right: 1rem;
    white-space: nowrap;
}

.navbar-nav {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.navbar-nav .nav-link {
    display: block;
    padding: .5rem 1rem;
}

.navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
}

.navbar-toggler {
    padding: .25rem .75rem;
    font-size: 1.25rem;
    line-height: 1;
    color: rgba(0, 0, 0, .65);
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .375rem;
}

.navbar-light .navbar-toggler {
    border-color: rgba(0, 0, 0, .15);
}

.collapse:not(.show) {
    display: none;
}

.collapsing {
    height: 0;
    overflow: hidden;
    transition: height .2s ease;
}

.ms-auto {
    margin-left: auto !important;
}

.me-2 {
    margin-right: .5rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.float-end,
.pull-right {
    float: right !important;
}

.float-start,
.pull-left {
    float: left !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.gap-2 {
    gap: .5rem !important;
}

.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    display: inline-block;
    margin-left: .255em;
    vertical-align: .255em;
    content: "";
    border-top: .3em solid;
    border-right: .3em solid transparent;
    border-bottom: 0;
    border-left: .3em solid transparent;
}

.dropdown-toggle .caret {
    display: none;
}

.dropdown-menu {
    position: absolute;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: .5rem 0;
    margin: .125rem 0 0;
    font-size: 1rem;
    color: var(--vtm-body);
    text-align: left;
    list-style: none;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: .375rem;
}

.dropdown-menu.show,
.dropdown.open > .dropdown-menu {
    display: block;
}

.dropdown-menu > li > a,
.dropdown-item {
    display: block;
    width: 100%;
    padding: .25rem 1rem;
    clear: both;
    font-weight: 400;
    color: var(--vtm-body);
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus,
.dropdown-item:hover,
.dropdown-item:focus {
    color: #1e2125;
    background-color: #e9ecef;
}

.card,
.panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: var(--vtm-body);
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid var(--vtm-border);
    border-radius: .375rem;
    margin-bottom: 1rem;
}

.card-header,
.panel-heading {
    padding: .75rem 1rem;
    margin-bottom: 0;
    color: inherit;
    background-color: rgba(0, 0, 0, .03);
    border-bottom: 1px solid var(--vtm-border);
}

.card-body,
.panel-body {
    flex: 1 1 auto;
    padding: 1rem;
}

.card-footer,
.panel-footer {
    padding: .75rem 1rem;
    background-color: rgba(0, 0, 0, .03);
    border-top: 1px solid var(--vtm-border);
}

.badge,
.label {
    display: inline-block;
    padding: .35em .65em;
    font-size: .75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .375rem;
}

.text-bg-primary,
.label-primary {
    color: #fff !important;
    background-color: var(--vtm-primary) !important;
}

.text-bg-secondary,
.label-default {
    color: #fff !important;
    background-color: var(--vtm-secondary) !important;
}

.text-bg-success,
.label-success {
    color: #fff !important;
    background-color: var(--vtm-success) !important;
}

.text-bg-info,
.label-info {
    color: #000 !important;
    background-color: var(--vtm-info) !important;
}

.text-bg-warning,
.label-warning {
    color: #000 !important;
    background-color: var(--vtm-warning) !important;
}

.text-bg-danger,
.label-danger {
    color: #fff !important;
    background-color: var(--vtm-danger) !important;
}

.btn-xs {
    padding: .125rem .25rem;
    font-size: .75rem;
    line-height: 1.5;
    border-radius: .2rem;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--vtm-body);
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    appearance: none;
    border-radius: .375rem;
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group > .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group > .btn {
    position: relative;
    z-index: 2;
}

.input-group > .form-control:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group > .btn:not(:first-child) {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-group-btn {
    display: flex;
}

.input-group-btn > .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--vtm-body);
    vertical-align: top;
    border-color: var(--vtm-border);
}

.table > :not(caption) > * > * {
    padding: .5rem;
    background-color: transparent;
    border-bottom-width: 1px;
}

.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: .25em;
    color: #000;
    background: transparent;
    border: 0;
    opacity: .5;
}

.btn-close::before {
    content: "\00d7";
    display: block;
    font-size: 1.5rem;
    line-height: .75;
}

.btn-close:hover,
.btn-close:focus {
    color: #000;
    text-decoration: none;
    opacity: .75;
}

.app-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-header .logo {
    flex: 0 0 auto;
}

.top-nav {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.top-menu {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
}

.top-menu > li {
    float: none !important;
}

.app-sidebar-toggle {
    display: none;
    margin-top: 11px;
}

.sidebar-menu .sub-menu > a {
    cursor: pointer;
}

#sidebar .sub-menu > .sub.show {
    display: block;
}

#main-content {
    min-height: 100vh;
}

#main-content > .wrapper,
#main-content > .container,
#main-content > .container-fluid {
    max-width: 100%;
}

@media (min-width: 768px) {
    .navbar-expand-md {
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .navbar-expand-md .navbar-nav {
        flex-direction: row;
    }

    .navbar-expand-md .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }

    .navbar-expand-md .navbar-toggler {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .header-frontend .navbar {
        min-height: 70px;
    }

    .header-frontend .navbar-brand {
        margin-top: 0;
        padding-left: 0;
    }

    .header-frontend .navbar-nav > li {
        padding-top: .25rem;
        padding-bottom: .25rem;
    }

    .app-sidebar-toggle {
        display: inline-block;
        flex: 0 0 auto;
    }

    .app-header .logo {
        margin-top: 0;
    }

    .top-nav {
        flex: 1 1 auto;
        min-width: 0;
    }

    .top-menu {
        justify-content: flex-end;
        width: 100%;
    }

    .navbar-search {
        display: none;
    }

    body.sidebar-open #sidebar {
        display: block;
        top: 60px;
    }

    body.sidebar-open #main-content {
        margin-top: 0;
    }
}
