/* ============================================================
   rs-core.css — Runestone's replacement for Bootstrap.

   Implements ONLY the Bootstrap classes actually used by the
   templates in components/rsptx/templates (plus the handful of
   classes that published book bundles expect on assignment
   pages: modal, nav-tabs/tab-pane).  Values match Bootstrap 4
   defaults so removing the CDN does not change the look.

   Loaded by _base.html, admin/auth/_auth_base.html, and the
   LTI 1.3 pages.  Page/site stylesheets (main.css, admin.css,
   …) load after this file and may override it.
   ============================================================ */

:root {
    --rs-color-white: #fff;
    --rs-color-black: #000;
    --rs-color-primary: #0056b3;
    --rs-color-primary-hover: #003d80;
    --rs-color-secondary: #6c757d;
    --rs-color-success: #218838;
    --rs-color-success-hover: #1e7e34;
    --rs-color-success-background: #f2f6f3;
    --rs-color-success-border: #c3e6cb;
    --rs-color-success-text: #155724;
    --rs-color-danger: #dc3545;
    --rs-color-danger-hover: #c82333;
    --rs-color-danger-background: #fef3f4;
    --rs-color-danger-border: #f5c6cb;
    --rs-color-danger-text: #721c24;
    --rs-color-warning: #ffc107;
    --rs-color-warning-background: #fff3cd;
    --rs-color-warning-text: #856404;
    --rs-color-text: #212529;
    --rs-color-text-strong: #333;
    --rs-color-text-muted: #666;
    --rs-color-text-subtle: #555;
    --rs-color-text-faint: #767676;
    --rs-color-surface-subtle: #f8f9fa;
    --rs-color-surface-muted: #f5f5f5;
    --rs-color-surface-cool: #f4f8fa;
    --rs-color-surface-disabled: #e9ecef;
    --rs-color-border: #ddd;
    --rs-color-border-strong: #ccc;
    --rs-color-border-subtle: #e0e0e0;
    --rs-color-border-bootstrap: #dee2e6;
    --rs-color-text-dark: #222;
    --rs-color-text-light: #767676;
    --rs-color-form-text: #495057;
    --rs-color-primary-background: #f0f7ff;
    --rs-color-primary-border: #c8dff5;
    --rs-color-border-cool: #c7cdd1;
    --rs-color-info: #003d80;
    --rs-color-info-bright: #0056b3;
    --rs-color-success-bright: #3dc682;
    --rs-color-accent-orange: #ff9f19;
    --rs-color-accent-orange-dark: #c50;
    --rs-color-note-yellow: #ffeaa7;
    --rs-color-note-peach: #ffe9d2;
    --rs-color-accent-orange-light: #ffb871;
    --rs-color-accent-orange-bright: #b03e00;
    --rs-color-accent-orange-deep: #b03e00;
    --rs-color-accent-magenta: #ab1059;
    --rs-color-surface-raised: #fbfbfb;
    --rs-color-note-background: #fbeed5;
    --rs-color-danger-muted: #f2dede;
    --rs-color-danger-dark: #bd2130;
    --rs-color-info-background: #d9edf7;
    --rs-color-info-alert-background: #d1ecf1;
    --rs-color-info-alert-border: #bee5eb;
    --rs-color-info-alert-text: #0c5460;
    --rs-color-warning-border: #ffeeba;
    --rs-color-info-dark: #1a6a83;
    --rs-color-info-bootstrap: #117a8b;
    --rs-color-success-pale: #c1ffc9;
    --rs-color-success-neon: #00dd1c;
    --rs-color-button-dark: #474949;
    --rs-color-button-dark-muted: #454551;
    --rs-color-primary-deep: #2a5f8f;
    --rs-color-black-soft: #0a0a0a;
    --rs-color-blue-bright: #007fff;

    /* A control's own border is often the only thing identifying it, which
       WCAG 1.4.11 puts at 3:1 -- --rs-color-border (#ddd) is 1.36:1 and is
       fine for decorative rules but not for an input outline. */
    --rs-color-border-input: #8291a1; /* 3.22 on #fff */
    /* Focus ring, drawn with outline-offset so it always sits on the page
       background and keeps this ratio whatever it wraps. */
    --rs-color-focus-ring: #0a4a8f;   /* 8.79 on #fff, 8.34 on #f8f9fa */
}

