/* Admin area (templates/admin/layout.html.twig), on top of Bootstrap 5. */

/* The sidebar stays in view while the page scrolls (from md up; below it is an offcanvas menu).
   A study list longer than the screen scrolls inside the sidebar, not the page. */
@media (min-width: 768px) {
    .admin .sidebar .offcanvas-md {
        position: sticky;
        top: 56px;
        height: calc(100vh - 56px);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

/* One line per entry; long study IDs are shortened with "…" (the full ID is in the tooltip). */
.admin .sidebar .nav-link {
    color: var(--bs-body-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin .sidebar .nav-link.active {
    color: #fff;
}

.admin .sidebar .nav-link .bi {
    margin-right: .25rem;
}

/* Action buttons are inline forms (admin/_actions.html.twig). */
.admin td form {
    margin: 0;
}

/* The study setup is shown as preformatted text. */
.admin pre {
    white-space: pre-wrap;
}

/* Study setup editor (assets/setup_editor.js) */
.setup-editor-bar {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
}

.setup-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.setup-image-button {
    padding: .1rem;
    line-height: 1;
}
