/* =========================================================================
   MCEDC DAM — app styles (ThinkMoCo brand extension)
   All styles are scoped under #mcedc-dam-root / body.mcedc-dam-app so they can
   never bleed into (or be broken by) BeTheme.

   ┌───────────────────────────────────────────────────────────────────────┐
   │  BRAND COLORS & TYPE — EDIT HERE                                        │
   │  Change these values to re-skin the whole app. Everything below uses    │
   │  these variables; you should not need to touch the rules further down.  │
   │  When Stacy delivers the exact palette/fonts, just update this block.   │
   └───────────────────────────────────────────────────────────────────────┘
   ========================================================================= */
/* Brand webfont — when Stacy delivers the font files, drop them in
   assets/fonts/ and uncomment/adjust this block, then set --mcedc-font below.
   (Self-hosted so nothing loads from an external host.)
@font-face {
    font-family: "ThinkMoCo Sans";
    src: url("../../assets/fonts/brand.woff2") format("woff2");
    font-weight: 400 700; font-display: swap;
}
*/
body.mcedc-dam-app {
    /* Core palette */
    --mcedc-navy:    #00568d;   /* footer, headings, dark bars */
    --mcedc-header-bg: #00568d; /* app header background (MCEDC brand blue) */
    --mcedc-blue:    #00568d;   /* primary actions, links */
    --mcedc-orange:  #f4a521;   /* accent triangle / highlights */
    --mcedc-teal:    #1fb6a6;   /* accent */
    --mcedc-magenta: #c8386f;   /* accent / eyebrows */

    /* Neutrals & surfaces */
    --mcedc-cream:   #f5f1e9;   /* page background */
    --mcedc-ink:     #1a2233;   /* body text */
    --mcedc-muted:   #5b6478;   /* secondary text (meets WCAG AA on cream) */
    --mcedc-line:    #e6e0d4;   /* borders / dividers */
    --mcedc-card:    #ffffff;   /* cards, panels */
    --mcedc-sidebar: #fbf9f4;   /* sidebar background */

    /* File-type accent colours (icons + tints). Editable. */
    --mcedc-c-image:        #1aa89a;
    --mcedc-c-video:        #2f6fed;
    --mcedc-c-document:     #c8386f;
    --mcedc-c-spreadsheet:  #1a8f5f;
    --mcedc-c-presentation: #e0891a;
    --mcedc-c-vector:       #5b53d6;
    --mcedc-c-link:         #5b7089;
    --mcedc-c-file:         #5b6478;

    /* Accent used for card top-borders & the triangle mark */
    --mcedc-accent:  var(--mcedc-orange);

    /* Typography — BeTheme serves Poppins on this site (not Lato/Josefin), so we
       use it to avoid an italic-substitute fallback. Swap these to Lato/Josefin
       once those families are actually loaded on the page. */
    --mcedc-font: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
    --mcedc-font-head: "Poppins", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;

    /* Shape & rhythm — squared "tile" aesthetic: no rounded corners anywhere. */
    --mcedc-radius:  0;
    --mcedc-radius-sm: 0;
    --mcedc-gap:     20px;
    --mcedc-shadow:  0 1px 2px rgba(22, 33, 62, .06), 0 6px 20px rgba(22, 33, 62, .06);
    --mcedc-shadow-lift: 0 10px 34px rgba(22, 33, 62, .18);
    --mcedc-header-h: 60px;

    /* ---- End of edit block --------------------------------------------- */

    background: var(--mcedc-cream);
    color: var(--mcedc-ink);
    font-family: var(--mcedc-font);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Squared everywhere: force border-radius 0 on all app elements (buttons,
   inputs, pills, dots, swatches, chips, modals, …). The only exception is the
   loading spinner, which must stay circular to read as a spinner. */
#mcedc-dam-root *,
#mcedc-dam-root *::before,
#mcedc-dam-root *::after { border-radius: 0 !important; }
#mcedc-dam-root .mcedc-spinner { border-radius: 50% !important; }

/* Headings use Josefin Sans (h1–h5); body and h6 use Lato (both preloaded by
   BeTheme). Scoped to the app root so it applies within the DAM only. */
#mcedc-dam-root h1,
#mcedc-dam-root h2,
#mcedc-dam-root h3,
#mcedc-dam-root h4,
#mcedc-dam-root h5 { font-family: var(--mcedc-font-head); }
#mcedc-dam-root h6 { font-family: var(--mcedc-font); }

/* Per-category colour hook: every element with .mcedc-cat-X exposes --cat. */
.mcedc-cat-image        { --cat: var(--mcedc-c-image); }
.mcedc-cat-video        { --cat: var(--mcedc-c-video); }
.mcedc-cat-document     { --cat: var(--mcedc-c-document); }
.mcedc-cat-spreadsheet  { --cat: var(--mcedc-c-spreadsheet); }
.mcedc-cat-presentation { --cat: var(--mcedc-c-presentation); }
.mcedc-cat-vector       { --cat: var(--mcedc-c-vector); }
.mcedc-cat-link         { --cat: var(--mcedc-c-link); }
.mcedc-cat-file         { --cat: var(--mcedc-c-file); }

/* ---- Triangle motif ------------------------------------------------------ */
.mcedc-tri {
    width: 0; height: 0; display: inline-block; flex: none;
    border-left: 10px solid var(--mcedc-accent);
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
}
.mcedc-tri-lg {
    border-left-width: 20px; border-top-width: 14px; border-bottom-width: 14px;
    margin-bottom: 8px;
}

/* ---- Buttons ------------------------------------------------------------- */
.mcedc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 16px; border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm);
    background: #fff; color: var(--mcedc-ink); font-weight: 600; font-size: .9rem;
    text-decoration: none; transition: background .15s, border-color .15s, transform .05s;
}
.mcedc-btn:hover { border-color: var(--mcedc-blue); }
.mcedc-btn:active { transform: translateY(1px); }
.mcedc-btn:disabled { opacity: .55; cursor: default; }
.mcedc-btn-primary { background: var(--mcedc-blue); border-color: var(--mcedc-blue); color: #fff; }
.mcedc-btn-primary:hover { background: #245ad0; border-color: #245ad0; }
.mcedc-block { display: flex; width: 100%; }

/* ---- Shell + header ------------------------------------------------------ */
/* Fixed app-shell: the shell fills the viewport and never scrolls itself. Only
   the content pane (.mcedc-main) and the sidebar's nav list scroll — so the
   header and sidebar frame stay put instead of the whole page moving. */
.mcedc-shell { height: 100vh; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; }

.mcedc-header {
    flex: none; z-index: 30;
    display: flex; align-items: center; gap: 12px;
    min-height: var(--mcedc-header-h); padding: 8px 16px;
    background: var(--mcedc-header-bg); color: #fff;
}
.mcedc-brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; color: #fff; font-weight: 700; cursor: pointer; padding: 0; }
.mcedc-brand-name { font-size: 1.05rem; letter-spacing: .01em; white-space: nowrap; }
/* #mcedc-dam-root prefix beats the reset's `#mcedc-dam-root img { height:auto }`
   (ID specificity) so the fixed logo height actually applies. */
#mcedc-dam-root .mcedc-brand-logo { height: 58px; width: auto; max-width: 240px; display: block; }
@media (max-width: 640px) { #mcedc-dam-root .mcedc-brand-logo { height: 58px; max-width: 170px; } }
.mcedc-header-spacer { flex: 1; }
.mcedc-user { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: .85rem; }
.mcedc-user-name { opacity: .9; display: none; }
.mcedc-signout { color: #fff; opacity: .85; border: 0; background: none; border-bottom: 1px solid transparent; }
.mcedc-signout:hover { opacity: 1; border-bottom-color: currentColor; }
.mcedc-manage-toggle { font: inherit; font-weight: 600; }

/* "Library Navigation" header links (audience-filtered server-side). */
.mcedc-header-nav { display: flex; align-items: center; gap: 4px; margin-left: 14px; min-width: 0; overflow-x: auto; }
.mcedc-header-navlink {
    color: #fff; opacity: .85; text-decoration: none; white-space: nowrap;
    font-size: .9rem; font-weight: 600; padding: 6px 10px; border-radius: 6px;
}
.mcedc-header-navlink:hover { opacity: 1; background: rgba(255, 255, 255, .14); text-decoration: none; }
@media (max-width: 782px) { .mcedc-header-nav { display: none; } }

/* hamburger (mobile) */
.mcedc-hamburger { display: inline-flex; flex-direction: column; gap: 4px; padding: 8px; background: none; border: 0; }
.mcedc-hamburger span { width: 20px; height: 2px; background: #fff; display: block; border-radius: 2px; }
/* Desktop-only re-open caret — the first item in the breadcrumb, shown when the
   sidebar is collapsed (hidden on mobile, where the hamburger opens the drawer). */
.mcedc-sidebar-open { display: none; }

/* ---- Body layout --------------------------------------------------------- */
.mcedc-body { flex: 1; display: flex; align-items: stretch; position: relative; min-height: 0; overflow: hidden; }

.mcedc-sidebar {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
    width: 82%; max-width: 320px; padding: 18px 14px; overflow-y: auto;
    background: var(--mcedc-sidebar); border-right: 1px solid var(--mcedc-line);
    transform: translateX(-100%); visibility: hidden;
    transition: transform .22s ease, visibility 0s linear .22s;
}
.mcedc-sidebar.is-open { transform: translateX(0); visibility: visible; transition: transform .22s ease, visibility 0s; box-shadow: 0 0 40px rgba(0,0,0,.25); }
.mcedc-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(10, 16, 30, .45); }

.mcedc-main { flex: 1; min-width: 0; width: 100%; max-width: 1960px; margin: 0 auto; padding: 18px 16px 64px; position: relative; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }

/* ---- Search -------------------------------------------------------------- */
.mcedc-search { display: flex; align-items: center; gap: 8px; position: relative; }
.mcedc-search-ico { position: absolute; left: 11px; width: 17px; height: 17px; color: var(--mcedc-muted); pointer-events: none; }
.mcedc-search-ico svg { width: 100%; height: 100%; }
.mcedc-search input {
    flex: 1; min-width: 0; padding: 9px 12px 9px 34px; border: 1px solid var(--mcedc-line);
    border-radius: 22px; background: #fff; color: var(--mcedc-ink);
}
.mcedc-search input:focus { outline: 2px solid var(--mcedc-blue); outline-offset: 1px; }

/* ---- Collection tree (sidebar) ------------------------------------------- */
.mcedc-nav-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--mcedc-muted); margin: 6px 0 8px 4px; }
.mcedc-nav-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin: 6px 4px 8px; }
.mcedc-nav-head .mcedc-nav-title { margin: 0; }
.mcedc-nav-head-actions { display: flex; align-items: center; gap: 6px; }
/* Collapse caret at the sidebar's top-right — hides the whole sidebar. */
.mcedc-nav-collapse { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border: 0; background: none; color: var(--mcedc-muted); cursor: pointer; border-radius: 6px; }
.mcedc-nav-collapse:hover { background: rgba(47,111,237,.1); color: var(--mcedc-navy); }
.mcedc-nav-collapse svg { width: 17px; height: 17px; }
.mcedc-nav-sort { display: inline-flex; gap: 2px; flex: none; }
.mcedc-sortbtn { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--mcedc-muted); background: none; border: 1px solid transparent; padding: 2px 5px; cursor: pointer; }
.mcedc-sortbtn:hover { color: var(--mcedc-navy); }
.mcedc-sortbtn.is-active { color: var(--mcedc-header-bg); border-color: var(--mcedc-line); background: color-mix(in srgb, var(--mcedc-header-bg) 8%, transparent); }
.mcedc-tree, .mcedc-tchildren { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mcedc-trow { display: flex; align-items: center; gap: 2px; border-radius: var(--mcedc-radius-sm); }
.mcedc-trow.is-dropfolder { background: color-mix(in srgb, var(--mcedc-blue) 16%, transparent); box-shadow: 0 0 0 2px var(--mcedc-blue) inset; }
.mcedc-tw { flex: none; width: 22px; height: 30px; display: grid; place-items: center; border: 0; background: none; color: var(--mcedc-muted); border-radius: 6px; }
.mcedc-tw:hover { background: rgba(47,111,237,.1); color: var(--mcedc-navy); }
.mcedc-tw svg { width: 15px; height: 15px; }
.mcedc-tbtn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; padding: 7px 9px; border: 0; border-radius: var(--mcedc-radius-sm); background: none; color: var(--mcedc-ink); font-size: .9rem; }
.mcedc-tbtn:hover { background: rgba(47,111,237,.08); }
.mcedc-tbtn.is-active { background: rgba(47,111,237,.14); color: var(--mcedc-navy); font-weight: 600; }
/* Accent triangle bullet (replaces the folder icon), pointing at the folder name.
   Colour is set inline: the folder's own accent when custom accents are on, else amber. */
