/*
 * Portal styles, loaded after Bootstrap 5.
 *
 * The first part is the house style (fonts, page layout, sidebar menu, buttons, tiles, page-specific rules),
 * formerly connect.css. The second part started as a compatibility layer during the migration from Bootstrap 3,
 * so pages kept their original look: it brings back Bootstrap 3 defaults (14px text, link colors, spacing) and
 * restyles the shared shell (navbar, sidebar) for Bootstrap 5 markup. Revisit that part: keep what is part of the
 * house style and drop the rest.
 */

/*
 * Self-hosted Nunito Sans, replacing the external Google Fonts <link> for GDPR/privacy reasons.
 */
@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 400;
    font-stretch: 100%;
    font-display: swap;
    src: url('/static/fonts/nunito-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 600;
    font-stretch: 100%;
    font-display: swap;
    src: url('/static/fonts/nunito-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 800;
    font-stretch: 100%;
    font-display: swap;
    src: url('/static/fonts/nunito-sans-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 400;
    font-stretch: 100%;
    font-display: swap;
    src: url('/static/fonts/nunito-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 600;
    font-stretch: 100%;
    font-display: swap;
    src: url('/static/fonts/nunito-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Nunito Sans';
    font-style: normal;
    font-weight: 800;
    font-stretch: 100%;
    font-display: swap;
    src: url('/static/fonts/nunito-sans-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

a.help-large {
    text-align: center; position: absolute; top: 0; right: 15px; color: #ffffff; background: rgb(224,82,75);
    border-color: rgb(236,83,69)!important;
    border-radius: 0 0 9px 9px;
    padding: 5px 12px 5px 12px;
    opacity: 0.7;
}

a.help-large:hover {
    opacity: 1.0;
    text-decoration: none;
}

a.help-small {
    text-align: center; color: #ffffff; position: absolute; background: rgb(224,82,75);
    left: 50%;
    margin-left: -30px;
    top: 0;
    border-color: rgb(236,83,69)!important;
    border-radius: 0 0 9px 9px;
    padding: 5px 12px 5px 12px;
    opacity: 0.7;
    width: 60px;
}

a.help-small:hover {
    opacity: 1.0;
    text-decoration: none;
}

#menu-hint {
    text-align: center; position: absolute; top: 70px; right: 15px; color: #ffffff; background: #62605b;
    border-color: rgb(236,83,69)!important;
    border-radius: 0 0 9px 9px;
    padding: 3px 6px 4px 6px;
    opacity: 0.7;
    font-size: 12px;
}

.conditions-checked a:link, .conditions-checked a:visited {
    color: #e0e0e0;
}

a.grid-link-white:hover, a.grid-link-white:active {
    color: #d0d0d0;
}

a.grid-link-white, a.grid-link-white:link, a.grid-link-white:visited {
    color: #ffffff;
}

.grid-favorite {
    width: 154px;
    height: 130px;
    display: inline-block;
    text-align: center;
    padding-top: 20px;
    margin: 6px;
}

/* Tiles stretch to fill the full row width, wrapping into as many equal columns as fit */
.grid-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
    gap: 12px;
}

.grid-fill > .grid-favorite {
    width: auto;
    margin: 0;
}

/* Drag-and-drop grids run Sortable in fallback mode (forceFallback, needed to drag a second time
   in Safari), which moves tiles with plain mouse events instead of native DnD. Without this Chrome
   starts a text selection on mousedown and highlights the tile labels while dragging.
   .sortable-fallback is the cloned tile Sortable appends to <body> as the drag image. */
.grid-sortable,
.grid-sortable *,
.sortable-fallback,
.sortable-fallback * {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Narrower gutter than Bootstrap's default 30px, for rows of side-by-side breadcrumb bars */
.row-tight {
    margin-left: -5px;
    margin-right: -5px;
}

.row-tight > [class*="col-"] {
    padding-left: 5px;
    padding-right: 5px;
}

/* Body text that has to stay within the fixed height of its tile: clipped to two lines with a
   trailing ellipsis instead of pushing the tile taller than its neighbours. */
.text-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

/* Breadcrumb bar holding a "label: value" setting on the left and an edit/add link on the right.
   The value can be a long name, so the left side is clipped with an ellipsis instead of wrapping
   out of the bar's fixed height. */
.breadcrumb-setting {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.breadcrumb-setting > span {
    min-width: 0; /* flex items default to min-width: auto, which refuses to shrink below the text */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb-setting > a {
    flex: none; /* the link keeps its width; only the value gives way */
    padding-left: 10px;
    white-space: nowrap;
}

/* Below Bootstrap's xl breakpoint the bars are too narrow to spend room on the link's wording,
   so it falls back to its icon alone (the link's title attribute keeps the wording reachable). */
@media (max-width: 1199px) {
    .breadcrumb-setting > a > .breadcrumb-setting-link-label {
        display: none;
    }
}

/* Clickable tiles lift on hover. The tile background is set inline per app/category, so only
   properties that are not inlined may be touched here. */
.grid-favorite-hover {
    transition: transform 0.1s, box-shadow 0.1s, border-color 0.1s;
}

.grid-favorite-hover:hover {
    transform: translateY(-2px);
    border-color: #b3b3b3;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

/* Tiles for apps that are already on the home screen: visible, but not selectable. The fade is
   applied to the tile's contents rather than the tile itself, so the notice stays at full
   strength (a parent's opacity would clamp it). */
.grid-favorite-disabled > *:not(.catalog-app-notice) {
    opacity: 0.45;
}

/* Notice overlaid across the top of a disabled tile */
.catalog-app-notice {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 3px 6px;
    background-color: rgba(229, 220, 202, 0.92);
    border-bottom: solid 1px rgba(0, 0, 0, 0.1);
    border-radius: 3px 3px 0 0;
    color: #5f5a52;
    font-size: 11px;
    font-weight: normal;
    line-height: 1.25;
    text-align: center;
}

.app-icon-frame-classic {
    --icon-frame-color: #424242;
    --icon-frame-size: 64px;
    --icon-frame-border: 0px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 0;
    flex: 0 0 auto;
    width: var(--icon-frame-size);
    height: var(--icon-frame-size);
    background-color: var(--icon-frame-color);
    clip-path: url(#app-icon-squircle);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

.app-icon-frame-connect {
    --icon-frame-color: #424242;
    --icon-frame-size: 72px;
    --icon-frame-border: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 0;
    flex: 0 0 auto;
    width: var(--icon-frame-size);
    height: var(--icon-frame-size);
    background-color: var(--icon-frame-color);
    clip-path: url(#app-icon-squircle);
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
}

.app-icon-frame-surface {
    width: calc(100% - var(--icon-frame-border) * 2);
    height: calc(100% - var(--icon-frame-border) * 2);
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: url(#app-icon-squircle);
}

.app-icon-frame-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.roundedimage {
    background-color: #Ffffff;
    border: 3px dotted #ffffff;
    border-radius: 50% 50% 50% 50%;
}

.btn-default {
    background-image: linear-gradient(to bottom, #e0e0e0 0, #e0e0e0 100%);
    border: 0;
    padding-top: 7px; padding-bottom: 7px; padding-left: 15px; padding-right: 15px;
}

.btn-default:hover {
    background-color: #0094c4;
    background-position: 0;
}

.btn-primary {
    background-image: linear-gradient(to bottom, #0094c4 0, #0094c4 100%);
    border: 0;
    padding-top: 7px; padding-bottom: 7px; padding-left: 15px; padding-right: 15px;
}

.btn-primary:hover {
    background-color: #0094c4;
    background-position: 0;
}

.btn-success {
    background-image: linear-gradient(to bottom, #62943b 0, #62943b 100%);
    border: 0;
    padding-top: 7px; padding-bottom: 7px; padding-left: 15px; padding-right: 15px;
}

.btn-success:hover {
    background-color: #0094c4;
    background-position: 0;
}

.btn-danger {
    background-image: linear-gradient(to bottom, #e1524c 0, #e1524c 100%);
    border: 0;
    padding-top: 7px; padding-bottom: 7px; padding-left: 15px; padding-right: 15px;
}

.btn-danger:hover {
    background-color: #0094c4;
    background-position: 0;
}

.table-responsive-wrapper {
    position: relative;
}

.scroll-fade {
    position: absolute;
    top: 0;
    width: 40px;
    height: 100%;
    pointer-events: none;
    transition: opacity 0.3s;
}

.scroll-fade-right {
    right: 0;
    background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,1));
}
.scroll-fade-left {
    left: 0;
    background: linear-gradient(to left, rgba(255,255,255,0), rgba(255,255,255,1));
    opacity: 0;
}
/*
 * Base structure
 */

/* Move down content because we have a fixed navbar that is 70px tall */
body {
    padding-top: 70px;
    color: #606060;
    font-family: 'Nunito Sans', sans-serif;
}


/*
 * Sidebar
 */

/* Hide for mobile, show later */
.sidebar {
    display: none;
}
@media (min-width: 800px) {
    .sidebar {
        position: fixed;
        padding-left: 15px;
        padding-right: 15px;
        width: 200px;
        top: 70px;
        bottom: 0;
        left: 0;
        z-index: 1000;
        display: block;
        overflow-x: hidden;
        overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
        background-color: #e5e0da;
    }
}

#order-back-to-site {
    color: #ffffff;
}

#order-back-to-site:hover {
    text-decoration: none;
    color: #e0e0e0;
}

/* Sidebar navigation */
.nav-sidebar-sub a {
    color: #606060;
    font-weight: 600;
    padding-left: 59px !important;
    padding-top: 5px !important;
    padding-right: 20px !important;
    padding-bottom: 5px !important;
}

.nav-sidebar {
    border-bottom: 1px #fffcf9 solid;
    margin-right: -20px; /* 20px padding + 1px border */
    margin-bottom: 20px;
    margin-left: -20px;
}
.nav-sidebar-main > a {
    padding-right: 20px;
    padding-left: 15px;
    padding-top: 5px;
    padding-bottom: 5px;
    font-weight: 600;
    color: #606060;
}
.nav-sidebar > .active > a,
.nav-sidebar > .active > a:hover,
.nav-sidebar > .active > a:focus {
    color: #fff;
    background-color: #e1524c;
}

.nav-sidebar-sub-active > a,
.nav-sidebar-sub-active > a:hover,
.nav-sidebar-sub-active > a:focus {
    background-color: #d3cfc4;
}

.nav-sidebar > li > a:hover,
.nav-sidebar > li > a:focus {
    background-color: #d3cfc4;
}

.nav-sidebar > ul > li > a:hover,
.nav-sidebar > ul > li > a:focus {
    background-color: #d3cfc4;
}

.nav-sidebar-main {
    border-top: 1px #fffcf9 solid;
}

.nav-sidebar-main-first {
    border-top: 0;
}

/* The side panel and the room reserved for it (.overview) switch at 1040px, matching the old
   Bootstrap 3 build's custom lg breakpoint. Bootstrap 5's stock xl (1200px) is not used here.
   .sidebar2-fallback is the inline replacement shown below that width. */
.sidebar2 {
    display: none;
}

@media (min-width: 1040px) {
    .sidebar2-fallback {
        display: none;
    }

    .sidebar2 {
        position: fixed;
        padding-left: 50px;
        padding-right: 15px;
        padding-top: 25px;
        width: 400px;
        top: 70px;
        bottom: 0;
        right: 0;
        z-index: 1000;
        display: block;
        overflow-x: hidden;
        overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
        background-color: #ffffff;
    }
}

/*
 * Main content
 */

@media (min-width: 800px) {
    .main {
        padding-right: 15px;
        padding-left: 215px;
    }
}

@media (max-width: 799px) {
    .main {
        padding-right: 0px;
        padding-left: 0px;
    }
}

.overview {
    padding-top: 25px;
    padding-right: 25px;
    padding-left: 25px;
}

@media (min-width: 1040px) {
    .overview {
        padding-top: 25px;
        padding-right: 425px;
        padding-left: 25px;
    }
}

@media (max-width: 799px) {
    .overview-buttons {
        padding-top: 10px;
    }
}

#subscriber {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    border: 2px solid #808080;
    background-color: #e5e0da;
    border-radius: 5px;
}

#publisher {
    position: absolute;
    width: 150px;
    height: 100px;
    top: 15px;
    left: 30px;
    z-index: 100;
    border: 3px solid white;
    border-radius: 3px;
}

.image-box .thumbnail {
    display: table-cell;
    vertical-align: middle;
    width: 100vh;
    height: 365px;
}

.image-box .thumbnail img {
    max-height: 350px;
}

a.calendar-item {
    cursor:pointer;
}

a.inactive {
    cursor: default;
}

a.inactive:hover {
    text-decoration: none;
}

a.calendar-partner span.calendar-title {
    color: #606060;
}

body.bottom-padding {
    padding-bottom: 150px;
}

.spacer {
    display: inline-block;
    margin: 0;
    padding: 0;
}

.selectable-icon {
    border: 2px solid #ffffff;
    border-radius: 5px;
    transition: all 0.1s;
    cursor: pointer;
    box-sizing: border-box;
}

.selectable-icon:hover {
    border: 2px solid #4c4c4c;
    transition: border-color 0.1s;
    background-color: #f1f1f1;
}

.selectable-icon.selected {
    border: 2px solid #000000;
    border-radius: 5px;
    transition: border-color 0.1s;
    background-color: #f1f1f1;
}

/*
 * Bootstrap 3 compatibility
 */

/* Bootstrap 3 typography and link defaults */
:root {
    --bs-body-font-size: 14px;
    --bs-body-line-height: 1.428571;
    --bs-body-color: #606060;
    --bs-link-color: #337ab7;
    --bs-link-color-rgb: 51, 122, 183;
    --bs-link-hover-color: #23527c;
    --bs-link-hover-color-rgb: 35, 82, 124;
    --bs-border-radius: 4px;
}

a {
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

p {
    margin: 0 0 10px;
}

/* Bootstrap 3 rendered labels bold */
.form-label {
    font-weight: 700;
    margin-bottom: 5px;
}

/* Form controls and buttons: Bootstrap 5 uses 1rem (16px) */
.form-control,
.form-select {
    font-size: 14px;
    line-height: 1.428571;
}

/* Bootstrap 3 .checkbox/.radio spacing: 10px around, consecutive ones 5px closer (rows 30px apart) */
.form-check {
    margin-top: 10px;
    margin-bottom: 10px;
}

.form-check + .form-check {
    margin-top: -5px;
}

/* Bootstrap 3 input placement (absolute, not floated): inline styles on the inputs (e.g. position: relative) keep
   affecting the row height as before */
.form-check {
    position: relative;
    min-height: 0; /* Bootstrap 5: 1.5rem; Bootstrap 3 .checkbox/.radio had none */
}

.form-check .form-check-input {
    float: none;
    position: absolute;
    margin-top: 4px;
    margin-left: -1.5em;
    vertical-align: baseline;
    width: 13px; /* Bootstrap 3 used the 13px native checkbox; Bootstrap 5 draws 1em (14px) */
    height: 13px;
}

.btn {
    --bs-btn-font-size: 14px;
    --bs-btn-line-height: 1.428571;
}

.dropdown-menu {
    --bs-dropdown-font-size: 14px;
}

/* Bootstrap 3 heading sizes; Bootstrap 5 uses larger, viewport-dependent sizes */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    line-height: 1.1;
}
h1 { font-size: 36px; }
h2 { font-size: 30px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }
h1, h2, h3 { margin-top: 20px; margin-bottom: 10px; }
h4, h5, h6 { margin-top: 10px; margin-bottom: 10px; }

/* Buttons: .btn-default (no longer part of Bootstrap 5) is restyled above, Bootstrap 3 text color */
.btn-default {
    --bs-btn-color: #333;
    --bs-btn-hover-color: #333;
    --bs-btn-active-color: #333;
}

/* Alerts: Bootstrap 3 colors and paragraph spacing */
.alert > p,
.alert > ul {
    margin-bottom: 0;
}

.alert > p + p {
    margin-top: 5px;
}

.alert-dismissible {
    padding-right: 35px;
}

/* Alert and close button look from bootstrap-theme.css (gradient, darker border, shadow; light close icon) */
.alert {
    text-shadow: 0 1px 0 rgba(255, 255, 255, .2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 2px rgba(0, 0, 0, .05);
}

.alert-success { background-image: linear-gradient(to bottom, #dff0d8 0, #c8e5bc 100%); }
.alert-info { background-image: linear-gradient(to bottom, #d9edf7 0, #b9def0 100%); }
.alert-warning { background-image: linear-gradient(to bottom, #fcf8e3 0, #f8efc0 100%); }
.alert-danger { background-image: linear-gradient(to bottom, #f2dede 0, #e7c3c3 100%); }

.btn-close {
    --bs-btn-close-opacity: .2;
    --bs-btn-close-hover-opacity: .5;
}

.alert-success {
    --bs-alert-color: #3c763d;
    --bs-alert-bg: #dff0d8;
    --bs-alert-border-color: #b2dba1;
}

.alert-info {
    --bs-alert-color: #31708f;
    --bs-alert-bg: #d9edf7;
    --bs-alert-border-color: #9acfea;
}

.alert-warning {
    --bs-alert-color: #8a6d3b;
    --bs-alert-bg: #fcf8e3;
    --bs-alert-border-color: #f5e79e;
}

.alert-danger {
    --bs-alert-color: #a94442;
    --bs-alert-bg: #f2dede;
    --bs-alert-border-color: #dca7a7;
}

/* Modals: Bootstrap 3 dialog width (Bootstrap 5: 500px) and title */
.modal {
    --bs-modal-width: 600px;
    --bs-modal-padding: 15px;
    --bs-modal-header-padding: 15px;
}

/* Close button in the modal header: no extra padding/margin, so it does not make the header taller than the title */
.modal-header .btn-close {
    padding: 0;
    margin: 0 0 0 auto;
}

.modal-title {
    margin: 0; /* the h4 rule above adds a top margin; Bootstrap 3 reset both */
    line-height: 1.428571;
}

/* Bootstrap 3 tables: spacing, inherited text color (Bootstrap 5.3: black) and no cell background, so row and table
   backgrounds (often set inline) show through; Bootstrap 5 paints every cell white */
.table {
    margin-bottom: 20px;
    --bs-table-color: currentcolor;
    --bs-table-bg: transparent;
}

/* Bordered table directly inside a card (Bootstrap 3 panel): the card draws the outer border */
.card > .table {
    margin-bottom: 0;
}

.card > .table-bordered {
    border-style: hidden;
}

/* Clickable option tile (Bootstrap 3 .jumbotron, removed in Bootstrap 5). Padding and colors are set inline. */
.option-tile {
    padding: 30px 15px;
    margin-bottom: 30px;
    color: inherit;
    background-color: #eee;
    border-radius: 6px;
}

.option-tile p {
    margin-bottom: 15px;
    font-size: 21px;
    font-weight: 200;
}

/* Bootstrap 3 had 15px gutters (30px total); Bootstrap 5 has 12px (24px total) */
.row {
    --bs-gutter-x: 30px;
}

.container-fluid {
    --bs-gutter-x: 30px;
}

/*
 * Navbar: Bootstrap 3 positioned the brand and right-aligned items with floats inside a 50px high bar.
 * Bootstrap 5 is flexbox based and vertically centers items, so align them at the top and restore the
 * Bootstrap 3 brand box the logo offsets (inline styles on the logo) were tuned for.
 */
.navbar {
    padding: 0;
    align-items: flex-start;
    flex-wrap: wrap; /* also with .navbar-expand-*: the order flow bar above the logo spans the full width */
    align-content: flex-start; /* rows keep their own height in the fixed-height bar */
}

.navbar > .container-fluid {
    align-items: flex-start;
}

.navbar-brand {
    height: 50px;
    padding: 15px;
    margin-right: 0;
    font-size: 18px;
    line-height: 20px;
}

.navbar > .container-fluid .navbar-brand {
    margin-left: -15px;
}

/* Bootstrap 3 .navbar-right */
@media (min-width: 768px) {
    .navbar .navbar-nav.ms-auto {
        margin-right: -15px;
    }
}

.navbar .nav-link {
    color: var(--bs-link-color);
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    text-decoration: none;
    color: var(--bs-link-hover-color);
}

/* Sidebar navigation: Bootstrap 3 .nav stacked its items as blocks; Bootstrap 5 .nav is a flex row */
.nav-sidebar,
.nav-sidebar .nav {
    flex-direction: column;
    flex-wrap: nowrap;
}

.nav-sidebar li > a {
    display: block;
    padding: 10px 15px;
}

.nav-sidebar li > a:hover,
.nav-sidebar li > a:focus {
    text-decoration: none;
}

/* Content box (Bootstrap 3 .well with bootstrap-theme.css, removed in Bootstrap 5). Padding and gradient are mostly set inline. */
.content-well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    background-image: linear-gradient(to bottom, #e8e8e8 0, #f5f5f5 100%);
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .05), 0 1px 0 rgba(255, 255, 255, .1);
}

/* Bootstrap 3 rendered unstyled file inputs as blocks */
input[type="file"] {
    display: block;
}

/* Bootstrap 3 columns were positioned (absolutely positioned children, e.g. chat bubble tails, depend on it) */
.row > .col,
.row > [class^="col-"],
.row > [class*=" col-"] {
    position: relative;
}

/* Muted text: Bootstrap 3 color */
.text-muted {
    color: #777 !important;
}

/* Badges (Bootstrap 3 .label): shape and colors */
.badge {
    display: inline;
    padding: .2em .6em .3em;
    font-size: 75%;
    line-height: 1;
    border-radius: .25em;
}

.text-bg-secondary {
    background-color: #777 !important;
}

.text-bg-danger {
    background-color: #d9534f !important;
}

/* Colored bar (Bootstrap 3 .breadcrumb, used here as a container for a .row, not as navigation): Bootstrap 5 makes it flex */
.breadcrumb {
    display: block;
    padding: 8px 15px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

/* Image/video frame (Bootstrap 3 .thumbnail, removed in Bootstrap 5) */
.thumbnail {
    display: block;
    padding: 4px;
    margin-bottom: 20px;
    line-height: 1.428571;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border .2s ease-in-out;
}

.thumbnail > img,
.thumbnail a > img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-right: auto;
    margin-left: auto;
}

a.thumbnail:hover,
a.thumbnail:focus {
    border-color: #337ab7;
}

/* Previous/next links (Bootstrap 3 .pager, removed in Bootstrap 5) */
.pager {
    padding-left: 0;
    margin: 20px 0;
    text-align: center;
    list-style: none;
}

.pager li {
    display: inline;
}

.pager li > a {
    display: inline-block;
    padding: 5px 14px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 15px;
}

.pager li > a:hover,
.pager li > a:focus {
    text-decoration: none;
    background-color: #eee;
}

.pager .next > a {
    float: right;
}

.pager .previous > a {
    float: left;
}

.pager .disabled > a,
.pager .disabled > a:hover,
.pager .disabled > a:focus {
    color: #777;
    cursor: not-allowed;
    background-color: #fff;
}

/* Progress bar: Bootstrap 3 (with bootstrap-theme.css) colors and text placement */
.progress {
    --bs-progress-bg: #f5f5f5;
    --bs-progress-bar-bg: #337ab7;
    --bs-progress-font-size: 12px;
    margin-bottom: 20px;
    background-image: linear-gradient(to bottom, #ebebeb 0, #f5f5f5 100%);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
}

.progress-bar {
    justify-content: flex-start;
    line-height: 20px;
}

.progress-bar-striped {
    background-size: 40px 40px;
}

/*
 * File picker (replaces bootstrap-filestyle, see /static/js/file-picker.js). Not a compatibility rule: keep this
 * when the Bootstrap 3 rules above are removed. The file input stays focusable but invisible; the button shows focus.
 */
.file-picker {
    position: relative;
}

.file-picker-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.file-picker-input:focus-visible + .input-group > .btn {
    box-shadow: 0 0 0 .25rem rgba(51, 122, 183, .5);
}

.file-picker-input:disabled + .input-group > .btn {
    pointer-events: none;
    opacity: .65;
}

/* Horizontal rule: Bootstrap 3 spacing and color (Bootstrap 5: 16px margins, current color at 25% opacity) */
hr {
    margin: 20px 0;
    color: #eee;
    opacity: 1;
}

/* Links without href (e.g. modal triggers): Bootstrap 5 renders them in the text color, Bootstrap 3 as links */
a:not([href]):not([class]) {
    color: var(--bs-link-color);
}

a:not([href]):not([class]):hover {
    color: var(--bs-link-hover-color);
    text-decoration: underline;
}

/* Form controls: Bootstrap 3 placeholder and disabled/read-only colors (Bootstrap 5: darker placeholder, bluish grey) */
.form-control::placeholder {
    color: #999;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
    background-color: #eee;
}

/* Cards (Bootstrap 3 .panel .panel-default with bootstrap-theme.css): border, spacing, header gradient */
.card {
    --bs-card-border-color: #ddd;
    --bs-card-cap-padding-y: 10px;
    --bs-card-cap-padding-x: 15px;
    --bs-card-spacer-y: 15px;
    --bs-card-spacer-x: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

.card-header {
    color: #333;
    background-color: #f5f5f5;
    background-image: linear-gradient(to bottom, #f5f5f5 0, #e8e8e8 100%);
}

/* Large modal: Bootstrap 3 width (Bootstrap 5: 800px) */
@media (min-width: 992px) {
    .modal-lg {
        --bs-modal-width: 900px;
    }
}

/* Input group add-on (Bootstrap 3 .input-group-addon) */
.input-group-text {
    font-size: 14px;
    line-height: 1;
    color: #555;
    background-color: #eee;
    border-color: #ccc;
}

/*
 * Date picker (Tempus Dominus, see /static/js/date-picker.js): colors and shape of the former
 * bootstrap-datetimepicker. Set on the widget, so they win over the variables Tempus Dominus sets on :root.
 */
.tempus-dominus-widget {
    --td-active-bg: #337ab7;
    --td-font-color: #333;
    --td-border-radius: 4px;
    --td-widget-z-index: 2000; /* above Bootstrap modals (1055) */
    font-family: 'Nunito Sans', sans-serif;
    font-size: 14px;
}

[data-td-toggle="datetimepicker"] {
    cursor: pointer;
}

/* Small buttons: Bootstrap 3 size (the 14px .btn rule above would otherwise also apply to .btn-sm) */
.btn-sm {
    --bs-btn-font-size: 12px;
    --bs-btn-line-height: 1.5;
    --bs-btn-border-radius: 3px;
}

/* Responsive tables: below 768px Bootstrap 3 kept cells on one line and let the table scroll sideways
   (the .scroll-fade gradients above rely on this); Bootstrap 5 wraps the cells instead */
@media (max-width: 767px) {
    .table-responsive {
        margin-bottom: 15px;
        overflow-y: hidden;
        border: 1px solid #ddd;
    }

    .table-responsive > .table {
        margin-bottom: 0;
    }

    .table-responsive > .table > * > tr > th,
    .table-responsive > .table > * > tr > td {
        white-space: nowrap;
    }

    .table-responsive > .table-bordered {
        border-style: hidden;
    }
}