/* ---------- Reboot (minimal subset of Bootstrap's) ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-family: sans-serif;
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--rs-color-text);
    text-align: left;
    background-color: var(--rs-color-white);
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

ol, ul, dl {
    margin-top: 0;
    margin-bottom: 1rem;
}

ol ol, ul ul, ol ul, ul ol {
    margin-bottom: 0;
}

dt {
    font-weight: 700;
}

dd {
    margin-bottom: 0.5rem;
    margin-left: 0;
}

hr {
    box-sizing: content-box;
    height: 0;
    overflow: visible;
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

a {
    color: var(--rs-color-primary);
    text-decoration: none;
    background-color: transparent;
}

a:hover {
    color: var(--rs-color-primary-hover);
    text-decoration: underline;
}

pre {
    margin-top: 0;
    margin-bottom: 1rem;
    overflow: auto;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
        "Courier New", monospace;
    font-size: 87.5%;
}

img {
    vertical-align: middle;
    border-style: none;
    max-width: 100%;
}

table {
    border-collapse: collapse;
}

th {
    text-align: inherit;
}

label {
    display: inline-block;
    margin-bottom: 0.5rem;
}

button {
    border-radius: 0;
}

input, button, select, optgroup, textarea {
    margin: 0;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button, select {
    text-transform: none;
}

button, [type="button"], [type="reset"], [type="submit"] {
    -webkit-appearance: button;
}

[hidden] {
    display: none !important;
}

/* ---------- Focus visibility (WCAG 2.4.7 / 1.4.11) ----------
   One ring for every focusable element.  outline-offset pushes it into the
   page background, so it keeps its 8.79:1 contrast whether it wraps a white
   input or a saturated blue button.  :focus-visible means pointer users do
   not see it on click, so there is no reason for a downstream rule to turn
   it off again -- do not reintroduce `outline: none` anywhere.  The ring
   supplements the control's own border, it never replaces it. */
:focus-visible {
    outline: 3px solid var(--rs-color-focus-ring);
    outline-offset: 2px;
}

@supports not selector(:focus-visible) {
    :focus {
        outline: 3px solid var(--rs-color-focus-ring);
        outline-offset: 2px;
    }
}