.mcedc-tmark { width: 12px; height: 12px; flex: none; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.mcedc-ficon { width: 18px; height: 18px; flex: none; color: var(--mcedc-orange); }
.mcedc-ficon svg { width: 100%; height: 100%; }
.mcedc-trash-ic { color: var(--mcedc-muted); }
.mcedc-tname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcedc-tcount { font-size: .72rem; color: var(--mcedc-muted); }
.mcedc-tbtn.is-passthrough .mcedc-tname { font-style: italic; color: var(--mcedc-muted); }
.mcedc-trash-row { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--mcedc-line); }

/* ---- Breadcrumb ---------------------------------------------------------- */
.mcedc-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 1rem; }
.mcedc-breadcrumb button { background: none; border: 0; color: var(--mcedc-blue); font-weight: 600; padding: 2px 0; }
.mcedc-breadcrumb button:hover:not(:disabled) { text-decoration: underline; }
.mcedc-breadcrumb button:disabled { color: var(--mcedc-navy); font-weight: 700; cursor: default; }
.mcedc-crumb-sep { color: var(--mcedc-muted); }

/* ---- Toolbar ------------------------------------------------------------- */
.mcedc-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.mcedc-toolbar-spacer { flex: 1; }
.mcedc-toolbar-search { flex: 1 1 220px; max-width: 360px; }
.mcedc-toolbar-search .mcedc-search, .mcedc-toolbar-search .mcedc-search input { width: 100%; }
.mcedc-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.mcedc-newbtn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border: 0; border-radius: var(--mcedc-radius-sm); background: var(--mcedc-blue); color: #fff; font-weight: 600; }
.mcedc-newbtn:hover { background: #245ad0; }
.mcedc-newbtn svg { width: 17px; height: 17px; }

.mcedc-viewseg { display: inline-flex; border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); overflow: hidden; background: #fff; }
.mcedc-viewseg button { border: 0; background: none; padding: 8px 13px; font-size: .85rem; font-weight: 600; color: var(--mcedc-muted); }
.mcedc-viewseg button.is-active { background: var(--mcedc-navy); color: #fff; }

/* filter pills */
.mcedc-fpill-wrap { display: inline-flex; }
.mcedc-fpill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px 0 13px; border: 1px solid var(--mcedc-line); background: #fff; color: var(--mcedc-ink); border-radius: 20px; font-size: .85rem; }
.mcedc-fpill:hover { border-color: var(--mcedc-blue); }
.mcedc-fpill.is-on { background: color-mix(in srgb, var(--mcedc-blue) 12%, transparent); border-color: var(--mcedc-blue); font-weight: 600; }
.mcedc-caret { width: 15px; height: 15px; color: var(--mcedc-muted); }
.mcedc-fnum { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--mcedc-blue); color: #fff; font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.mcedc-fdot { width: 10px; height: 10px; border-radius: 50%; background: var(--cat, var(--mcedc-muted)); flex: none; }

/* ---- Dropdown (New menu, filter menus, kebab) ---------------------------- */
.mcedc-dd { position: relative; display: inline-flex; }
.mcedc-dd-panel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 65; min-width: 200px; background: #fff; border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius); box-shadow: var(--mcedc-shadow-lift); padding: 6px; }
.mcedc-dd-panel.is-right { left: auto; right: 0; }
.mcedc-dd-div { height: 1px; background: var(--mcedc-line); margin: 5px 4px; }
.mcedc-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; color: var(--mcedc-ink); padding: 9px 10px; border-radius: var(--mcedc-radius-sm); font-size: .9rem; }
.mcedc-menu-item:hover { background: color-mix(in srgb, var(--mcedc-blue) 10%, transparent); }
.mcedc-menu-item.is-danger { color: var(--mcedc-magenta); }
.mcedc-menu-item.is-danger:hover { background: color-mix(in srgb, var(--mcedc-magenta) 12%, transparent); }
.mcedc-menu-item svg { width: 17px; height: 17px; flex: none; }

/* checkbox filter menu */
.mcedc-checkmenu { min-width: 216px; max-height: 340px; overflow-y: auto; }
.mcedc-fm-clear { width: 100%; text-align: left; border: 0; background: none; color: var(--mcedc-blue); font-weight: 600; font-size: .84rem; padding: 8px 10px; border-radius: var(--mcedc-radius-sm); }
.mcedc-fm-clear:hover:not(:disabled) { background: color-mix(in srgb, var(--mcedc-blue) 10%, transparent); }
.mcedc-fm-clear:disabled { color: var(--mcedc-muted); opacity: .55; cursor: default; }
.mcedc-fm-opt { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0; background: none; color: var(--mcedc-ink); padding: 8px 10px; border-radius: var(--mcedc-radius-sm); font-size: .9rem; }
.mcedc-fm-opt:hover { background: color-mix(in srgb, var(--mcedc-blue) 10%, transparent); }
.mcedc-cbx { flex: none; width: 17px; height: 17px; border: 1.6px solid var(--mcedc-line); border-radius: 5px; display: grid; place-items: center; color: #fff; box-sizing: border-box; }
.mcedc-cbx svg { width: 12px; height: 12px; opacity: 0; }
.mcedc-fm-opt.is-on .mcedc-cbx { background: var(--mcedc-blue); border-color: var(--mcedc-blue); }
.mcedc-fm-opt.is-on .mcedc-cbx svg { opacity: 1; }
.mcedc-fm-label { flex: 1; }
.mcedc-fm-ct { flex: none; color: var(--mcedc-muted); font-size: .8rem; font-variant-numeric: tabular-nums; }

/* ---- Active-filter chips ------------------------------------------------- */
.mcedc-chips-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.mcedc-chips-label { font-size: .78rem; color: var(--mcedc-muted); font-weight: 600; }
.mcedc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 5px 5px 12px; border: 1px solid var(--mcedc-blue); border-radius: 20px; background: color-mix(in srgb, var(--mcedc-blue) 10%, transparent); color: var(--mcedc-ink); font-size: .82rem; font-weight: 600; }
.mcedc-chip-x { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: var(--mcedc-muted); font-size: .85rem; }
.mcedc-chip:hover .mcedc-chip-x { background: color-mix(in srgb, var(--mcedc-muted) 22%, transparent); color: var(--mcedc-ink); }
.mcedc-chips-clear { border: 0; background: none; color: var(--mcedc-blue); font-size: .82rem; font-weight: 600; }
.mcedc-chips-clear:hover { text-decoration: underline; }

/* ---- Section heading ----------------------------------------------------- */
.mcedc-sechead { font-size: .72rem; text-transform: uppercase; letter-spacing: .11em; color: var(--mcedc-muted); margin: 6px 0 12px; }

/* ---- Trash banner -------------------------------------------------------- */
.mcedc-tbanner { display: flex; align-items: center; gap: 10px; background: color-mix(in srgb, var(--mcedc-magenta) 9%, transparent); border: 1px solid color-mix(in srgb, var(--mcedc-magenta) 30%, var(--mcedc-line)); color: var(--mcedc-magenta); border-radius: var(--mcedc-radius-sm); padding: 10px 14px; font-size: .86rem; margin-bottom: 16px; }
.mcedc-tbanner svg { width: 18px; height: 18px; flex: none; }

/* Trashed folders (recoverable) shown in the Trash view */
.mcedc-trashfolders { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mcedc-trashfolder { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); padding: 10px 12px; }
.mcedc-tf-ico { flex: none; display: inline-flex; color: var(--mcedc-amber, #f9a51e); }
.mcedc-tf-ico svg { width: 22px; height: 22px; }
.mcedc-tf-body { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.mcedc-tf-name { font-weight: 600; color: var(--mcedc-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcedc-tf-sub { font-size: .78rem; color: var(--mcedc-muted); }
.mcedc-trashfolder .mcedc-btn { flex: none; }

/* Folder-trash confirmation impact list */
.mcedc-trash-impact { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mcedc-trash-impact li { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; color: var(--mcedc-navy); }
.mcedc-trash-impact li svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--mcedc-muted); }
.mcedc-trash-impact li.is-warn { color: var(--mcedc-magenta); }
.mcedc-trash-impact li.is-warn svg { color: var(--mcedc-magenta); }
.mcedc-formerr { color: var(--mcedc-magenta); font-size: .9rem; }

/* ---- Folder tiles -------------------------------------------------------- */
.mcedc-folders { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 14px; }
/* Make every folder tile fill its grid cell so a row stays even in height even
   when one tile carries an access-chip row (li stretches → wrap → button). */
.mcedc-folders > li { display: flex; }
/* Folder card = featured cover image (top) + centered accent triangle at the
   seam + footer (name / count / access). The whole card is one clickable button.
   Folders with no custom image fall back to a branded default cover. */
/* Flex column (NOT block): a <button> vertically-centres its content, so when the
   grid stretches a shorter card (no access row) to match a taller one, the slack
   would split above the image + below the footer. Column-flex keeps the image
   pinned to the top; the footer (flex:1) absorbs the slack as invisible card-white. */
.mcedc-folder { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 0; overflow: hidden; background: var(--mcedc-card); border: 1px solid var(--mcedc-line); border-radius: 0; transition: border-color .12s, box-shadow .12s; cursor: pointer; }
.mcedc-folder:hover { border-color: var(--mcedc-blue); box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.mcedc-folder.is-dropfolder { border-color: var(--mcedc-blue); box-shadow: 0 0 0 2px var(--mcedc-blue) inset; }
.mcedc-folder-cover { position: relative; display: block; flex: none; width: 100%; aspect-ratio: 16 / 10; background: var(--mcedc-sidebar) center center / cover no-repeat; }
/* Accent triangle anchored to the right edge, pointing left, overlapping the
   image/footer seam at the bottom. Colour is set inline from the chosen accent. */
.mcedc-folder-tri {
    position: absolute;
    right: 0;
    bottom: -18px;
    width: 26px;
    height: 38px;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
    pointer-events: none;
    z-index: 2;
}
.mcedc-folder-foot { display: block; flex: 1 1 auto; padding: 12px 46px 13px 15px; }
.mcedc-folder-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mcedc-folder-name { font-weight: 600; font-size: .98rem; color: var(--mcedc-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcedc-folder-count { font-size: .77rem; color: var(--mcedc-muted); }
.mcedc-folder.is-passthrough .mcedc-folder-name { font-style: italic; color: var(--mcedc-muted); }

/* ---- Asset grid ---------------------------------------------------------- */
.mcedc-result-count { font-size: .82rem; color: var(--mcedc-muted); margin-bottom: 12px; }
.mcedc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.mcedc-card { position: relative; background: var(--mcedc-card); border: 1px solid var(--mcedc-line); border-radius: 0; transition: border-color .12s, background .12s; }
.mcedc-card:hover { border-color: var(--mcedc-blue); background: color-mix(in srgb, var(--mcedc-blue) 4%, var(--mcedc-card)); }
.mcedc-card-btn { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 0; }
.mcedc-card-menu { position: absolute; top: 6px; right: 6px; z-index: 2; }
.mcedc-kebab { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(255,255,255,.86); color: var(--mcedc-ink); box-shadow: var(--mcedc-shadow); }
.mcedc-kebab:hover { background: #fff; }
.mcedc-kebab svg { width: 17px; height: 17px; }
.mcedc-card-body { padding: 10px 12px 12px; }
.mcedc-card-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .9rem; font-weight: 600; color: var(--mcedc-navy); }
.mcedc-card-sub { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; }
.mcedc-card-size { font-size: .74rem; color: var(--mcedc-muted); font-variant-numeric: tabular-nums; }

.mcedc-badge { display: inline-block; font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; color: var(--mcedc-blue); background: rgba(47,111,237,.1); border-radius: 4px; padding: 2px 6px; }

/* ---- Thumbnails ---------------------------------------------------------- */
.mcedc-thumb { position: relative; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 0; }
.mcedc-thumb.mcedc-thumb-img {align-items: flex-start;}
.mcedc-thumb-img { background: #eef0f4; }
.mcedc-thumb-img img { width: 100%; height: 100%; object-fit: cover; }
.mcedc-thumb-icon { background: color-mix(in srgb, var(--cat, var(--mcedc-muted)) 12%, var(--mcedc-card)); }
.mcedc-glyph { width: 52px; height: 52px; color: var(--cat, var(--mcedc-muted)); }
.mcedc-glyph svg { width: 100%; height: 100%; }
.mcedc-ext { position: absolute; left: 8px; bottom: 8px; font-size: .64rem; font-weight: 800; letter-spacing: .04em; color: var(--mcedc-navy); background: rgba(255,255,255,.92); border-radius: 5px; padding: 3px 6px; }
.mcedc-thumb-img .mcedc-ext { box-shadow: var(--mcedc-shadow); }
.mcedc-play { width: 0; height: 0; border-left: 22px solid var(--cat, var(--mcedc-blue)); border-top: 14px solid transparent; border-bottom: 14px solid transparent; }

/* ---- List view ----------------------------------------------------------- */
/* overflow must stay visible so a row's kebab dropdown isn't clipped/unreachable */
.mcedc-tablewrap { border: 1px solid var(--mcedc-line); border-radius: 0; background: var(--mcedc-card); }
.mcedc-ltable { width: 100%; border-collapse: collapse; }
.mcedc-ltable th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--mcedc-muted); padding: 9px 12px; border-bottom: 1px solid var(--mcedc-line); }
.mcedc-lrow { cursor: pointer; }
.mcedc-lrow:hover { background: rgba(47,111,237,.05); }
.mcedc-lrow td { padding: 9px 12px; border-top: 1px solid var(--mcedc-line); font-size: .9rem; }
.mcedc-lcell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mcedc-lico { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 6px; color: var(--cat, var(--mcedc-muted)); background: color-mix(in srgb, var(--cat, var(--mcedc-muted)) 14%, transparent); }
.mcedc-lico svg { width: 16px; height: 16px; }
.mcedc-lname { font-weight: 600; color: var(--mcedc-navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcedc-lmono { font-variant-numeric: tabular-nums; color: var(--mcedc-muted); font-size: .82rem; }
.mcedc-lact { text-align: right; width: 44px; }
.mcedc-lact .mcedc-kebab { background: none; box-shadow: none; }
.mcedc-lact .mcedc-kebab:hover { background: color-mix(in srgb, var(--mcedc-muted) 15%, transparent); }

/* ---- Pager --------------------------------------------------------------- */
/* Bulk select mode */
.mcedc-viewhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 12px; flex-wrap: wrap; }
/* Right-side file-view controls: Select + the Grid/List segment, grouped together.
   margin-left:auto keeps them on the right whether they share the header row or
   wrap below it (e.g. when a wide/custom section header takes the full row). */
.mcedc-viewhead-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.mcedc-card.is-selected { border-color: var(--mcedc-blue); box-shadow: 0 0 0 2px var(--mcedc-blue) inset; }
.mcedc-card-check { position: absolute; top: 8px; left: 8px; z-index: 3; display: grid; place-items: center; width: 26px; height: 26px; background: var(--mcedc-card); border: 1px solid var(--mcedc-line); border-radius: 6px; box-shadow: var(--mcedc-shadow); cursor: pointer; }
.mcedc-card-check input { width: 16px; height: 16px; cursor: pointer; }
.mcedc-lrow.is-selected { background: color-mix(in srgb, var(--mcedc-blue) 9%, transparent); }
.mcedc-lcheck { width: 15px; height: 15px; margin-right: 8px; flex: none; cursor: pointer; }
.mcedc-bulkbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; margin-bottom: 14px; background: var(--mcedc-navy); color: #fff; border-radius: var(--mcedc-radius-sm); box-shadow: var(--mcedc-shadow-lift); }
.mcedc-bulkbar-count { font-weight: 700; }
.mcedc-bulkbar .mcedc-linkbtn { color: #cfe0ff; }
.mcedc-bulkbar .mcedc-linkbtn:hover:not(:disabled) { color: #fff; }
.mcedc-bulkbar .mcedc-linkbtn:disabled { color: rgba(255,255,255,.4); }
.mcedc-bulkbar-sp { flex: 1 1 auto; }
.mcedc-bulkbar .mcedc-btn { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.mcedc-bulkbar .mcedc-btn:hover:not(:disabled) { background: rgba(255,255,255,.22); }
.mcedc-bulkbar .mcedc-btn-primary { background: var(--mcedc-blue); border-color: var(--mcedc-blue); }
.mcedc-bulkbar .mcedc-btn svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }
.mcedc-moveitem.is-on { background: color-mix(in srgb, var(--mcedc-blue) 14%, transparent); font-weight: 600; }
.mcedc-pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 32px; }
.mcedc-pager-status { font-size: .85rem; color: var(--mcedc-muted); }

/* ---- Drag-and-drop overlay (pane background) ----------------------------- */
.mcedc-dropov { position: absolute; inset: 10px; z-index: 25; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 2.5px dashed var(--mcedc-blue); border-radius: var(--mcedc-radius); background: color-mix(in srgb, var(--mcedc-blue) 10%, var(--mcedc-cream)); color: var(--mcedc-navy); font-weight: 600; pointer-events: none; }
.mcedc-dropov svg { width: 40px; height: 40px; color: var(--mcedc-blue); }

/* ---- Detail slide-over --------------------------------------------------- */
.mcedc-detail-scrim { z-index: 55; background: rgba(10, 16, 30, .4); }
.mcedc-detail { position: fixed; top: 0; right: 0; bottom: 0; z-index: 56; width: 420px; max-width: 92vw; display: flex; flex-direction: column; background: var(--mcedc-card); border-left: 1px solid var(--mcedc-line); box-shadow: var(--mcedc-shadow-lift); animation: mcedc-slidein .2s ease; }
@keyframes mcedc-slidein { from { transform: translateX(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mcedc-detail { animation: none; } }

/* Floating "?" help button + right-side help panel. The FAB's z-index (45) is
   deliberately BELOW the preview/detail panel (scrim 55 / panel 56) so an open
   preview file covers it and the two never overlap. */
.mcedc-help-fab { position: fixed; right: 20px; bottom: 20px; z-index: 45; width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: #009a8c; color: #fff; font-size: 1.55rem; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.26); }
.mcedc-help-fab:hover { background: var(--mcedc-navy); }
.mcedc-help-fab:focus-visible { outline: 3px solid var(--mcedc-blue); outline-offset: 2px; }
.mcedc-help-scrim { position: fixed; inset: 0; z-index: 58; background: rgba(10, 16, 30, .4); }
.mcedc-help-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 59; width: 520px; max-width: 94vw; display: flex; flex-direction: column; background: var(--mcedc-card); border-left: 1px solid var(--mcedc-line); box-shadow: var(--mcedc-shadow-lift); animation: mcedc-slidein .2s ease; }
@media (prefers-reduced-motion: reduce) { .mcedc-help-panel { animation: none; } }
.mcedc-help-head { flex: none; display: flex; justify-content: flex-end; padding: 12px 14px 0; }
/* A more prominent close button for the help panel (bordered, higher-contrast, fills on hover). */
.mcedc-help-head .mcedc-x { width: 40px; height: 40px; font-size: 1.4rem; color: var(--mcedc-navy); background: #fff; border: 1.5px solid var(--mcedc-line); border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.mcedc-help-head .mcedc-x:hover { background: var(--mcedc-navy); color: #fff; border-color: var(--mcedc-navy); }
.mcedc-help-body { padding: 4px 20px 24px; overflow-y: auto; color: var(--mcedc-ink); }
.mcedc-detail-head { display: flex; align-items: center; justify-content: flex-end; padding: 10px 12px 0; }
.mcedc-x { border: 0; background: none; color: var(--mcedc-muted); width: 34px; height: 34px; border-radius: 8px; font-size: 1.05rem; cursor: pointer; }
.mcedc-x:hover { background: color-mix(in srgb, var(--mcedc-muted) 15%, transparent); color: var(--mcedc-ink); }
.mcedc-detail-body { padding: 4px 20px 20px; overflow-y: auto; }
.mcedc-dpreview { aspect-ratio: 4 / 3; border-radius: var(--mcedc-radius); overflow: hidden; margin-bottom: 18px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--cat, var(--mcedc-muted)) 12%, var(--mcedc-card)); border: 1px solid var(--mcedc-line); }
.mcedc-dpreview-img { background: #f0f2f6; }
.mcedc-dpreview-img img { width: 100%; height: 100%; object-fit: contain; }
.mcedc-dpreview .mcedc-glyph { width: 64px; height: 64px; }
.mcedc-dpreview.mcedc-embed { aspect-ratio: 16 / 9; position: relative; }
.mcedc-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.mcedc-linkcard { flex-direction: column; gap: 12px; text-align: center; padding: 28px 20px; }
.mcedc-detail-lead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin: 0 0 16px; }
.mcedc-detail-title { color: var(--mcedc-navy); font-size: 1.2rem; line-height: 1.3; margin: 0; text-wrap: balance; word-break: break-word; }
.mcedc-detail-lead .mcedc-badge { flex: none; margin-top: 4px; }
.mcedc-dtags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.mcedc-dtag { font-size: .76rem; border: 1px solid var(--mcedc-line); border-radius: 20px; padding: 3px 9px; color: var(--mcedc-muted); background: none; cursor: pointer; }
.mcedc-dtag:hover { border-color: var(--mcedc-blue); color: var(--mcedc-blue); }
.mcedc-detail-desc { color: var(--mcedc-ink); margin: 0 0 4px; line-height: 1.5; }
.mcedc-dsection { margin-top: 18px; border-top: 1px solid var(--mcedc-line); padding-top: 14px; }
.mcedc-meta { display: grid; grid-template-columns: 104px 1fr; margin: 0; }
.mcedc-meta-row { display: contents; }
.mcedc-meta-row dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--mcedc-muted); padding: 7px 0; align-self: start; }
.mcedc-meta-row dd { padding: 7px 0; margin: 0; color: var(--mcedc-ink); font-size: .9rem; word-break: break-word; }
.mcedc-meta-row:not(:first-child) dt, .mcedc-meta-row:not(:first-child) dd { border-top: 1px solid color-mix(in srgb, var(--mcedc-line) 55%, transparent); }
.mcedc-detail-actions { display: flex; flex-direction: column; gap: 9px; margin: 0 0 18px; }

/* ---- Version history ----------------------------------------------------- */
.mcedc-linkbtn { border: 0; background: none; color: var(--mcedc-blue); font-size: .8rem; font-weight: 600; padding: 2px 0; }
.mcedc-linkbtn:hover:not(:disabled) { text-decoration: underline; }
.mcedc-linkbtn:disabled { opacity: .55; cursor: default; }
.mcedc-vers { margin-top: 22px; border-top: 1px solid var(--mcedc-line); padding-top: 14px; }
.mcedc-vers-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.mcedc-verlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mcedc-ver { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--mcedc-line); }
.mcedc-ver:last-child { border-bottom: 0; }
.mcedc-ver-dot { flex: none; width: 22px; text-align: center; color: var(--mcedc-muted); }
.mcedc-ver.is-cur .mcedc-ver-dot { color: var(--mcedc-blue); }
.mcedc-ver-main { flex: 1; min-width: 0; }
.mcedc-ver-meta { display: block; font-size: .78rem; color: var(--mcedc-muted); }
.mcedc-ver-cur { flex: none; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--mcedc-blue); background: color-mix(in srgb, var(--mcedc-blue) 12%, transparent); border-radius: 20px; padding: 3px 9px; }
.mcedc-ver-acts { flex: none; display: flex; gap: 12px; }

/* ---- Modal (upload / new folder) ----------------------------------------- */
.mcedc-mscrim { position: fixed; inset: 0; z-index: 80; background: rgba(10, 16, 30, .5); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px; overflow-y: auto; }
.mcedc-modal { width: 520px; max-width: 100%; max-height: 86vh; display: flex; flex-direction: column; background: var(--mcedc-card); border-radius: var(--mcedc-radius); box-shadow: var(--mcedc-shadow-lift); overflow: hidden; }
.mcedc-modal-wide { width: 80vw; max-width: 960px; }
.mcedc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--mcedc-line); flex: none; }
.mcedc-modal-head h2 { margin: 0; font-size: 1.1rem; color: var(--mcedc-navy); }
.mcedc-modal-body { padding: 18px; overflow-y: auto; flex: 1 1 auto; }
.mcedc-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 18px; border-top: 1px solid var(--mcedc-line); background: var(--mcedc-sidebar); flex: none; }
.mcedc-utabs { display: flex; gap: 6px; margin-bottom: 16px; }
.mcedc-utab { display: flex; align-items: center; gap: 7px; border: 1px solid var(--mcedc-line); background: #fff; color: var(--mcedc-muted); border-radius: 9px; padding: 8px 13px; font-size: .86rem; font-weight: 600; }
.mcedc-utab.is-active { background: color-mix(in srgb, var(--mcedc-blue) 12%, transparent); border-color: var(--mcedc-blue); color: var(--mcedc-navy); }
.mcedc-utab svg { width: 16px; height: 16px; }
.mcedc-uploader { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 20px; border: 2px dashed var(--mcedc-line); border-radius: var(--mcedc-radius-sm); text-align: center; cursor: pointer; color: var(--mcedc-muted); }
.mcedc-uploader:hover { border-color: var(--mcedc-blue); }
.mcedc-uploader svg { width: 34px; height: 34px; color: var(--mcedc-blue); }
.mcedc-uploader-big { color: var(--mcedc-ink); font-weight: 600; }
/* Staged upload files: responsive grid, scrolls when there are many. */
.mcedc-staged { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 14px; max-height: 240px; overflow-y: auto; padding: 2px; }
.mcedc-staged-cell { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 9px; align-items: center; background: var(--mcedc-sidebar); border: 1px solid var(--mcedc-line); border-radius: 9px; padding: 9px 30px 9px 11px; }
.mcedc-staged-cell.is-clickable { cursor: pointer; }
.mcedc-staged-cell.is-active { border-color: var(--mcedc-blue); box-shadow: 0 0 0 1px var(--mcedc-blue) inset; }
.mcedc-staged-cell .mcedc-lico { grid-row: 1 / span 2; width: 26px; height: 26px; }
.mcedc-staged-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mcedc-ink); font-size: .84rem; }
.mcedc-staged-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; color: var(--mcedc-muted); }
.mcedc-staged-cell .mcedc-x { position: absolute; top: 6px; right: 6px; }
.mcedc-dest { font-size: .82rem; color: var(--mcedc-muted); margin-top: 6px; }
.mcedc-dest b { color: var(--mcedc-ink); }

/* ---- Upload progress (Google-Drive style) -------------------------------- */
.mcedc-uprog { padding: 6px 2px 2px; }
.mcedc-uprog-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.mcedc-uprog-title { font-weight: 600; color: var(--mcedc-ink); font-size: .95rem; }
.mcedc-uprog-pct { font-size: .82rem; color: var(--mcedc-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mcedc-uprog-eta { color: var(--mcedc-muted); }
.mcedc-uprog-bar { height: 8px; border-radius: 999px; background: var(--mcedc-line); overflow: hidden; }
.mcedc-uprog-bar > span { display: block; height: 100%; background: var(--mcedc-blue); border-radius: 999px; transition: width .2s ease; }
.mcedc-uprog-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
.mcedc-uprog-row { display: grid; grid-template-columns: auto 1fr 90px auto; align-items: center; column-gap: 10px; background: var(--mcedc-sidebar); border: 1px solid var(--mcedc-line); border-radius: 9px; padding: 8px 11px; }
.mcedc-uprog-row.is-active { border-color: var(--mcedc-blue); }
.mcedc-uprog-row.is-wait { opacity: .6; }
.mcedc-uprog-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--mcedc-ink); font-size: .84rem; }
.mcedc-uprog-mini { height: 5px; border-radius: 999px; background: var(--mcedc-line); overflow: hidden; }
.mcedc-uprog-mini > span { display: block; height: 100%; background: var(--mcedc-blue); border-radius: 999px; transition: width .2s ease; }
.mcedc-uprog-row.is-done .mcedc-uprog-mini > span { background: var(--mcedc-green, #1f9d55); }
.mcedc-uprog-stat { font-size: .78rem; color: var(--mcedc-muted); font-variant-numeric: tabular-nums; text-align: right; min-width: 3.2em; }
.mcedc-uprog-row.is-done .mcedc-uprog-stat { color: var(--mcedc-green, #1f9d55); font-weight: 700; }
.mcedc-uprog-note { font-size: .78rem; color: var(--mcedc-muted); margin: 12px 0 2px; }

/* ---- Toast --------------------------------------------------------------- */
.mcedc-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; background: var(--mcedc-navy); color: #fff; padding: 11px 18px; border-radius: 10px; box-shadow: var(--mcedc-shadow-lift); font-size: .88rem; }
/* ZIP "preparing download…" banner (bottom-right, above the toast z-order) */
.mcedc-dlbanner { position: fixed; bottom: 22px; right: 22px; z-index: 101; display: flex; align-items: center; gap: 11px; max-width: min(92vw, 460px); background: var(--mcedc-navy); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--mcedc-shadow-lift); font-size: .88rem; }
.mcedc-dlbanner-txt { flex: 1 1 auto; }
.mcedc-dlbanner-txt b { font-variant-numeric: tabular-nums; }
.mcedc-dlbanner-note { flex: none; font-size: .72rem; opacity: .72; max-width: 150px; line-height: 1.25; }
.mcedc-dlspin { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.28); border-top-color: #fff; animation: mcedc-dlspin 0.8s linear infinite; }
@keyframes mcedc-dlspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mcedc-dlspin { animation-duration: 2s; } }
@media (max-width: 560px) { .mcedc-dlbanner { left: 12px; right: 12px; max-width: none; } .mcedc-dlbanner-note { display: none; } }

/* ---- Right-click context menu -------------------------------------------- */
.mcedc-ctx-scrim { position: fixed; inset: 0; z-index: 85; }
.mcedc-dd-panel.mcedc-ctx { position: fixed; top: auto; z-index: 86; max-height: calc(100vh - 16px); overflow-y: auto; }

/* ---- Detail: folder membership chips ------------------------------------- */
.mcedc-dfolders { margin-top: 20px; border-top: 1px solid var(--mcedc-line); padding-top: 14px; }
.mcedc-folderchips { display: flex; flex-wrap: wrap; gap: 8px; }
.mcedc-folderchip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 5px 5px 10px; border: 1px solid var(--mcedc-line); border-radius: 20px; background: #fff; font-size: .82rem; color: var(--mcedc-ink); }
.mcedc-folderchip svg { width: 15px; height: 15px; color: var(--mcedc-orange); flex: none; }
.mcedc-folderchip-nm { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcedc-folderchip .mcedc-chip-x { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 0; background: none; border-radius: 50%; color: var(--mcedc-muted); font-size: .8rem; }
.mcedc-folderchip:hover .mcedc-chip-x { background: color-mix(in srgb, var(--mcedc-magenta) 15%, transparent); color: var(--mcedc-magenta); }
/* A membership to a folder that's currently in the Trash: greyed, non-removable, labelled */
.mcedc-folderchip.is-trashed { padding-right: 10px; border-style: dashed; border-color: color-mix(in srgb, var(--mcedc-muted) 45%, transparent); background: color-mix(in srgb, var(--mcedc-muted) 8%, #fff); color: var(--mcedc-muted); }
.mcedc-folderchip.is-trashed svg { color: var(--mcedc-muted); }
.mcedc-folderchip.is-trashed .mcedc-folderchip-nm { text-decoration: line-through; }
.mcedc-chip-trash { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--mcedc-muted); background: color-mix(in srgb, var(--mcedc-muted) 16%, transparent); border-radius: 10px; padding: 1px 7px; }
/* Admin folder-editor: current cover-image thumbnail */
.mcedc-admincover { margin-bottom: 8px; }
.mcedc-admincover img { display: block; max-width: 200px; max-height: 130px; object-fit: cover; border: 1px solid var(--mcedc-line); border-radius: 8px; }

/* ---- Move-to folder picker ----------------------------------------------- */
.mcedc-movelist { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); }
.mcedc-moveitem { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; border: 0; background: none; padding: 10px 12px; color: var(--mcedc-ink); font-size: .9rem; border-bottom: 1px solid var(--mcedc-line); }
.mcedc-movelist li:last-child .mcedc-moveitem { border-bottom: 0; }
.mcedc-moveitem:hover:not(:disabled) { background: color-mix(in srgb, var(--mcedc-blue) 10%, transparent); }
.mcedc-moveitem:disabled { color: var(--mcedc-muted); cursor: default; }
.mcedc-moveitem .mcedc-ficon { width: 18px; height: 18px; flex: none; color: var(--mcedc-orange); }
.mcedc-move-cur { margin-left: auto; font-size: .7rem; color: var(--mcedc-muted); text-transform: uppercase; letter-spacing: .05em; }

/* ---- Drag-to-move affordance --------------------------------------------- */
.mcedc-card[draggable="true"] { cursor: grab; }
.mcedc-card[draggable="true"]:active { cursor: grabbing; }
.mcedc-lrow[draggable="true"] .mcedc-lname { cursor: grab; }

/* ---- States: loading / empty / error / gates ---------------------------- */
.mcedc-loading, .mcedc-empty, .mcedc-error { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 56px 24px; color: var(--mcedc-muted); }
.mcedc-empty h2, .mcedc-error h2 { color: var(--mcedc-navy); }
.mcedc-spinner { width: 34px; height: 34px; border: 3px solid var(--mcedc-line); border-top-color: var(--mcedc-blue); border-radius: 50%; animation: mcedc-spin .8s linear infinite; }
@keyframes mcedc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mcedc-spinner { animation-duration: 2.4s; } }
.mcedc-form-error { color: var(--mcedc-magenta); font-size: .82rem; }
.mcedc-muted { color: var(--mcedc-muted); font-size: .9rem; }

.mcedc-gate { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--mcedc-cream); }
.mcedc-gate-card { background: var(--mcedc-card); border: 1px solid var(--mcedc-line); border-top: 4px solid var(--mcedc-accent); border-radius: var(--mcedc-radius); box-shadow: var(--mcedc-shadow); padding: 32px; max-width: 520px; width: 100%; text-align: center; }
/* Wide variant (Terms of Use + Welcome): fills more of the screen — ~98% on
   mobile (with a slim gate gutter), 60% on desktop. Login/password gates stay narrow. */
.mcedc-gate:has(.mcedc-gate-card-wide) { padding: 8px; }
.mcedc-gate-card-wide { max-width: none; width: 98%; }
@media (min-width: 1000px) {
    .mcedc-gate:has(.mcedc-gate-card-wide) { padding: 24px; }
    .mcedc-gate-card-wide { width: 60vw; }
}
.mcedc-gate-card h1 { color: var(--mcedc-navy); margin-bottom: 12px; }
.mcedc-gate-body { text-align: left; max-height: 45vh; overflow-y: auto; margin: 0 auto 20px; color: var(--mcedc-ink); }
/* One-time welcome message (custom HTML) shown after accepting the terms. */
.mcedc-gate-welcome { text-align: center; }
.mcedc-gate-welcome > :first-child { margin-top: 0; }
.mcedc-gate-logo { display: block; width: auto; max-width: min(300px, 80%); height: auto; margin: 0 auto 20px; }
.mcedc-gate-title { font-size: 1.15rem; color: var(--mcedc-muted); font-weight: 600; margin: 0 0 10px; }
.mcedc-gate-lead { color: var(--mcedc-muted); margin: 0 0 18px; }
.mcedc-gate-fld { display: block; text-align: left; margin: 0 0 14px; }
.mcedc-gate-fld span { display: block; font-size: .78rem; font-weight: 600; color: var(--mcedc-navy); margin-bottom: 5px; }
.mcedc-gate-fld input { width: 100%; padding: 10px 12px; border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); font-size: .95rem; background: var(--mcedc-card); color: var(--mcedc-ink); }
.mcedc-gate-fld input:focus { outline: 2px solid var(--mcedc-blue); outline-offset: 1px; border-color: var(--mcedc-blue); }
.mcedc-gate-card .mcedc-form-error { text-align: left; margin: 0 0 12px; }
.mcedc-gate-card .mcedc-btn-primary { width: 100%; justify-content: center; margin-top: 4px; }
.mcedc-pwreq { list-style: none; margin: 0 0 14px; padding: 10px 12px; text-align: left; background: var(--mcedc-cream); border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); display: flex; flex-direction: column; gap: 5px; }
.mcedc-pwreq li { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--mcedc-muted); }
.mcedc-pwreq li.is-met { color: var(--mcedc-green, #1a8f5f); }
.mcedc-pwreq-ic { display: inline-flex; width: 16px; justify-content: center; font-weight: 700; }
.mcedc-pwreq-note { text-align: left; margin: -6px 0 12px; font-size: .78rem; color: var(--mcedc-muted); }
.mcedc-gate-check { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: .85rem; color: var(--mcedc-ink); cursor: pointer; }
.mcedc-gate-check input { width: 16px; height: 16px; }
.mcedc-gate-link { display: inline-block; margin-top: 14px; background: none; border: 0; padding: 0; color: var(--mcedc-blue); font-size: .85rem; text-decoration: underline; cursor: pointer; }
.mcedc-gate-link:hover { color: var(--mcedc-navy); }
.mcedc-gate-forgot { margin-top: 12px; padding: 12px 14px; text-align: left; background: var(--mcedc-cream); border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); color: var(--mcedc-ink); font-size: .88rem; }
.mcedc-gate-forgot p { margin: 0; }

/* =========================================================================
   Responsive — mobile-first above; widen at tablet/desktop.
   ========================================================================= */
@media (min-width: 720px) {
    .mcedc-header { padding: 8px 24px; }
    .mcedc-user-name { display: inline; }
    .mcedc-main { padding: 24px 24px 72px; }
    .mcedc-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (min-width: 1000px) {
    /* Static, collapsible rail that ANIMATES its width. Collapsed (default) =
       0-width & hidden so the content pane takes the whole width; expanded
       (is-open) = 280px rail. The content pane reflows with the animated width. */
    .mcedc-hamburger { display: none; }
    .mcedc-sidebar { position: static; transform: none; height: auto; box-shadow: none; overflow: hidden; flex: none;
        transition: width .22s ease, padding .22s ease, visibility 0s linear .22s; }
    .mcedc-sidebar:not(.is-open) { width: 0; padding-left: 0; padding-right: 0; border-right: 0; visibility: hidden; }
    .mcedc-sidebar.is-open { width: 280px; max-width: none; visibility: visible; transition: width .22s ease, padding .22s ease; }
    .mcedc-scrim { display: none; }
    .mcedc-body { align-items: stretch; }
    /* Re-open caret: first item in the breadcrumb, on the light content pane. */
    .mcedc-sidebar-open { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; margin-right: 4px; background: none; border: 1px solid var(--mcedc-line); border-radius: 7px; color: var(--mcedc-muted); cursor: pointer; vertical-align: middle; }
    .mcedc-sidebar-open:hover { color: var(--mcedc-navy); border-color: var(--mcedc-blue); background: rgba(47,111,237,.06); }
    .mcedc-sidebar-open svg { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) { .mcedc-sidebar { transition: visibility 0s !important; } }

/* On small screens hide the low-priority list columns. */
@media (max-width: 720px) {
    .mcedc-lhide { display: none; }
}

/* =========================================================================
   Admin / management UI  (unchanged — the admin console still uses these)
   ========================================================================= */
.mcedc-admin-main { max-width: 1960px; }
/* Enterprise two-column console: a left section rail + the content pane. */
.mcedc-admin { display: flex; align-items: flex-start; gap: 28px; }
.mcedc-admin-nav { flex: 0 0 210px; display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--mcedc-card); border: 1px solid var(--mcedc-line); position: sticky; top: 16px; }
.mcedc-admin-navtitle { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .11em; color: var(--mcedc-muted); padding: 8px 12px 8px; }
.mcedc-admin-navbtn {
    width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid transparent;
    padding: 9px 13px; font-weight: 600; font-size: .9rem; color: var(--mcedc-muted); cursor: pointer;
    transition: background .12s, color .12s;
}
.mcedc-admin-navbtn:hover { color: var(--mcedc-navy); background: color-mix(in srgb, var(--mcedc-blue) 6%, transparent); }
.mcedc-admin-navbtn.is-active { color: var(--mcedc-navy); background: color-mix(in srgb, var(--mcedc-header-bg) 9%, transparent); border-left-color: var(--mcedc-header-bg); }
.mcedc-admin-body { flex: 1 1 auto; min-width: 0; }
.mcedc-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--mcedc-line); }
.mcedc-admin-head h1 { color: var(--mcedc-navy); font-size: 1.5rem; }
/* Stack the rail above content on small screens. */
@media (max-width: 719px) {
    .mcedc-admin { flex-direction: column; gap: 16px; }
    .mcedc-admin-nav { flex: none; width: 100%; flex-direction: row; flex-wrap: wrap; position: static; }
    .mcedc-admin-navtitle { width: 100%; padding: 4px 8px; }
    .mcedc-admin-navbtn { width: auto; border-left: 0; border-bottom: 3px solid transparent; }
    .mcedc-admin-navbtn.is-active { border-left: 0; border-bottom-color: var(--mcedc-header-bg); }
}

