﻿/* =========================================================================
   DAM theme — Bootstrap 5.3 overrides
   Based on the LIMS overrides, recoloured to the DAM brand colours.

   Primary   #005ca9  rgb(0, 92, 169)     blue. White text 6.8:1.
   Secondary #00244a  rgb(0, 36, 74)      dark navy. White text 15.5:1.
   Success   #43a27f  rgb(67, 162, 127)   green. White text 3.1:1: fine for
                                          bold/large text (buttons, badges,
                                          toasts), too low for small body text,
                                          so success *text* uses the darker
                                          emphasis shade.
   Info      #337dba  rgb(51, 125, 186)   primary tinted 20%, so info reads as
                                          the brand blue instead of Bootstrap's
                                          cyan. White text 4.6:1.
   Shades/tints follow Bootstrap's own formula (shade = mix with black,
   tint = mix with white) so hover/active/subtle variants stay consistent.
   ========================================================================= */

:root {
    --dam-primary: #005ca9;
    --dam-primary-rgb: 0, 92, 169;
    --dam-primary-hover: #004e90;   /* shade 15% */
    --dam-primary-active: #004a87;  /* shade 20% */

    /* The secondary is so dark that shading it is barely visible, so it lightens
       on hover instead (as Bootstrap does for .btn-dark). */
    --dam-secondary: #00244a;
    --dam-secondary-rgb: 0, 36, 74;
    --dam-secondary-hover: #264565;  /* tint 15% */
    --dam-secondary-active: #33506e; /* tint 20% */

    --dam-success: #43a27f;
    --dam-success-rgb: 67, 162, 127;
    --dam-success-hover: #398a6c;   /* shade 15% */
    --dam-success-active: #368266;  /* shade 20% */

    --dam-body-bg: #f4f6f9;

    /* Text in the brand colours (links, active nav items, counts): lighter tints in the dark theme. */
    --dam-primary-text: var(--dam-primary);
    --dam-secondary-text: var(--dam-secondary);

    /* Cards, fields, dialogs and menus: white on the grey page (dark in the dark theme). */
    --dam-surface: #fff;
    --dam-surface-muted: #f4f5f7;
    --dam-checker: #e9ecef;

    /* Status chips: archived/expiring (orange), hidden/external (purple), automations (violet). */
    --dam-orange-bg: #fdf0e6;
    --dam-orange-text: #b54a12;
    --dam-purple-bg: #efe6f6;
    --dam-purple-text: #6f3d99;
    --dam-violet-bg: #ebe7fb;
    --dam-violet-text: #5b3fd1;

    /* Analytics charts: one series per chart, so one hue each (the heading names it). */
    --chart-1: var(--dam-primary);
    --chart-2: #2a8c8c;

    /* Open Sans, self-hosted via LibMan (lib/open-sans, variable weights 300–800). */
    --bs-font-sans-serif: 'Open Sans Variable', 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --bs-body-font-family: var(--bs-font-sans-serif);

    --bs-primary: var(--dam-primary);
    --bs-primary-rgb: var(--dam-primary-rgb);
    --bs-primary-text-emphasis: #002544; /* shade 60% */
    --bs-primary-bg-subtle: #ccdeee;     /* tint 80% */
    --bs-primary-border-subtle: #99bedd; /* tint 60% */

    --bs-secondary: var(--dam-secondary);
    --bs-secondary-rgb: var(--dam-secondary-rgb);
    --bs-secondary-text-emphasis: #000e1e; /* shade 60% */
    --bs-secondary-bg-subtle: #ccd3db;     /* tint 80% */
    --bs-secondary-border-subtle: #99a7b7; /* tint 60% */

    --bs-success: var(--dam-success);
    --bs-success-rgb: var(--dam-success-rgb);
    --bs-success-text-emphasis: #1b4133; /* shade 60% */
    --bs-success-bg-subtle: #d9ece5;     /* tint 80% */
    --bs-success-border-subtle: #b4dacc; /* tint 60% */

    --bs-info: #337dba;
    --bs-info-rgb: 51, 125, 186;
    --bs-info-text-emphasis: #003765; /* primary shade 40% */
    --bs-info-bg-subtle: #e6eff6;     /* primary tint 90% */
    --bs-info-border-subtle: #b3cee5; /* primary tint 70% */

    --bs-form-valid-color: var(--dam-success-hover);
    --bs-form-valid-border-color: var(--dam-success);

    /* The primary is dark enough to use for links directly (6.8:1 on white, 6.3:1 on the page background). */
    --bs-link-color: var(--dam-primary);
    --bs-link-color-rgb: var(--dam-primary-rgb);
    --bs-link-hover-color: #004076;      /* shade 30% */
    --bs-link-hover-color-rgb: 0, 64, 118;

    --bs-focus-ring-color: rgba(var(--dam-primary-rgb), 0.25);
    --bs-body-bg: var(--dam-body-bg);
}

/* ---- Dark theme ----------------------------------------------------------
   Bootstrap's own dark mode (data-bs-theme="dark", set by the script in App.razor) with the DAM's surfaces. The
   brand blue is too dark on a dark background for text and focus rings, so links and emphasis use a lighter tint;
   buttons keep the brand colour (white text on it reads in both themes). */
