/* ── Server connections modal ───────────────────────────────────── */
/* A connection row is a .project-row sibling; only the connection-specific bits differ. */
/* A real default height even while empty, not a stub (user report; desktop parity: its list
   box holds the same room). */
#connect-list { min-height: 170px; }
.connect-row {
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px; border: 1px solid var(--border-main); border-radius: 8px;
    margin-bottom: 8px; background: var(--input-bg);
}
.connect-row:hover { background: var(--bg-info); }
/* Admin credential: the golden outline + badge (--remote-gold). Transient row states are
   declared after it, so they still win the border. */
.connect-row.connect-admin {
    border-color: var(--remote-gold);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--remote-gold) 55%, transparent);
}
.connect-admin-badge {
    display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto;
    color: var(--remote-gold); font-weight: 600; font-size: 12px;
}
.connect-admin-badge .ic { color: var(--remote-gold); }
/* The filter sits inline at the right and wraps below the heading on a narrow modal. */
.connect-section-row { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: 14px 0 6px; }
.connect-section-row .vs-section { flex: 1 1 auto; min-width: 0; margin: 0; }
/* Sized to the heading: the native select and the customSelect.js trigger that replaces it. */
.connect-section-row .modal-filter,
.connect-section-row .cs-dd .accent-dd-trigger {
    flex: 0 0 auto; max-width: 100%; padding: 3px 8px; font-size: 12px; border-radius: 6px;
}
.connect-section-row .cs-dd { flex: 0 0 auto; max-width: 100%; }
/* Touch keeps the app's ≥40px tap target; the row wraps to make room. */
@media (hover: none) and (pointer: coarse) {
    .connect-section-row .cs-dd .accent-dd-trigger { min-height: 40px; padding: 6px 10px; }
}
.connect-row.connect-selected { border-color: var(--accent); background: var(--bg-info); }
.connect-select { flex: 0 0 auto; width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.connect-grip { flex: 0 0 auto; cursor: grab; color: var(--text-muted); letter-spacing: -3px; user-select: none; font-size: 12px; line-height: 1; padding: 0 2px; }
.connect-row.connect-dragging { opacity: 0.3; }
.connect-row.connect-drop-before { box-shadow: 0 -4px 0 -1px var(--accent); }
.connect-row.connect-drop-after { box-shadow: 0 4px 0 -1px var(--accent); }
/* One line, the count first: a wrapping bar leapt a line taller mid-reveal. Only the actions
   may wrap, among themselves. */
.connect-batch-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: nowrap;
    padding: 6px 10px; margin-bottom: 8px; border-radius: 8px; background: var(--bg-info);
    border: 1px solid var(--border-main);
}
/* The count and selection group slide open under overflow:hidden (revealControls), so neither
   may wrap or shrink; cf. .projects-batch-selected. */
.connect-batch-count { font-size: 13px; font-weight: 600; color: var(--text-key); white-space: nowrap; }
.connect-batch-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
/* Compact (6px 10px) on every button in the strip: at the default padding the actions wrapped
   and the nested ones stood 4px taller, growing the bar (user report). */
.connect-batch-actions button { white-space: nowrap; flex: 0 0 auto; padding: 6px 10px; }
.connect-batch-selected {
    display: inline-flex; align-items: center; gap: 6px;
    flex-wrap: nowrap; white-space: nowrap;
}
.connect-batch-selected > button { flex: 0 0 auto; }
.connect-row .connect-url { flex: 1 1 auto; display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* Connection-status dot: green=connected, yellow=connecting/refreshing, red=error. */
.conn-status { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 18%, transparent); }
.conn-status-connected { background: #28a745; color: #28a745; }
.conn-status-connecting { background: #e0a800; color: #e0a800; animation: statusPulse 1s ease-in-out infinite; }
.conn-status-error, .conn-status-disconnected { background: #dc3545; color: #dc3545; }
/* Expired: amber, not red — the server answers; it no longer knows the saved token. */
.conn-status-expired { background: #e0a800; color: #e0a800; }
.connect-row.connect-expired { border-color: #e0a800; background: color-mix(in srgb, #e0a800 8%, var(--input-bg)); }
/* Icon-only here (desktop parity); its state shows by colour alone, amber like the row. */
.connect-row.connect-expired .connect-reconnect-one:not(:disabled) { background: #e0a800; color: #1f1f1f; }
.connect-row.connect-expired .connect-reconnect-one:hover:not(:disabled) { background: #c99400; }
@keyframes statusPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.connect-row .connect-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.connect-row .connect-url .ic { color: var(--remote-gold); flex: 0 0 auto; }
/* Per-row icon buttons: the app's filled button chrome, compact (.danger for disconnect). */
.connect-row .connect-reconnect-one,
.connect-row .connect-invite,
.connect-row .connect-disconnect {
    flex: 0 0 auto;
    padding: 5px 8px;
    border-radius: 4px;
}
/* input[type=text] outranked this class and the editor stood 34px tall where the top and
   desktop editors are compact (user report); scoped to the wrap so the weight is beyond doubt. */
.project-rename-wrap input.project-name-edit {
    padding: 1px 6px;
    height: 24px;
    font-size: 13px;
    line-height: 1;
}
.project-name-edit {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-key);
    background: var(--bg-info);
    border: 1px solid var(--border-main);
    border-radius: 4px;
    padding: 1px 6px;
    /* min-width: 0 so a long name shrinks the field instead of pushing the ✓/✗ chips out. */
    flex: 1 1 auto;
    min-width: 0;
    box-sizing: border-box;
}

/* ── Links modal (source/resource + add-by-URL) ─────────────────── */
.links-field { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; min-width: 0; }
.links-field input[type="text"] { flex: 1 1 auto; min-width: 0; }
.vs-row input[type="text"],
.vs-row input[type="url"],
.vs-row input[type="password"] {
    flex: 1 1 auto;
    min-width: 0;
    background-color: var(--bg-info);   /* not the shorthand — keeps the hover sweep sizing */
    color: var(--text-main);
    border: 1px solid var(--border-main);
    border-radius: 4px;
    padding: 4px 7px;
    font-size: 12.5px;
}
.links-open, .links-clear {
    flex: 0 0 auto;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid var(--border-main) !important;
    border-radius: 4px;
    cursor: pointer;
    background: var(--bg-info);
    color: var(--text-main);
}
/* Solid danger chip: the glyph stays white on hover; a red glyph on the red fill read as a
   greyed-out × (user report). */
.links-clear.danger { color: #fff; border-color: var(--danger) !important; }
.links-clear.danger:hover { border-color: var(--danger-2) !important; color: #fff; }
.links-preview-wrap {
    margin: 8px 4px 0;
    padding: 8px;
    border: 1px solid var(--border-coord);
    border-radius: 6px;
    text-align: center;
}
.links-preview-wrap img, .links-preview-wrap video { max-width: 100%; max-height: 240px; border-radius: 4px; }
.links-preview-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.links-frame-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.links-frame-row input[type="range"] { flex: 1 1 auto; min-width: 0; }
.links-frame-num { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.links-frame-num input[type="number"] { width: 5.5em; }
