/*
 * Base structure
 */

html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

.cover-container {
    flex: 1;
}

.cover-container > nav {
    flex: none;
}
.cover-container > .container {
    flex: 1 0 auto;
}
.cover-container > footer {
    flex: none;
}

/*
 * Navbar
 */
.navbar {
    min-height: 60px;
}

/**
 * Language switcher
 */

.lang-switcher .lang-flag {
    width: 21px;
    height: auto;
    margin-right: 0.5rem;
    flex: none;
    border: 1px solid var(--bs-border-color);
    border-radius: 2px;
}

/* .form-select is 100% wide by default, which would stretch the navbar. */
.lang-switcher .lang-select {
    width: auto;
    min-width: 10rem;
}

/**
 * Day / night mode
 *
 * Bootstrap 5.3 does the theming itself through [data-bs-theme]; the rules
 * here only pick which of the two toggle icons is visible. The button shows
 * the mode it switches TO, so light mode shows the moon and vice versa.
 */

.theme-toggle {
    line-height: 1;
}

.theme-toggle .theme-icon-sun {
    display: none;
}

[data-bs-theme="dark"] .theme-toggle .theme-icon-moon {
    display: none;
}

[data-bs-theme="dark"] .theme-toggle .theme-icon-sun {
    display: inline-block;
}

/**
 * Sidebar
 */

.list-group-borderless .list-group-item {
    border: 0 !important;
}

.list-group-borderless .list-group-item.active {
    color: var(--bs-primary);
    background-color: inherit;
    font-weight: bold;
}

.list-group-borderless .list-group-item i {
    color: var(--bs-secondary-color);
    width: 25px;
}

.list-group-borderless .list-group-item.active i {
    color: var(--bs-primary);
}

/**
 * Social Buttons
 */
.btn-social:hover {
    opacity: 0.85;
    text-decoration: none;
}

.btn-facebook, .btn-facebook:hover {
    color: #3B5998;
}

.btn-twitter, .btn-twitter:hover {
    color: #55ACEE;
}

.btn-google, .btn-google:hover {
    color: #dd4b39;
}

/**
 * Login Page Form Wrapper
 */
.form-wrapper { display: none; }
.form-wrapper.active { display: block; }

/**
 * Misc
 */

.page-header small {
    font-size: 1rem;
}

.blockquote {
    font-size: 1rem;
}

.table th {
    font-size: 0.85rem;
    color: var(--bs-secondary-color);
}

.dropdown-item i {
    color: var(--bs-secondary-color);
}

label .required {
    color: var(--bs-danger);
}

.table-responsive {
    min-height: 200px;
}

dt {
    font-weight: 400 !important;
}

dd {
    font-weight: 700;
}

/**
 * Responsive CSS Rules
 */

@media (min-width : 992px) {
    .table-responsive {
        overflow-x: visible;
    }
}

@media (max-width : 768px) {
    .list-group-borderless {
        margin-bottom: 20px;
    }

    /* The switcher is a single control now, so it only needs breathing room
       once the navbar collapses - not the old flag row distribution. */
    .localization-icons {
        margin-top: 15px;
        margin-bottom: 10px;
    }

    .lang-switcher .lang-select {
        min-width: 0;
        flex: 1 1 auto;
    }
}