[data-bs-theme="dark"] {
    color-scheme: dark;

    --dam-body-bg: #12161c;
    --dam-primary-text: #6aaee8;
    --dam-secondary-text: #c3cfdc;
    --dam-surface: #1b2129;
    --dam-surface-muted: #232a33;
    --dam-checker: #2b323c;

    --dam-orange-bg: #3d2617;
    --dam-orange-text: #f0a274;
    --dam-purple-bg: #2f2340;
    --dam-purple-text: #c9a6ec;
    --dam-violet-bg: #2a2547;
    --dam-violet-text: #b3a4f5;

    --bs-body-bg: var(--dam-body-bg);
    --bs-body-color: #dfe3e8;
    --bs-secondary-color: rgba(223, 227, 232, 0.65);
    --bs-tertiary-bg: #262d36;
    --bs-border-color: #353d48;

    --bs-primary-text-emphasis: #8fbde6;
    --bs-primary-bg-subtle: #0f2a42;
    --bs-primary-border-subtle: #1f4f7a;
    --bs-secondary-text-emphasis: #b8c4d1;
    --bs-secondary-bg-subtle: #1c2532;
    --bs-secondary-border-subtle: #3a4757;
    --bs-success-text-emphasis: #8ed2b8;
    --bs-success-bg-subtle: #14302a;
    --bs-success-border-subtle: #28634f;
    --bs-info-text-emphasis: #9cc4e8;
    --bs-info-bg-subtle: #132a3e;
    --bs-info-border-subtle: #255178;

    --bs-link-color: #6aaee8;
    --bs-link-color-rgb: 106, 174, 232;
    --bs-link-hover-color: #94c6f0;
    --bs-link-hover-color-rgb: 148, 198, 240;
    --bs-focus-ring-color: rgba(106, 174, 232, 0.35);
}

    /* The logo is brand blue: white on the dark top bar. */
    [data-bs-theme="dark"] .topbar-brand img {
        filter: brightness(0) invert(1);
    }

    /* Bootstrap keeps .btn-light light, and the navy outline disappears on dark: both follow the theme instead. */
    [data-bs-theme="dark"] .btn-light {
        --bs-btn-color: var(--bs-body-color);
        --bs-btn-bg: var(--bs-tertiary-bg);
        --bs-btn-border-color: var(--bs-border-color);
        --bs-btn-hover-color: var(--bs-body-color);
        --bs-btn-hover-bg: var(--bs-secondary-bg);
        --bs-btn-hover-border-color: var(--bs-border-color);
        --bs-btn-active-color: var(--bs-body-color);
        --bs-btn-active-bg: var(--bs-secondary-bg);
        --bs-btn-active-border-color: var(--bs-border-color);
        --bs-btn-disabled-color: var(--bs-secondary-color);
        --bs-btn-disabled-bg: var(--bs-tertiary-bg);
        --bs-btn-disabled-border-color: var(--bs-border-color);
    }

    [data-bs-theme="dark"] .btn-outline-secondary {
        --bs-btn-color: var(--bs-body-color);
        --bs-btn-border-color: var(--bs-border-color);
        --bs-btn-hover-color: var(--bs-body-color);
        --bs-btn-hover-bg: var(--bs-tertiary-bg);
        --bs-btn-hover-border-color: var(--bs-border-color);
        --bs-btn-active-color: var(--bs-body-color);
        --bs-btn-active-bg: var(--bs-secondary-bg);
        --bs-btn-disabled-color: var(--bs-secondary-color);
        --bs-btn-disabled-border-color: var(--bs-border-color);
    }

    /* The brand's dark navy is the "secondary" text colour of e.g. headings and the nav: lighter on dark. */
    [data-bs-theme="dark"] .text-secondary {
        color: var(--bs-secondary-color) !important;
    }

/* ---- Base --------------------------------------------------------------- */

body {
    background-color: var(--dam-body-bg);
}

/* Dialogs are white, not the page background (Bootstrap takes --bs-body-bg); above the asset viewer (1060). */
.modal {
    --bs-modal-bg: var(--dam-surface);
    --bs-modal-zindex: 1070;
}

.modal-backdrop {
    --bs-backdrop-zindex: 1065;
}

ul {
    margin: 0;
}

li {
    list-style: none;
}

a {
    color: var(--bs-link-color);
    text-decoration: none;
}

a:hover {
    color: var(--bs-link-hover-color);
}

a.color-white {
    color: white !important;
    text-decoration: underline;
}

/* Anchors that exist only to give real link behaviour (ctrl/middle click, open in new tab) to
   something that was never styled as a link. They keep the surrounding text colour. */
a.link-inherit,
a.link-inherit:hover {
    color: inherit !important;
}

h1:focus {
    outline: none;
}

/* ---- Buttons ------------------------------------------------------------ */

/* Regular buttons: slightly smaller text than Bootstrap's 1rem. .btn-sm / .btn-lg keep their own size. */
.btn:not(.btn-sm, .btn-lg) {
    --bs-btn-font-size: 0.9375rem;
}