/* ---------- Layout: containers and grid ---------- */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px)  { .container { max-width: 540px; } }
@media (min-width: 768px)  { .container { max-width: 720px; } }
@media (min-width: 992px)  { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col,
[class*="col-md-"] {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

.col {
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
}

/* Below the md breakpoint every column is full width */
@media (min-width: 768px) {
    .col-md-4  { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-5  { flex: 0 0 41.666667%; max-width: 41.666667%; }
    .col-md-6  { flex: 0 0 50%;        max-width: 50%; }
    .col-md-7  { flex: 0 0 58.333333%; max-width: 58.333333%; }
    .col-md-8  { flex: 0 0 66.666667%; max-width: 66.666667%; }
    .col-md-12 { flex: 0 0 100%;       max-width: 100%; }
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -5px;
    margin-left: -5px;
}

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

/* ---------- Display / flex utilities ---------- */
.d-none  { display: none !important; }
.d-flex  { display: flex !important; }
.flex-column { flex-direction: column !important; }
.align-items-center { align-items: center !important; }

/* ---------- Spacing utilities (only the ones in use) ---------- */
.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 1rem !important; }
.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.me-2, .mr-2 { margin-right: 0.5rem !important; }
.mr-lg-2 { margin-right: 0.5rem !important; }

/* ---------- Text utilities ---------- */
.text-muted { color: var(--rs-color-secondary) !important; }
.text-center { text-align: center !important; }
.text-black { color: var(--rs-color-black) !important; }
.small, small { font-size: 80%; font-weight: 400; }

.sr-only,
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

.bg-light {
    background-color: var(--rs-color-surface-subtle) !important;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    font-weight: 400;
    color: var(--rs-color-text);
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,
        border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:hover {
    text-decoration: none;
}

/* Was `outline: 0` plus a rgba(0,123,255,.25) shadow measuring 1.39:1 --
   invisible.  The shadow is now only a halo behind the real ring above. */
.btn:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.35);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-primary { color: var(--rs-color-white); background-color: var(--rs-color-primary); border-color: var(--rs-color-primary); }
.btn-primary:hover:not(:disabled) { color: var(--rs-color-white); background-color: #0069d9; border-color: #0062cc; }

.btn-secondary { color: var(--rs-color-white); background-color: var(--rs-color-secondary); border-color: var(--rs-color-secondary); }
.btn-secondary:hover:not(:disabled) { color: var(--rs-color-white); background-color: #5a6268; border-color: #545b62; }

.btn-success { color: var(--rs-color-white); background-color: var(--rs-color-success); border-color: var(--rs-color-success); }
.btn-success:hover:not(:disabled) { color: var(--rs-color-white); background-color: var(--rs-color-success-hover); border-color: #1e7e34; }

.btn-danger { color: var(--rs-color-white); background-color: var(--rs-color-danger); border-color: var(--rs-color-danger); }
.btn-danger:hover:not(:disabled) { color: var(--rs-color-white); background-color: var(--rs-color-danger-hover); border-color: var(--rs-color-danger-dark); }

.btn-warning { color: var(--rs-color-text); background-color: var(--rs-color-warning); border-color: var(--rs-color-warning); }
.btn-warning:hover:not(:disabled) { color: var(--rs-color-text); background-color: #e0a800; border-color: #d39e00; }

.btn-info { color: var(--rs-color-white); background-color: var(--rs-color-info-bootstrap); border-color: var(--rs-color-info-bootstrap); }
.btn-info:hover:not(:disabled) { color: var(--rs-color-white); background-color: #138496; border-color: #117a8b; }

.btn-outline-secondary { color: var(--rs-color-secondary); background-color: transparent; border-color: var(--rs-color-secondary); }
.btn-outline-secondary:hover:not(:disabled) { color: var(--rs-color-white); background-color: var(--rs-color-secondary); border-color: var(--rs-color-secondary); }

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    line-height: 1.5;
    border-radius: 0.3rem;
}

/* ---------- Forms ---------- */
.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--rs-color-form-text);
    background-color: var(--rs-color-white);
    background-clip: padding-box;
    border: 1px solid var(--rs-color-border-input);
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: var(--rs-color-form-text);
    background-color: var(--rs-color-white);
    /* Border darkens too, so the state is legible to anyone who cannot make
       out the ring; the ring itself comes from :focus-visible above. */
    border-color: var(--rs-color-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.35);
}

.form-control:disabled {
    background-color: var(--rs-color-surface-disabled);
    opacity: 1;
}

/* selects with size/multiple, textareas and file inputs are not
   fixed-height */
select.form-control[size],
select.form-control[multiple],
textarea.form-control,
.form-control[type="file"] {
    height: auto;
}

.form-control-sm {
    height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    margin-bottom: 0.5rem;
}

.form-text {
    display: block;
    margin-top: 0.25rem;
}

.form-check {
    position: relative;
    display: block;
    display: flex;
    gap: 20px;
}

.form-check-label {
    margin-bottom: 0;
}

/* ---------- Tables ---------- */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--rs-color-text);
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--rs-color-border-bootstrap);
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--rs-color-border-bootstrap);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-bordered,
.table-bordered th,
.table-bordered td {
    border: 1px solid var(--rs-color-border-bootstrap);
}

/* ---------- Alerts ---------- */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-success { color: var(--rs-color-success-text); background-color: var(--rs-color-success-background); border-color: var(--rs-color-success-border); }
.alert-danger  { color: var(--rs-color-danger-text); background-color: var(--rs-color-danger-background); border-color: var(--rs-color-danger-border); }
.alert-warning { color: var(--rs-color-warning-text); background-color: var(--rs-color-warning-background); border-color: var(--rs-color-warning-border); }
.alert-info    { color: var(--rs-color-info-alert-text); background-color: var(--rs-color-info-alert-background); border-color: var(--rs-color-info-alert-border); }

.alert-dismissible {
    padding-right: 4rem;
}

.alert-dismissible .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: 0.75rem 1.25rem;
}

.close {
    float: right;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: var(--rs-color-black);
    text-shadow: 0 1px 0 var(--rs-color-white);
    opacity: 0.5;
    background-color: transparent;
    border: 0;
    cursor: pointer;
}

.close:hover {
    opacity: 0.75;
}

.fade {
    transition: opacity 0.15s linear;
}

.fade:not(.show) {
    opacity: 0;
}

/* ---------- Cards ---------- */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--rs-color-white);
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem;
}

.card-body {
    flex: 1 1 auto;
    min-height: 1px;
    padding: 1.25rem;
}

.card-title {
    margin-bottom: 0.75rem;
}

.card-text:last-child {
    margin-bottom: 0;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.25rem 0.25rem 0 0;
}