/* Cap the width so a wide (up to 1960px) content pane doesn't strand the
   right-aligned Actions button far from the row's content. */
.mcedc-table { width: 100%; border-collapse: collapse; background: var(--mcedc-card); border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); overflow: hidden; }
.mcedc-table th { text-align: left; background: var(--mcedc-navy); color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: 10px 12px; }
.mcedc-table td { padding: 10px 12px; border-top: 1px solid var(--mcedc-line); font-size: .92rem; vertical-align: middle; }
.mcedc-ta-r { text-align: right; white-space: nowrap; width: 1%; }
.mcedc-table .mcedc-btn { padding: 5px 12px; font-size: .82rem; }
/* Sortable column header (button styled to match the navy th). */
.mcedc-th-sort { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; color: #fff; font-family: inherit; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.mcedc-th-sort:hover { opacity: .82; }
.mcedc-th-caret { font-size: .66em; line-height: 1; }
.mcedc-th-caret.is-idle { opacity: .45; }
.mcedc-th-sort:hover .mcedc-th-caret.is-idle { opacity: .8; }

/* Effective-access cell (admin Assets/Collections tables) */
.mcedc-acc-list { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; max-width: 460px; }
.mcedc-acc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 7px; border: 1px solid var(--mcedc-line); border-radius: 20px; background: var(--mcedc-sidebar); font-size: .78rem; color: var(--mcedc-ink); max-width: 190px; }
.mcedc-acc-chip > span:last-child, .mcedc-acc-chip { min-width: 0; }
.mcedc-acc-chip .mcedc-gdot { width: 9px; height: 9px; }
.mcedc-acc-user { color: var(--mcedc-muted); }
.mcedc-acc-ico { flex: none; color: var(--mcedc-muted); }
.mcedc-acc-more { font-size: .76rem; color: var(--mcedc-muted); align-self: center; }
.mcedc-acc-none { color: var(--mcedc-muted); }
.mcedc-report-detail { color: var(--mcedc-muted); max-width: 280px; word-break: break-word; }