.btn-primary {
    --bs-btn-bg: var(--dam-primary);
    --bs-btn-border-color: var(--dam-primary);
    --bs-btn-hover-bg: var(--dam-primary-hover);
    --bs-btn-hover-border-color: var(--dam-primary-hover);
    --bs-btn-focus-shadow-rgb: var(--dam-primary-rgb);
    --bs-btn-active-bg: var(--dam-primary-active);
    --bs-btn-active-border-color: var(--dam-primary-active);
    --bs-btn-disabled-bg: var(--dam-primary);
    --bs-btn-disabled-border-color: var(--dam-primary);
}

/* Light, neutral button with a thin grey border, for the less important action next to a primary one. */
.btn-secondary {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-bg: var(--bs-tertiary-bg);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-color: var(--bs-body-color);
    --bs-btn-hover-bg: var(--bs-secondary-bg);
    --bs-btn-hover-border-color: var(--bs-gray-400);
    --bs-btn-focus-shadow-rgb: 173, 181, 189;
    --bs-btn-active-color: var(--bs-body-color);
    --bs-btn-active-bg: var(--bs-border-color);
    --bs-btn-active-border-color: var(--bs-gray-400);
    --bs-btn-disabled-color: var(--bs-body-color);
    --bs-btn-disabled-bg: var(--bs-tertiary-bg);
    --bs-btn-disabled-border-color: var(--bs-border-color);
}

.btn-outline-primary {
    --bs-btn-color: var(--dam-primary-text);
    --bs-btn-border-color: var(--dam-primary);
    --bs-btn-hover-bg: var(--dam-primary);
    --bs-btn-hover-border-color: var(--dam-primary);
    --bs-btn-focus-shadow-rgb: var(--dam-primary-rgb);
    --bs-btn-active-bg: var(--dam-primary-active);
    --bs-btn-active-border-color: var(--dam-primary-active);
    --bs-btn-disabled-color: var(--dam-primary-text);
    --bs-btn-disabled-border-color: var(--dam-primary);
}

.btn-outline-secondary {
    --bs-btn-color: var(--dam-secondary);
    --bs-btn-border-color: var(--dam-secondary);
    --bs-btn-hover-bg: var(--dam-secondary);
    --bs-btn-hover-border-color: var(--dam-secondary);
    --bs-btn-focus-shadow-rgb: var(--dam-secondary-rgb);
    --bs-btn-active-bg: var(--dam-secondary-active);
    --bs-btn-active-border-color: var(--dam-secondary-active);
    --bs-btn-disabled-color: var(--dam-secondary);
    --bs-btn-disabled-border-color: var(--dam-secondary);
}

.btn-success {
    --bs-btn-bg: var(--dam-success);
    --bs-btn-border-color: var(--dam-success);
    --bs-btn-hover-bg: var(--dam-success-hover);
    --bs-btn-hover-border-color: var(--dam-success-hover);
    --bs-btn-focus-shadow-rgb: var(--dam-success-rgb);
    --bs-btn-active-bg: var(--dam-success-active);
    --bs-btn-active-border-color: var(--dam-success-active);
    --bs-btn-disabled-bg: var(--dam-success);
    --bs-btn-disabled-border-color: var(--dam-success);
}

.btn-outline-success {
    /* Outline text sits on white, so it uses the 15% shade (4.2:1) rather than the base green (3.1:1). */
    --bs-btn-color: var(--dam-success-hover);
    --bs-btn-border-color: var(--dam-success);
    --bs-btn-hover-bg: var(--dam-success);
    --bs-btn-hover-border-color: var(--dam-success);
    --bs-btn-focus-shadow-rgb: var(--dam-success-rgb);
    --bs-btn-active-bg: var(--dam-success-active);
    --bs-btn-active-border-color: var(--dam-success-active);
    --bs-btn-disabled-color: var(--dam-success);
    --bs-btn-disabled-border-color: var(--dam-success);
}

.text-success {
    /* Base green is 3.1:1 on white, too low for text; use the emphasis shade instead. */
    color: var(--bs-success-text-emphasis) !important;
}

.btn-link {
    --bs-btn-color: var(--bs-link-color);
    --bs-btn-hover-color: var(--bs-link-hover-color);
    --bs-btn-active-color: var(--bs-link-hover-color);
}

/* ---- Forms -------------------------------------------------------------- */

/* Same text size as regular buttons, so an input or select and a button next to it are the same height (36.5px).
   .form-control-sm / -lg keep their own size. */
.form-control:not(.form-control-sm, .form-control-lg),
.form-select:not(.form-select-sm, .form-select-lg) {
    font-size: 0.9375rem;
}

/* Bootstrap fills fields with the body background, which is grey here: make them white.
   Disabled fields keep Bootstrap's grey (:disabled is more specific). */
.form-control,
.form-select,
.form-check-input {
    background-color: var(--dam-surface);
}

.form-check-input:focus,
.form-select:focus,
.form-control:focus {
    border-color: var(--dam-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--dam-primary-rgb), 0.25);
}

.form-check-input:checked {
    border-color: var(--dam-primary);
    background-color: var(--dam-primary);
}

.form-range::-webkit-slider-thumb {
    background-color: var(--dam-primary);
}

.form-range::-moz-range-thumb {
    background-color: var(--dam-primary);
}

/* Kept as separate rules: a selector list with an unknown vendor pseudo-element is dropped entirely. */
.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 1px var(--dam-surface), 0 0 0 0.25rem rgba(var(--dam-primary-rgb), 0.25);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 1px var(--dam-surface), 0 0 0 0.25rem rgba(var(--dam-primary-rgb), 0.25);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--dam-success);
}