/* ---------- Nav / tabs ---------- */
.nav {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

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

.nav-link:hover {
    text-decoration: none;
}

/* Tabs — used by the tabbedStuff book component (BS3-style li.active
   markup) and driven by nav.js */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    border-bottom: 1px solid var(--rs-color-border-bootstrap);
}

.nav-tabs > li > a,
.nav-tabs .nav-link {
    display: block;
    padding: 0.5rem 1rem;
    margin-bottom: -1px;
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    cursor: pointer;
}

.nav-tabs > li > a:hover {
    border-color: var(--rs-color-surface-disabled) var(--rs-color-surface-disabled) var(--rs-color-border-bootstrap);
    text-decoration: none;
}

.nav-tabs > li.active > a,
.nav-tabs .nav-link.active {
    color: var(--rs-color-form-text);
    background-color: var(--rs-color-white);
    border-color: var(--rs-color-border-bootstrap) var(--rs-color-border-bootstrap) var(--rs-color-white);
}

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .active {
    display: block;
}

/* ---------- Navbar ---------- */
.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
}

.navbar-brand {
    display: inline-block;
    padding-top: 0.3125rem;
    padding-bottom: 0.3125rem;
    margin-right: 1rem;
    font-size: 1.25rem;
    line-height: inherit;
    white-space: nowrap;
}

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

.navbar-nav .nav-link {
    padding-right: 0;
    padding-left: 0;
}

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

.navbar-toggler {
    padding: 0.25rem 0.75rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    cursor: pointer;
}

.navbar-toggler-icon {
    display: inline-block;
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    content: "";
    background: no-repeat center center;
    background-size: 100% 100%;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-light .navbar-brand {
    color: rgba(0, 0, 0, 0.9);
}

.navbar-light .navbar-nav .nav-link,
.navbar-light .nav-link {
    /* color: rgba(0, 0, 0, 0.5); */
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .nav-link:hover {
    /* color: rgba(0, 0, 0, 0.7);
    text-decoration: none; */
}

/* collapse behavior (also used by profile.html's delete form) */
.collapse:not(.show) {
    display: none;
}

/* expand at the sm breakpoint, matching navbar-expand-sm */
@media (max-width: 575.98px) {
    .navbar-expand-sm .navbar-nav .dropdown-menu {
        position: static;
        float: none;
    }
}

@media (min-width: 576px) {
    .navbar-expand-sm {
        flex-flow: row nowrap;
        justify-content: flex-start;
    }

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

    .navbar-expand-sm .navbar-nav .nav-link,
    .navbar-expand-sm .nav-link {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

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

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

/* ---------- Dropdowns (driven by nav.js) ---------- */
.dropdown {
    position: relative;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 10rem;
    padding: 0.5rem 0;
    margin: 0.125rem 0 0;
    font-size: 1rem;
    color: var(--rs-color-text);
    text-align: left;
    list-style: none;
    background-color: var(--rs-color-white);
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
}

.dropdown-menu.show {
    display: block;
}

/* Book bundles ship a Bootstrap 3 dropdown plugin that hijacks the navbar
   toggles (bootstrap-sphinx.js calls $('.dropdown-toggle').dropdown()) and
   marks the open state with .open/.show on the PARENT instead of the menu.
   Honor that convention too so dropdowns work on pages that load a book
   bundle (doAssignment, peer pages, ...). */
.open > .dropdown-menu,
.show > .dropdown-menu {
    display: block;
}

.dropdown-menu-right {
    right: 0;
    left: auto;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.25rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: var(--rs-color-text);
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #16181b;
    text-decoration: none;
    background-color: var(--rs-color-surface-subtle);
}

.dropdown-divider {
    height: 0;
    margin: 0.5rem 0;
    overflow: hidden;
    border-top: 1px solid var(--rs-color-surface-disabled);
}

/* ---------- Modal (for the activecode feedback shim in nav.js) ---------- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    display: none;
    width: 100%;
    height: 100%;
    overflow: hidden auto;
    outline: 0;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: auto;
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background-color: var(--rs-color-white);
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.3rem;
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--rs-color-border-bootstrap);
    border-radius: 0.3rem 0.3rem 0 0;
}

.modal-title {
    margin-bottom: 0;
    line-height: 1.5;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: var(--rs-color-black);
    opacity: 0.5;
}

body.modal-open {
    overflow: hidden;
}

/* ---------- Spinner ---------- */
@keyframes rs-spinner-border {
    to { transform: rotate(360deg); }
}

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: rs-spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}