.mcedc-panel { background: var(--mcedc-card); border: 1px solid var(--mcedc-line); border-top: 3px solid var(--mcedc-header-bg); padding: 22px 24px; margin-bottom: 24px; scroll-margin-top: 16px; }
.mcedc-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mcedc-panel-head h2 { color: var(--mcedc-navy); font-size: 1.15rem; }
.mcedc-subpanel { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--mcedc-line); }
.mcedc-subpanel h3 { color: var(--mcedc-navy); font-size: 1rem; margin-bottom: 8px; }

.mcedc-fld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.mcedc-fld > span { font-size: .8rem; font-weight: 600; color: var(--mcedc-muted); }
.mcedc-fld input, .mcedc-fld select, .mcedc-fld textarea {
    padding: 9px 11px; border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm);
    background: #fff; color: var(--mcedc-ink); width: 100%; max-width: 520px;
}
.mcedc-fld input:focus, .mcedc-fld select:focus, .mcedc-fld textarea:focus { outline: 2px solid var(--mcedc-blue); outline-offset: 1px; }
.mcedc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .mcedc-grid2 { grid-template-columns: 1fr; } }

.mcedc-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 18px; max-height: 360px; overflow-y: auto; border: 1px solid var(--mcedc-line); padding: 14px 16px; background: #fff; }
.mcedc-checklist label, .mcedc-toggle { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.mcedc-toggle input, .mcedc-checklist input { width: auto; }

.mcedc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.mcedc-btn-danger { background: #fff; border-color: var(--mcedc-magenta); color: var(--mcedc-magenta); }
.mcedc-btn-danger:hover { background: var(--mcedc-magenta); color: #fff; border-color: var(--mcedc-magenta); }

.mcedc-notice { padding: 10px 12px; border-radius: var(--mcedc-radius-sm); margin-bottom: 14px; font-size: .9rem; }
.mcedc-notice-error { background: #fdecef; color: #a12048; border: 1px solid #f3c6d2; }
.mcedc-notice-success { background: #e8f7f3; color: #10756a; border: 1px solid #bfe8e0; }
.mcedc-notice-info { background: #eef2fb; color: #2a4a8a; border: 1px solid #cdd9f2; }
.mcedc-notice-warn { background: #fdf5e6; color: #8a5a12; border: 1px solid #f0d9a8; }

.mcedc-filter-bar { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: flex-end; background: var(--mcedc-sidebar); border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); padding: 12px 14px; margin-bottom: 16px; }
.mcedc-filter-bar .mcedc-fld { margin-bottom: 0; }

.mcedc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--mcedc-line); margin-bottom: 16px; }
.mcedc-tabs button { background: none; border: 0; padding: 8px 12px; font-weight: 600; color: var(--mcedc-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.mcedc-tabs button.is-active { color: var(--mcedc-navy); border-bottom-color: var(--mcedc-accent); }

.mcedc-back { background: none; border: 0; color: var(--mcedc-blue); font-weight: 600; padding: 6px 0; }
.mcedc-back:hover { text-decoration: underline; }

.mcedc-variant-admin { border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); padding: 12px 14px; margin-bottom: 10px; }
.mcedc-variant-admin .mcedc-actions { margin-top: 10px; align-items: center; }
.mcedc-variant-admin input[type=file] { max-width: 240px; }
.mcedc-versions { margin-top: 12px; }
.mcedc-versions td, .mcedc-versions th { font-size: .82rem; padding: 6px 10px; }

/* =========================================================================
   Enhancement batch — sidebar footer (trash/gear + storage), detail trash icon
   ========================================================================= */
/* Sidebar as a flex column so the footer pins to the bottom and the tree scrolls. */
.mcedc-sidebar { display: flex; flex-direction: column; overflow: hidden; }
.mcedc-sidebar .mcedc-nav { flex: 1 1 auto; overflow-y: auto; min-height: 0; }
.mcedc-sidebar-footer { flex: none; border-top: 1px solid var(--mcedc-line); margin-top: 8px; padding-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.mcedc-sidebar-icons { display: flex; gap: 8px; }
.mcedc-sideicon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--mcedc-line); background: #fff; border-radius: 8px; color: var(--mcedc-muted); }
.mcedc-sideicon:hover { border-color: var(--mcedc-blue); color: var(--mcedc-navy); }
.mcedc-sideicon.is-active { background: var(--mcedc-navy); color: #fff; border-color: var(--mcedc-navy); }
.mcedc-sideicon svg { width: 18px; height: 18px; }

/* Detail-panel "move to trash" as a pinned round icon, bottom-right of the panel. */
.mcedc-detail-body { padding-bottom: 64px; }
.mcedc-detail-trash { position: absolute; right: 14px; bottom: 14px; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--mcedc-line); background: #fff; border-radius: 50%; color: var(--mcedc-magenta); box-shadow: var(--mcedc-shadow); }
.mcedc-detail-trash:hover { background: var(--mcedc-magenta); color: #fff; border-color: var(--mcedc-magenta); }
.mcedc-detail-trash svg { width: 19px; height: 19px; }

/* ---- Group colours: admin swatch picker + list dot --------------------- */
.mcedc-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.mcedc-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--mcedc-line); padding: 0; }
.mcedc-swatch.is-active { border-color: #fff; box-shadow: 0 0 0 2px var(--mcedc-navy); }
.mcedc-colour-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.mcedc-colour-custom { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--mcedc-muted); cursor: pointer; }
.mcedc-colour-custom input[type=color] { width: 34px; height: 28px; padding: 0; border: 1px solid var(--mcedc-line); border-radius: 7px; background: none; cursor: pointer; }
.mcedc-colour-clear { font-size: .78rem; color: var(--mcedc-muted); background: none; border: none; text-decoration: underline; cursor: pointer; padding: 0; }
.mcedc-colour-clear:hover { color: var(--mcedc-navy); }
.mcedc-cred { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.mcedc-cred-label { flex: none; width: 130px; font-size: .78rem; font-weight: 600; color: var(--mcedc-navy); }
.mcedc-cred-val { flex: 1 1 auto; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 8px 11px; background: var(--mcedc-cream); border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); color: var(--mcedc-ink); font-size: .9rem; }
.mcedc-cred-val.is-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
.mcedc-cred-copy { flex: none; border: 1px solid var(--mcedc-line); background: var(--mcedc-card); color: var(--mcedc-blue); border-radius: var(--mcedc-radius-sm); padding: 8px 12px; font-size: .8rem; font-weight: 600; cursor: pointer; }
.mcedc-cred-copy:hover { border-color: var(--mcedc-blue); background: color-mix(in srgb, var(--mcedc-blue) 8%, var(--mcedc-card)); }
.mcedc-gname { display: inline-flex; align-items: center; gap: 7px; }
.mcedc-gdot { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }

/* ---- Folder access dots + ~2s-hold tooltip (library, managers only) ----- */
.mcedc-access { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; position: relative; }
.mcedc-access-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.mcedc-access-name { font-size: .72rem; color: var(--mcedc-muted); }
.mcedc-access-tip { position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 20; background: var(--mcedc-navy); color: #fff; border-radius: 8px; padding: 7px 10px; font-size: .75rem; white-space: nowrap; display: flex; flex-direction: column; gap: 5px; opacity: 0; pointer-events: none; transition: opacity .12s; box-shadow: var(--mcedc-shadow-lift); }
.mcedc-access:hover .mcedc-access-tip,
.mcedc-access:focus-within .mcedc-access-tip { opacity: 1; transition-delay: .3s; } /* reveal shortly after hover/focus */
.mcedc-access-tip > span { display: flex; align-items: center; gap: 6px; }

/* ---- Inline access editor (files + folders) ---------------------------- */
.mcedc-picker { display: flex; flex-direction: column; gap: 8px; }
.mcedc-picker-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mcedc-pchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border: 1px solid var(--mcedc-line); border-radius: 20px; background: #fff; font-size: .82rem; color: var(--mcedc-ink); }
.mcedc-pchip svg { width: 14px; height: 14px; color: var(--mcedc-muted); }
.mcedc-pchip .mcedc-chip-x { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 0; background: none; border-radius: 50%; color: var(--mcedc-muted); font-size: .8rem; }
.mcedc-pchip:hover .mcedc-chip-x { background: color-mix(in srgb, var(--mcedc-magenta) 15%, transparent); color: var(--mcedc-magenta); }
.mcedc-picker-search { padding: 8px 11px; border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); background: #fff; color: var(--mcedc-ink); }
.mcedc-picker-search:focus { outline: 2px solid var(--mcedc-blue); outline-offset: 1px; }
.mcedc-picker-results { border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); max-height: 200px; overflow-y: auto; background: #fff; }
.mcedc-picker-opt { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 11px; font-size: .88rem; color: var(--mcedc-ink); border-bottom: 1px solid var(--mcedc-line); }
.mcedc-picker-opt:last-child { border-bottom: 0; }
.mcedc-picker-opt:hover { background: color-mix(in srgb, var(--mcedc-blue) 10%, transparent); }
.mcedc-picker-opt svg { width: 15px; height: 15px; color: var(--mcedc-muted); }
.mcedc-picker-none { padding: 8px 10px; margin: 0; }
.mcedc-access-note { margin-top: 8px; font-size: .78rem; }
.mcedc-access-save { margin-top: 10px; }
.mcedc-daccess { margin-top: 20px; border-top: 1px solid var(--mcedc-line); padding-top: 14px; }
.mcedc-cascade-note { margin-bottom: 14px; font-size: .85rem; color: var(--mcedc-muted); }

/* Inherited (read-only) access list, shown above the direct-grant editor. */
.mcedc-inherited { margin-bottom: 14px; }
.mcedc-inh-head { margin: 0 0 7px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mcedc-muted); }
.mcedc-inh-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.mcedc-inh-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; background: var(--mcedc-sidebar); border: 1px solid var(--mcedc-line); border-radius: 9px; }
.mcedc-inh-item > svg { width: 15px; height: 15px; color: var(--mcedc-muted); flex: none; }
.mcedc-inh-item .mcedc-gdot { flex: none; }
.mcedc-inh-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mcedc-inh-name { font-size: .86rem; color: var(--mcedc-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcedc-inh-sub { font-size: .72rem; color: var(--mcedc-muted); }
.mcedc-inh-item.is-revoked { opacity: .72; }
.mcedc-inh-item.is-revoked .mcedc-inh-name { text-decoration: line-through; color: var(--mcedc-muted); }
.mcedc-inh-item.is-revoked .mcedc-inh-sub { color: var(--mcedc-magenta); }
.mcedc-revoke { color: var(--mcedc-magenta); flex: none; }
.mcedc-undo { color: var(--mcedc-blue); flex: none; }
.mcedc-revoke-scope { margin-bottom: 9px; font-size: .8rem; color: var(--mcedc-muted); }

/* Built-in Administrator role: locked, blue "blueprint" row. */
.mcedc-role-protected { background: color-mix(in srgb, var(--mcedc-blue) 7%, transparent); }
.mcedc-role-protected td:first-child { box-shadow: inset 3px 0 0 var(--mcedc-blue); }
.mcedc-rolename { display: inline-flex; align-items: center; gap: 8px; }
.mcedc-role-protected .mcedc-rolename { color: var(--mcedc-blue); font-weight: 600; }
.mcedc-role-lock { font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--mcedc-blue); border-radius: 20px; padding: 2px 8px; }

/* "Preview as" switcher + banner. */
.mcedc-preview-btn { display: inline-flex; align-items: center; gap: 6px; }
.mcedc-preview-btn svg { width: 15px; height: 15px; }
.mcedc-preview-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 9px 16px; background: var(--mcedc-navy); color: #fff; font-size: .86rem; }
.mcedc-preview-bar svg { width: 17px; height: 17px; flex: none; }
.mcedc-preview-bar > span { flex: 1; }
.mcedc-preview-bar b { font-weight: 700; }
.mcedc-preview-exit { border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; border-radius: 20px; padding: 4px 14px; font-weight: 600; font-size: .8rem; cursor: pointer; }
.mcedc-preview-exit:hover { background: rgba(255,255,255,.14); }
.mcedc-preview-people { max-height: 300px; margin-top: 10px; }
.mcedc-pchip-toggle { cursor: pointer; }
.mcedc-pchip-toggle.is-on { border-color: var(--mcedc-blue); background: color-mix(in srgb, var(--mcedc-blue) 12%, #fff); color: var(--mcedc-navy); }
.mcedc-sechead-sub { margin: 0 0 8px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--mcedc-muted); }

/* ---- Folder tile ⋯ menu ------------------------------------------------- */
.mcedc-folder-wrap { position: relative; display: flex; width: 100%; }
.mcedc-folder.has-menu .mcedc-folder-foot { padding-right: 52px; } /* room for the kebab in the footer */
/* Above the name tooltip (z 30): the kebab creates a stacking context, so its
   open dropdown menu must sit above the tooltip, not be trapped beneath it. */
.mcedc-folder-kebab { position: absolute; bottom: 10px; right: 8px; z-index: 40; }

/* Edit-folder modal: accent swatch picker + featured-image preview box. */
.mcedc-accent-row { display: flex; flex-wrap: wrap; gap: 10px; }
.mcedc-accent-sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px rgba(0,0,0,.12) inset; cursor: pointer; padding: 0; transition: transform .1s; }
.mcedc-accent-sw:hover { transform: scale(1.08); }
.mcedc-accent-sw.is-active { border-color: var(--mcedc-navy); box-shadow: 0 0 0 2px #fff inset, 0 0 0 1px rgba(0,0,0,.12); }
.mcedc-fpreview { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mcedc-fpreview-box { position: relative; flex: none; width: 148px; aspect-ratio: 16 / 10; background: var(--mcedc-sidebar) center center / cover no-repeat; border: 1px solid var(--mcedc-line); overflow: hidden; }
/* The box clips overflow, so keep the mini triangle flush at the bottom edge. */
.mcedc-fpreview-box .mcedc-folder-tri { width: 34px; height: 34px; bottom: 0; }
.mcedc-fpreview-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
/* Cross-tile: while a folder's ⋯ menu is open, lift its whole tile above the
   sibling tiles (which paint later in DOM order) so the open dropdown is never
   overlapped by the kebab/content of the folder rendered below it. */
.mcedc-folders > li:has(.mcedc-dd-panel) { position: relative; z-index: 50; }

/* Full folder name on hover — a fast, readable custom tooltip (the native
   `title` was small + slow ~1s). Shows the complete name (wraps) ABOVE the tile. */
.mcedc-folder-tip {
    position: absolute; left: 6px; right: 6px; bottom: calc(100% + 4px); z-index: 30;
    background: var(--mcedc-navy); color: #fff; border-radius: 8px;
    padding: 8px 11px; font-size: .86rem; line-height: 1.32; font-weight: 600;
    white-space: normal; word-break: break-word;
    opacity: 0; transform: translateY(3px); pointer-events: none;
    transition: opacity .1s ease, transform .1s ease;
    box-shadow: var(--mcedc-shadow-lift);
}
/* Reveal on hovering/focusing anywhere on the tile (so moving toward the ⋯ kebab
   keeps it) — it is hidden ONLY when the folder's menu is actually OPEN (below). */
.mcedc-folder-wrap:hover .mcedc-folder-tip,
.mcedc-folder-wrap:focus-within .mcedc-folder-tip { opacity: 1; transform: translateY(0); transition-delay: .1s; }
/* Hide the name tooltip while this folder's ⋯ menu is open (i.e. after the user
   clicks the options button) — not merely on kebab hover. Wins by source order
   over the reveal rule above; :has scopes it to the folder whose menu is open. */
.mcedc-folder-wrap:has(.mcedc-dd-panel) .mcedc-folder-tip { opacity: 0; transition-delay: 0s; }

/* ---- Custom fields (upload metadata + detail quick-edit) --------------- */
.mcedc-req { color: var(--mcedc-magenta); font-weight: 700; }
.mcedc-hint { margin: 2px 0 0; font-size: .78rem; color: var(--mcedc-muted); }
.mcedc-applyall { margin-top: 6px; }
.mcedc-stepper { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; padding: 8px 10px; background: var(--mcedc-sidebar); border: 1px solid var(--mcedc-line); border-radius: var(--mcedc-radius-sm); }
.mcedc-stepper-lbl { flex: 1; text-align: center; font-size: .84rem; color: var(--mcedc-muted); }
.mcedc-stepper-lbl b { color: var(--mcedc-ink); }
.mcedc-dcustom { margin-top: 20px; border-top: 1px solid var(--mcedc-line); padding-top: 14px; }
.mcedc-cfedit { display: flex; flex-direction: column; gap: 10px; }

/* ---- Sidebar storage meter -------------------------------------------- */
.mcedc-storage { padding: 12px 14px 10px; border-top: 1px solid var(--mcedc-line); }
.mcedc-storage-bar { display: flex; height: 8px; border-radius: 5px; overflow: hidden; background: var(--mcedc-line); }
.mcedc-storage-seg { height: 100%; min-width: 2px; }
.mcedc-storage-label { margin-top: 7px; font-size: .78rem; color: var(--mcedc-muted); }
.mcedc-storage.is-low .mcedc-storage-label { color: var(--mcedc-magenta); font-weight: 600; }
.mcedc-storage-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.mcedc-storage-legend li { display: flex; align-items: center; gap: 7px; font-size: .74rem; color: var(--mcedc-muted); }
.mcedc-storage-dot { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.mcedc-storage-lname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcedc-storage-lsize { flex: none; font-variant-numeric: tabular-nums; }
.mcedc-storage-low { margin-top: 10px; padding: 9px 11px; border-radius: var(--mcedc-radius-sm); background: color-mix(in srgb, var(--mcedc-magenta) 12%, transparent); border: 1px solid color-mix(in srgb, var(--mcedc-magenta) 35%, transparent); color: var(--mcedc-ink); font-size: .78rem; line-height: 1.4; }
.mcedc-storage-low :where(p):first-child { margin-top: 0; }
.mcedc-storage-low :where(p):last-child { margin-bottom: 0; }
.mcedc-storage-low a { color: var(--mcedc-magenta); }

/* custom */

header.mcedc-header {padding:16px 20px;padding-right:80px;}

header.mcedc-header::before {
    content: '' !important;
    position: absolute !important;
    display: block !important;
    top: 10 !important;
    right: 0 !important;
    width: 40px !important;
    height: 70px !important;
    background: #38a5d1;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
    z-index: 999 !important;
    pointer-events: none;
}

body.mcedc-dam-app.customize-support {margin-top: 0px!important;}

p.mcedc-notice.mcedc-notice-success {
    margin-top: 20px!important;
    padding: 10px!important;
}

p.mcedc-result-count {
    margin-top: 20px!important;
}

.mcedc-bulkbar .mcedc-btn {
    background: #00568d;
    color: #fff!important;
}

main#mcedc-main {
    background: #fff!important;
}

.mcedc-sechead {
    font-size: 28px;
    font-weight: 600;
    margin-top: 30px!important;
    margin-bottom: 30px!important;
}

.mcedc-sechead {
    max-width: 403px;
    padding: 10px;
    padding-left: 29px;
    margin-left: -24px;
}

/* files */

.mcedc-card {
    border-top: solid 4px #459b8d;
}


.mcedc-sechead {
    color:#fff;
    margin-left: -25px!important;
    min-width: 403px!important;
}

/* folder */

ul.mcedc-folders li{
        border-top: solid 4px #1d97d5;
}

.mcedc-sechead:first-child {
    background: #009a8c;
}


/* files */

.mcedc-sechead {
    background:#0a96d4;
}

.mcedc-sechead {
    /* 24px diagonal cut at the bottom-right */
    clip-path: polygon(
        0 0,
        100% 0,
        100% calc(100% - 100%),
        calc(100% - 34px) 100%,
        0 100%
    );
}

.mcedc-detail-body .mcedc-sechead{min-width:unset!important;background:transparent!important;padding:10px 20px!important;color:#000;font-size:16px;margin-top: 5px!important;margin-bottom: 5px!important;}

h2.mcedc-detail-title {
    font-size: 17px;
}

.mcedc-btn-primary {
    background: #01568d;
    border-color: #01568d;
    color: #fff;
}

.mcedc-meta-row dt {
    color: #000;
}

.mcedc-dd.mcedc-fpill-wrap button{
    min-height: 44px;
}

.mcedc-viewseg {
    height: 44px;
}

.mcedc-fpreview-box span.mcedc-folder-tri {
    bottom: -25px;
    height: 49px;
}

ul.mcedc-folders li,.mcedc-card {
    box-shadow: 0px 0px 10px #00000029;
}

header.mcedc-header {
    background-image: url(/wp-content/plugins/mcedc-dam/assets/img/subheader.jpg);
    background-size: cover;
    background-position: center;
}


/* END - custom */