.invalid {
    outline: 1px solid #e50000;
}

input.invalid {
    border: solid 1px red;
    background-color: var(--dam-surface);
}

.validation-message {
    color: #e50000;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---- Components --------------------------------------------------------- */

.card-header {
    background-color: var(--dam-primary);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
}

.breadcrumb {
    margin-bottom: 0.6rem;
    font-size: 0.8rem;
}

.pagination {
    --bs-pagination-color: var(--bs-link-color);
    --bs-pagination-hover-color: var(--bs-link-hover-color);
    --bs-pagination-focus-color: var(--bs-link-hover-color);
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(var(--dam-primary-rgb), 0.25);
    --bs-pagination-active-bg: var(--dam-primary);
    --bs-pagination-active-border-color: var(--dam-primary);
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--dam-primary);
}

.nav {
    --bs-nav-link-color: var(--bs-link-color);
    --bs-nav-link-hover-color: var(--bs-link-hover-color);
}

.list-group {
    --bs-list-group-active-bg: var(--dam-primary);
    --bs-list-group-active-border-color: var(--dam-primary);
}

.progress,
.progress-stacked {
    --bs-progress-bar-bg: var(--dam-primary);
}

/* Menus are white like the dialogs; the chosen item is a light grey, not the brand blue. */
.dropdown-menu {
    --bs-dropdown-bg: var(--dam-surface);
    --bs-dropdown-link-color: var(--bs-body-color);
    --bs-dropdown-link-active-bg: var(--bs-tertiary-bg);
    --bs-dropdown-link-active-color: var(--bs-body-color);
}

/* ---- Asset placeholder thumbnails --------------------------------------- */

/* TODO: placeholders for the design; replace with the real renditions once assets are stored.
   A coloured gradient with a white "window" icon: a frame split into four panes. */
.asset-thumb {
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 0.25rem;
}

/* The real image over the placeholder; it removes itself when the file has none, so the placeholder shows. */
.asset-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
    background-color: var(--dam-surface-muted);
}

.asset-pane {
    position: relative;
    width: 45%;
    max-width: 4.5rem;
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background-color: rgba(255, 255, 255, 0.25);
}

    .asset-pane::before,
    .asset-pane::after {
        content: "";
        position: absolute;
        background-color: rgba(255, 255, 255, 0.9);
    }

    .asset-pane::before {
        top: 0;
        bottom: 0;
        left: 50%;
        width: 2px;
        transform: translateX(-50%);
    }

    .asset-pane::after {
        top: 50%;
        right: 0;
        left: 0;
        height: 2px;
        transform: translateY(-50%);
    }

/* Small (2rem) thumbnail for table rows, with thinner lines. */
.asset-thumb-sm {
    width: 2rem;
    height: 2rem;
}

    .asset-thumb-sm .asset-pane {
        width: 60%;
        border-width: 1px;
    }

        .asset-thumb-sm .asset-pane::before {
            width: 1px;
        }

        .asset-thumb-sm .asset-pane::after {
            height: 1px;
        }

/* Play button over a video thumbnail. */
.asset-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background-color: #111;
    color: #fff;
    font-size: 1rem;
    transform: translate(-50%, -50%);
}

