/* Batch-select toolbar — appears once rows are checked. */
.projects-batch-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 8px 18px; border-bottom: 1px solid var(--border-main); background: var(--bg-info);
}
/* Never re-flows while its slot closes (max-width to zero under overflow: hidden). */
.projects-batch-count { font-size: 13px; font-weight: 600; color: var(--text-key); white-space: nowrap; }
.projects-batch-actions > button { white-space: nowrap; flex: 0 0 auto; }
.projects-batch-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* At rest the group wraps, so a narrow modal never cuts "Remove selected" off (user report);
   only while its slot slides does it hold one line. */
.projects-batch-selected {
    display: inline-flex; align-items: center; gap: 6px;
    flex-wrap: wrap; white-space: nowrap;
}
.projects-batch-selected.reveal-group-transition { flex-wrap: nowrap; }
.projects-batch-selected > button { flex: 0 0 auto; }
.projects-batch-actions button:disabled { opacity: 0.45; cursor: default; }
.project-thumb {
    width: 56px; height: 56px; flex: 0 0 56px; border-radius: 6px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-info); border: 1px solid var(--border-main);
}
.project-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.project-thumb-placeholder { font-size: 24px; color: var(--text-muted); }
/* z-index must clear the modal overlay (100001). */
.project-thumb-zoom {
    position: fixed; z-index: 100002; display: none; pointer-events: none;
    padding: 0; background: var(--input-bg); border-radius: 0;   /* the picture edge to edge in one hairline */
    border: 1px solid var(--border-main); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
    /* positionZoom pins the box per move; the clip covers a picture not yet shrunk. */
    overflow: hidden;
    transform-origin: left top;   /* Transition's grow (motion/control/tips.js): it sits below-right of the pointer */
}
/* A glance, not a lightbox: quarter width / fifth height keep the list readable; `width: auto`
   lets the height cap bind on portraits. */
.project-thumb-zoom img {
    display: block;
    width: auto;
    height: auto;
    max-width: 25vw;
    max-height: 20vh;
    object-fit: contain;
}
/* Alt doubles the glance, and its caps with it. */
.project-thumb-zoom-xl img { max-width: 50vw; max-height: 40vh; }
.project-info { flex: 1; min-width: 0; position: relative; }
.project-name { font-weight: 600; font-size: 14px; color: var(--project-name-fg, #80868f); text-shadow: var(--project-name-shadow, 0 1px 2px rgba(0,0,0,0.55)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* One baseline and gap for the date, expiry and server badge. */
.project-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; }
.project-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; opacity: 0.85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-sub.project-expired { color: var(--danger); font-weight: 600; }
.project-sub.project-expiring { color: var(--warning); font-weight: 600; }
.project-open-elsewhere { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); }
.project-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.project-row.project-clickable { cursor: pointer; }
.project-row.is-opening { opacity: 0.6; pointer-events: none; }
.project-switch:disabled { opacity: 0.6; cursor: default; }
.project-row.project-incognito { border-color: var(--accent); border-style: dashed; }
.project-row.project-incognito .project-name { color: var(--accent); }
/* Server-stored projects: golden outline + badge; --remote-gold defaults to the logo yellow. */
:root { --remote-gold: #d4a017; }
.project-row.project-remote {
    border-color: var(--remote-gold);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--remote-gold) 55%, transparent);
}
/* Golden cue lives on the row block only — the thumbnail keeps its neutral border. */
.project-remote-badge {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--remote-gold); font-weight: 600;
}
.project-remote-badge .ic { color: var(--remote-gold); }

/* File-origin projects: bronze outline + file badge, warmer than the server gold so the two don't blur. */
:root { --file-bronze: #c1783c; }
.project-row.project-file {
    border-color: var(--file-bronze);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--file-bronze) 60%, transparent);
}
.project-file-badge {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--file-bronze); font-weight: 600;
}
.project-file-badge .ic { color: var(--file-bronze); }

/* Pill toggle: accent-outlined when off, accent-filled when on; the hidden checkbox holds the state. */
.pill-toggle {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; font-weight: 600; cursor: pointer; user-select: none;
    padding: 5px 10px; border-radius: 6px;
    /* The theme's own ink inside an accent outline (user decision; desktop twin: QCheckBox#formulaPill). */
    border: 1px solid var(--ui-outline); color: var(--text-main);
    background: transparent;
    transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.pill-toggle:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pill-toggle > input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.pill-toggle.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* Local projects: a muted globe badge, no outline — the neutral third state. */
.project-local-badge {
    display: inline-flex; align-items: center; gap: 4px;
    color: var(--text-muted, #8b93a7); font-weight: 500;
}
.project-local-badge .ic { color: var(--text-muted, #8b93a7); }

/* Move-between-storage buttons: gold tint to read as "to/from server". */
.project-to-server:hover, .project-to-local:hover { color: var(--remote-gold); border-color: var(--remote-gold); }
.project-to-server:disabled, .project-to-local:disabled { opacity: 0.6; cursor: default; }

/* Transition: a row leaves out the list's left edge and an arrival slides in from it, the way Sliding pours
   them (projects/list/rowMotion.js); the list clips both. */
:root[data-motion="transition"] #projects-list > .leaving { animation-name: rowSlideLeave; }
:root[data-motion="transition"] #projects-list > .leaving.leave-hold { animation-name: rowSlideAway; }
:root[data-motion="transition"] #projects-list > .materializing { animation-name: rowSlideIn; }
:root[data-motion="transition"] #projects-list > .materializing.materialize-in-place { animation-name: rowSlideInPlace; }