.asset-thumb-blue {
    background: linear-gradient(135deg, #a5c8f5, #d7c4f7);
}

.asset-thumb-sage {
    background: linear-gradient(135deg, #d3e3cc, #7fa577);
}

.asset-thumb-red {
    background: linear-gradient(135deg, #f8c49c, #e8777a);
}

.asset-thumb-lavender {
    background: linear-gradient(135deg, #cbd3f3, #dfe2ea);
}

/* Audio: the lavender gradient with a soundwave in the window's place. */
.asset-thumb-audio {
    background: linear-gradient(135deg, #cbd3f3, #dfe2ea);
}

    .asset-thumb-audio .asset-pane {
        border: 0;
        background-color: rgba(255, 255, 255, 0.9);
        -webkit-mask: var(--asset-wave) center / contain no-repeat;
        mask: var(--asset-wave) center / contain no-repeat;
        --asset-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='.5' y='9' width='2' height='6' rx='1'/%3E%3Crect x='4' y='6' width='2' height='12' rx='1'/%3E%3Crect x='7.5' y='2' width='2' height='20' rx='1'/%3E%3Crect x='11' y='5' width='2' height='14' rx='1'/%3E%3Crect x='14.5' y='1' width='2' height='22' rx='1'/%3E%3Crect x='18' y='7' width='2' height='10' rx='1'/%3E%3Crect x='21.5' y='9' width='2' height='6' rx='1'/%3E%3C/svg%3E");
    }

        .asset-thumb-audio .asset-pane::before,
        .asset-thumb-audio .asset-pane::after {
            display: none;
        }

/* 3D models: a cube (three faces with a gap) instead of the window, as audio gets a soundwave. */
.asset-thumb-model3d {
    background: linear-gradient(135deg, #b9e2dc, #d7dde8);
}

    .asset-thumb-model3d .asset-pane {
        border: 0;
        background-color: rgba(255, 255, 255, 0.9);
        -webkit-mask: var(--asset-cube) center / contain no-repeat;
        mask: var(--asset-cube) center / contain no-repeat;
        --asset-cube: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5 21 6.6 12 11.7 3 6.6z'/%3E%3Cpath d='M2.5 8 11.2 12.9V22.6L2.5 17.7z'/%3E%3Cpath d='M21.5 8 12.8 12.9V22.6L21.5 17.7z'/%3E%3C/svg%3E");
    }

        .asset-thumb-model3d .asset-pane::before,
        .asset-thumb-model3d .asset-pane::after {
            display: none;
        }

/* Files of no known kind: a sheet with a folded corner instead of the window. */
.asset-thumb-file {
    background: linear-gradient(135deg, #e3e6ea, #c7d0da);
}

    .asset-thumb-file .asset-pane {
        border: 0;
        background-color: rgba(255, 255, 255, 0.9);
        -webkit-mask: var(--asset-file) center / contain no-repeat;
        mask: var(--asset-file) center / contain no-repeat;
        --asset-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 1h9.5L20 6.5V21.5a1.5 1.5 0 0 1-1.5 1.5h-13A1.5 1.5 0 0 1 4 21.5v-19A1.5 1.5 0 0 1 5.5 1zM14 2.5V7h4.5z' fill-rule='evenodd'/%3E%3C/svg%3E");
    }

        .asset-thumb-file .asset-pane::before,
        .asset-thumb-file .asset-pane::after {
            display: none;
        }

/* Files without a preview of their own (zip, Word, PowerPoint, SVG): a Bootstrap icon instead of the window, sized to
   the pane: bi-file-zip, bi-file-word, bi-file-ppt, bi-filetype-svg. */
.asset-thumb-zip {
    background: linear-gradient(135deg, #e6dcc6, #cfd4dc);
}

.asset-thumb-word {
    background: linear-gradient(135deg, #b8cdf0, #d3dae6);
}

.asset-thumb-powerpoint {
    background: linear-gradient(135deg, #f2c3b1, #dcd5d2);
}

/* Muted like the zip, Word and PowerPoint placeholders: a soft amber into the shared grey-blue. */
.asset-thumb-svg {
    background: linear-gradient(135deg, #f0d2a4, #d8d6d3);
}

    .asset-thumb-zip .asset-pane,
    .asset-thumb-word .asset-pane,
    .asset-thumb-powerpoint .asset-pane,
    .asset-thumb-svg .asset-pane {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background-color: transparent;
        container-type: inline-size;
    }

        .asset-thumb-zip .asset-pane::before,
        .asset-thumb-word .asset-pane::before,
        .asset-thumb-powerpoint .asset-pane::before,
        .asset-thumb-svg .asset-pane::before {
            position: static;
            width: auto;
            /* Wins over the pages that narrow the window's bar (e.g. .detail-pane::before { width: 0.3rem }): the
               glyph keeps its own width, so the flex pane centres it. */
            min-width: max-content;
            transform: none;
            background: none;
            color: rgba(255, 255, 255, 0.9);
            font-family: "bootstrap-icons";
            font-size: 100cqw;
            line-height: 1;
        }

        .asset-thumb-zip .asset-pane::before {
            content: "\f3bf";
        }

        .asset-thumb-word .asset-pane::before {
            content: "\f3bb";
        }

        .asset-thumb-powerpoint .asset-pane::before {
            content: "\f3af";
        }

        .asset-thumb-svg .asset-pane::before {
            content: "\f762";
        }

        .asset-thumb-zip .asset-pane::after,
        .asset-thumb-word .asset-pane::after,
        .asset-thumb-powerpoint .asset-pane::after,
        .asset-thumb-svg .asset-pane::after {
            display: none;
        }

.asset-thumb-sky {
    background: linear-gradient(135deg, #9fc3f5, #c9e3fb);
}

.asset-thumb-orange {
    background: linear-gradient(135deg, #f7cd6b, #f59a7a);
}

.asset-thumb-green {
    background: linear-gradient(135deg, #8ef0b9, #8fd8e8);
}

.asset-thumb-grey {
    background: linear-gradient(135deg, #e3e6ea, #c7d0da);
}

/* Dark theme: the same hues, deep and muted instead of pastel, with a softer white icon. */
[data-bs-theme="dark"] .asset-thumb-blue {
    background: linear-gradient(135deg, #253a57, #3a2f55);
}

[data-bs-theme="dark"] .asset-thumb-sage {
    background: linear-gradient(135deg, #2c3a2a, #3d5a39);
}

[data-bs-theme="dark"] .asset-thumb-red {
    background: linear-gradient(135deg, #5a3a2a, #5c2a2e);
}

[data-bs-theme="dark"] .asset-thumb-lavender,
[data-bs-theme="dark"] .asset-thumb-audio {
    background: linear-gradient(135deg, #2c3350, #343842);
}

[data-bs-theme="dark"] .asset-thumb-file {
    background: linear-gradient(135deg, #2a3039, #353d48);
}

[data-bs-theme="dark"] .asset-thumb-zip {
    background: linear-gradient(135deg, #3d3628, #343a46);
}

[data-bs-theme="dark"] .asset-thumb-word {
    background: linear-gradient(135deg, #22385c, #343a46);
}

[data-bs-theme="dark"] .asset-thumb-powerpoint {
    background: linear-gradient(135deg, #4e2c22, #343a46);
}

[data-bs-theme="dark"] .asset-thumb-model3d {
    background: linear-gradient(135deg, #1f4642, #343a46);
}

[data-bs-theme="dark"] .asset-thumb-sky {
    background: linear-gradient(135deg, #1f3b5c, #2a4559);
}

[data-bs-theme="dark"] .asset-thumb-svg {
    background: linear-gradient(135deg, #4a3a22, #343a46);
}

[data-bs-theme="dark"] .asset-thumb-orange {
    background: linear-gradient(135deg, #5a4520, #5a3326);
}

[data-bs-theme="dark"] .asset-thumb-green {
    background: linear-gradient(135deg, #1d4a3a, #1f4550);
}

[data-bs-theme="dark"] .asset-thumb-grey {
    background: linear-gradient(135deg, #2a3039, #353d48);
}

[data-bs-theme="dark"] .asset-pane {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.08);
}

    [data-bs-theme="dark"] .asset-pane::before,
    [data-bs-theme="dark"] .asset-pane::after,
    [data-bs-theme="dark"] .asset-thumb-audio .asset-pane,
    [data-bs-theme="dark"] .asset-thumb-model3d .asset-pane,
    [data-bs-theme="dark"] .asset-thumb-file .asset-pane {
        background-color: rgba(255, 255, 255, 0.5);
    }

/* The icon placeholders (zip, Word, PowerPoint, SVG): just the glyph, as dimmed as the other dark placeholders; the
   rules above would fill the pane and the glyph's box. */
[data-bs-theme="dark"] .asset-thumb-zip .asset-pane,
[data-bs-theme="dark"] .asset-thumb-word .asset-pane,
[data-bs-theme="dark"] .asset-thumb-powerpoint .asset-pane,
[data-bs-theme="dark"] .asset-thumb-svg .asset-pane {
    background-color: transparent;
}

    [data-bs-theme="dark"] .asset-thumb-zip .asset-pane::before,
    [data-bs-theme="dark"] .asset-thumb-word .asset-pane::before,
    [data-bs-theme="dark"] .asset-thumb-powerpoint .asset-pane::before,
    [data-bs-theme="dark"] .asset-thumb-svg .asset-pane::before {
        background: none;
        color: rgba(255, 255, 255, 0.6);
    }

/* ---- Asset results: cards, selection bar, loading cards (Assets and collections) ---- */

/* ---- Selection bar ------------------------------------------------------ */

/* Floats at the bottom centre of the screen while assets are selected. */
.lib-selection-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    z-index: 1030;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.375rem;
    max-width: calc(100vw - 2rem);
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.625rem;
    background-color: var(--dam-surface);
    box-shadow: 0 0.5rem 1.75rem rgba(0, 0, 0, 0.18);
    transform: translateX(-50%);
    animation: lib-selection-in 0.15s ease-out;
}

@keyframes lib-selection-in {
    from {
        opacity: 0;
        transform: translate(-50%, 0.5rem);
    }
}

/* Room below the last results, so the floating bar never covers them. */
.lib-results.has-selection {
    padding-bottom: 5rem;
}

.lib-selection-clear {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-left: 0.25rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

    .lib-selection-clear:hover {
        background-color: var(--bs-tertiary-bg);
        color: var(--bs-body-color);
    }

.lib-selection-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 0.25rem;
    padding-inline: 0.25rem;
    color: var(--dam-primary-text);
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
}

    .lib-selection-count .form-check-input {
        margin: 0;
    }

/* ---- Grid --------------------------------------------------------------- */

/* The results use the full width (the filters are in the bar above), so as many columns as fit. */
.lib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12.75rem, 1fr));
    gap: 0.75rem;
}

.lib-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    background-color: var(--dam-surface);
}

    .lib-card.selected {
        border-color: var(--dam-primary);
        box-shadow: 0 0 0 1px var(--dam-primary);
    }

    /* Edge to edge at the top, as Bynder's cards. */
    .lib-card .asset-thumb {
        position: relative;
        aspect-ratio: 4 / 3;
        overflow: hidden;
        border-radius: calc(0.5rem - 1px) calc(0.5rem - 1px) 0 0;
    }

    /* A checkerboard behind the picture, so transparent images show as such. */
    .lib-card .asset-img {
        background-color: var(--dam-surface);
        background-image:
            linear-gradient(45deg, var(--dam-checker) 25%, transparent 25%),
            linear-gradient(-45deg, var(--dam-checker) 25%, transparent 25%),
            linear-gradient(45deg, transparent 75%, var(--dam-checker) 75%),
            linear-gradient(-45deg, transparent 75%, var(--dam-checker) 75%);
        background-size: 16px 16px;
        background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    }

/* The file type in the picture's corner. */
.lib-card-type {
    position: absolute;
    z-index: 2;
    right: 0.5rem;
    bottom: 0.5rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    background-color: rgba(52, 58, 64, 0.85);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    pointer-events: none;
}

/* Download and more, over the picture while hovering. */
/* Top left: the selection checkbox has the top right corner. */
.lib-card-overlay {
    position: absolute;
    z-index: 2;
    top: 0.375rem;
    left: 0.375rem;
    opacity: 0;
    transition: opacity 0.15s;
}

    .lib-card:hover .lib-card-overlay,
    .lib-card-overlay:focus-within,
    .lib-card-overlay:has(.dropdown-menu.show) {
        opacity: 1;
    }

    .lib-card-overlay .lib-card-actions {
        gap: 0.25rem;
    }

        /* Slightly see-through surface (white, or dark in the dark theme) so they stand out on any picture. */
        .lib-card-overlay .lib-card-actions > a,
        .lib-card-overlay .lib-card-actions > .dropdown > button {
            background-color: color-mix(in srgb, var(--dam-surface) 92%, transparent);
            color: var(--bs-body-color);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
        }

            .lib-card-overlay .lib-card-actions > a:hover,
            .lib-card-overlay .lib-card-actions > .dropdown > button:hover {
                background-color: var(--dam-surface);
            }

/* Covers the thumbnail so the whole picture opens the detail; the checkbox sits above it. */
.lib-card-thumb-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

/* Round, as on the collection cards; shows on hover, and on every card once anything is selected. */
.lib-card-check {
    position: absolute;
    z-index: 2;
    top: 0.5rem;
    right: 0.5rem;
    width: 1.375rem;
    height: 1.375rem;
    margin: 0;
    border-color: var(--bs-gray-400);
    border-radius: 50% !important;
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
}

    .lib-card:hover .lib-card-check,
    .lib-results.has-selection .lib-card-check,
    .lib-card-check:checked,
    .lib-card-check:focus-visible {
        opacity: 1;
    }

.lib-card-name:hover,
.lib-list-asset:hover {
    text-decoration: underline;
}

.lib-card-name {
    display: block;
    overflow: hidden;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lib-card-actions {
    display: inline-flex;
    margin-left: auto;
}

    .lib-card-actions > a,
    .lib-card-actions > .dropdown > button {
        padding: 0.125rem 0.375rem;
        border: 0;
        border-radius: 0.25rem;
        background: none;
        color: var(--bs-secondary-color);
        font-size: 0.75rem;
    }

        .lib-card-actions > a:hover,
        .lib-card-actions > .dropdown > button:hover {
            background-color: var(--bs-tertiary-bg);
            color: var(--bs-body-color);
        }

.lib-card-menu {
    font-size: 0.8125rem;
}

    .lib-card-menu .dropdown-item {
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

/* ---- Loading cards ----------------------------------------------------- */

.lib-skeleton {
    display: block;
    border-radius: 0.25rem;
    background: linear-gradient(90deg, var(--bs-tertiary-bg) 25%, var(--bs-secondary-bg) 50%, var(--bs-tertiary-bg) 75%);
    background-size: 200% 100%;
    animation: lib-shimmer 1.2s ease-in-out infinite;
}

@keyframes lib-shimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -200% 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lib-skeleton {
        animation: none;
    }
}

/* As the cards: the picture edge to edge, then the title and a value under a line. */
.lib-skeleton-card {
    gap: 0.625rem;
    padding-bottom: 0.875rem;
}

.lib-skeleton-thumb {
    aspect-ratio: 4 / 3;
    border-radius: calc(0.5rem - 1px) calc(0.5rem - 1px) 0 0;
}

.lib-skeleton-line {
    width: 75%;
    height: 0.75rem;
    margin-inline: 0.75rem;
}

.lib-skeleton-short {
    width: 40%;
    height: 0.625rem;
    margin-inline: 0.75rem;
}

/* Infinite scrolling: the marker after the results takes no room. */
.infinite-scroll-marker {
    height: 1px;
}

.lib-skeleton-row .lib-skeleton-short,
.lib-skeleton-row .lib-skeleton-line {
    margin-inline: 0;
}

.lib-skeleton-row td:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lib-skeleton-thumb-sm {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
}

.lib-skeleton-check {
    width: 1rem;
    height: 1rem;
}

/* ---- Card values, flags, tiles filter ------------------------------------ */

/* Under a line: per metaproperty a muted label with its values below it, at most two lines each. */
.lib-card-values {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
    padding: 0.625rem 0.75rem 0.75rem;
    border-top: 1px solid var(--bs-border-color);
}

    .lib-card-value dt {
        color: var(--bs-secondary-color);
        font-size: 0.75rem;
        font-weight: 400;
    }

    .lib-card-value dd {
        display: -webkit-box;
        overflow: hidden;
        margin: 0.0625rem 0 0;
        color: var(--bs-body-color);
        font-size: 0.8125rem;
        line-height: 1.35;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

/* Below each other, so "Not published" and "Expires in …" both fit next to the type badge. */
.lib-card-flags {
    position: absolute;
    z-index: 2;
    left: 0.5rem;
    bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    pointer-events: none;
}

/* The icon flags stay next to each other. */
.lib-card-flag-row {
    display: flex;
    gap: 0.25rem;
}

/* "Not published", "Expires in 5 days": editors only. */
.lib-card-status {
    display: inline-flex;
    align-items: center;
    height: 1.375rem;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    background-color: rgba(52, 58, 64, 0.85);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.lib-card-status-warning {
    background-color: rgba(181, 74, 18, 0.9);
}

.lib-card-flag {
    display: grid;
    place-items: center;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 0.375rem;
    background-color: rgba(52, 58, 64, 0.85);
    color: #fff;
    font-size: 0.75rem;
}

/* ---- Utilities (from LIMS) ---------------------------------------------- */

.fs-7 {
    font-size: 0.875rem;
}

.fs-8 {
    font-size: 0.75rem;
}

.fs-9 {
    font-size: 0.6rem;
}

.label-bold {
    font-size: 1rem;
    font-weight: bold;
}

.hover-darker:hover {
    filter: saturate(0.5);
}

.hover-underline:hover {
    text-decoration: underline;
}

.hover-primary:hover {
    color: var(--dam-primary-text);
}

.color-yellow {
    color: #FFBE0A;
}

    .color-yellow.hover:hover {
        color: #F5B400;
    }

.color-red {
    color: red;
}

    .color-red.hover-active:hover {
        color: darkred;
    }

.color-white {
    color: white;
}

.color-blue {
    color: #007CBE;
}

.color-green {
    color: #00AF54;
}

.color-grey {
    color: #acacac;
}

.grey-row > td {
    background-color: rgba(0, 0, 0, 0.07);
}

.cursor-default {
    cursor: default;
}

.cursor-pointer {
    cursor: pointer;
    user-select: none;
}

*:disabled {
    user-select: none;
}

.text-align-left {
    text-align: left;
}

.text-align-right {
    text-align: right;
}

.max-height-18 {
    max-height: 18px;
}

@media print {
    .print-w-100 {
        width: 100%;
        max-width: 100%;
    }
}

/* ---- Blazor ------------------------------------------------------------- */

.content {
    padding-top: 1.1rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* ---- Info ----------------------------------------------------------------- */

/* Bootstrap gives .text-bg-info black text because its cyan is light; the brand-blue info needs white. */
.text-bg-info {
    color: #fff !important;
}

/* ==== Collections and groups pages ==========================================
   Shared by Collections, Groups and their grid (CollectionGrid), so global rather than scoped. */

/* ---- Header ------------------------------------------------------------- */

.coll-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.coll-subtitle {
    margin: 0;
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
}

.coll-header-actions {
    display: flex;
    gap: 0.5rem;
}

/* White outlined button, as on the library and archive pages. */
.coll-btn {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-bg: var(--dam-surface);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-color: var(--bs-body-color);
    --bs-btn-hover-bg: var(--bs-tertiary-bg);
    --bs-btn-hover-border-color: var(--bs-gray-400);
    --bs-btn-active-color: var(--bs-body-color);
    --bs-btn-active-bg: var(--bs-secondary-bg);
    --bs-btn-active-border-color: var(--bs-gray-400);
}

.coll-btn,
.coll-btn-primary {
    --bs-btn-font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
}

/* ---- Search, owner and sort ------------------------------------------------ */

.coll-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.coll-select {
    width: auto;
    font-size: 0.8125rem;
}

/* Sort sits on the right, as in Bynder. */
.coll-sort {
    display: flex;
    gap: 0.375rem;
    margin-left: auto;
}

.coll-direction {
    padding-inline: 0.5rem;
}

.coll-filter {
    position: relative;
    flex: 0 1 18rem;
}

    .coll-filter .bi {
        position: absolute;
        top: 50%;
        left: 0.625rem;
        transform: translateY(-50%);
        color: var(--bs-secondary-color);
        font-size: 0.75rem;
        pointer-events: none;
    }

    .coll-filter .form-control {
        padding-left: 1.875rem;
        font-size: 0.8125rem;
    }

/* ---- Grid --------------------------------------------------------------- */

.coll-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 1199.98px) {
    .coll-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .coll-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* The cards themselves are in CollectionCard.razor.css. */

.coll-empty {
    grid-column: 1 / -1;
    margin: 2rem 0;
    color: var(--bs-secondary-color);
    font-size: 0.8125rem;
    text-align: center;
}

.coll-breadcrumb {
    margin-bottom: 0.25rem;
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
}

/* ---- Selection ------------------------------------------------------------ */

/* The checkbox sits on the picture, outside the link; it shows on hover and once anything is selected. */
.coll-item {
    position: relative;
    display: flex;
    min-width: 0;
}

.coll-check {
    position: absolute;
    z-index: 2;
    top: 0.75rem;
    right: 0.75rem;
    width: 1.375rem;
    height: 1.375rem;
    margin: 0;
    border-color: var(--bs-gray-400);
    border-radius: 50% !important;
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
}

    .coll-item:hover .coll-check,
    .coll-grid.has-selection .coll-check,
    .coll-check:checked,
    .coll-check:focus-visible {
        opacity: 1;
    }

.coll-bulk {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.coll-bulk-count {
    margin-right: 0.375rem;
    color: var(--dam-primary-text);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.coll-icon-btn {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: 0.375rem;
    background: none;
    color: var(--bs-body-color);
    font-size: 1rem;
}

    .coll-icon-btn:hover {
        background-color: var(--bs-tertiary-bg);
    }

.coll-bulk-divider {
    width: 1px;
    height: 1.5rem;
    margin: 0 0.5rem;
    background-color: var(--bs-border-color);
}

/* An SVG option picture drawn in the text colour, like the Bootstrap icons beside it (AssetDisplay.IsSvg). The size
   comes from the class it is shown with. */
.option-svg {
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: var(--option-svg) center / contain no-repeat;
    mask: var(--option-svg) center / contain no-repeat;
}
