/* ═══════════════════════════════════════════════════════════════════════════
   staffmeetings.css — the Staff meetings tab (Run 65, E2c). Rendered by
   staffmeetings.js. Dark-only, like the rest of the panel.
   ⚠ Titles, notes and names are typed by staff and very often Arabic inside
   this English page: titles and notes carry dir="auto" in the markup AND
   `unicode-bidi: plaintext` here (`.sm-text`), names are <bdi>.
   ⚠ No list here is a `.data-table`: a chip inside a truncating cell paints
   nothing while every DOM assertion passes (Run 33/36) — rows and cards wrap.
   ═══════════════════════════════════════════════════════════════════════════ */

.sm-root { display: block; }
/* admin.css styles `.link-like` by colour only, so a <button class="link-like"> keeps the
   browser's grey box — measured on the rendered page. This tab's text buttons (← All
   meetings, Details →, Select all) and the class window's "Transcript & review →"
   (admin.js #apptReviewLink, Run 65 — the twin of the Meet bot line's link, which
   Run 60 F4 took off classroom classes and Run 62 removed with the bot) read as links. */
.sm-root button.link-like, #apptReviewLink {
    background: none; border: none; padding: 0; font: inherit;
    color: var(--accent-light); cursor: pointer;
}
.sm-root button.link-like:hover, #apptReviewLink:hover { text-decoration: underline; }
#apptReviewLink { font-weight: 600; font-size: 0.88rem; }
.appt-review-status { display: inline; margin: 0 0 0 6px; }
.sm-card-panel .panel-header { gap: var(--space-md); flex-wrap: wrap; }
.sm-card-panel .panel-title { overflow-wrap: anywhere; min-width: 0; }
.sm-head-meta { color: var(--text-secondary); font-size: 0.84rem; }
.sm-muted { color: var(--text-secondary); font-size: 0.84rem; }
.sm-error { color: #FCA5A5; font-size: 0.86rem; line-height: 1.5; }
.sm-error:empty { display: none; }
.sm-empty { padding: var(--space-md) 0; }
.sm-text { unicode-bidi: plaintext; }
.sm-notice {
    color: #FCD34D; font-size: 0.86rem; line-height: 1.5; margin-bottom: var(--space-md);
    padding: 10px 12px; border-radius: var(--radius-sm);
    background: rgba(245, 158, 11, 0.10); border: 1px solid rgba(245, 158, 11, 0.25);
}
/* An information note (not a warning): the zero-area line, the cameras note. */
.sm-notice-info { color: #C7D2FE; background: rgba(99, 102, 241, 0.10); border-color: rgba(99, 102, 241, 0.28); }

/* ── chips ── */
.sm-chip {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 0.72rem; font-weight: 600; font-family: var(--font-display); letter-spacing: 0.02em;
    white-space: nowrap; vertical-align: middle;
    background: rgba(148, 163, 194, 0.15); color: #C3CAE0;
}
.sm-chip-ok { background: rgba(34, 197, 94, 0.15); color: #4ADE80; }
.sm-chip-warn { background: rgba(245, 158, 11, 0.15); color: #FBBF24; }
.sm-chip-bad { background: rgba(239, 68, 68, 0.15); color: #F87171; }
.sm-chip-live { background: rgba(99, 102, 241, 0.18); color: #A5A8FF; }
.sm-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

/* ── My meetings: cards ── */
.sm-cards { list-style: none; display: flex; flex-direction: column; gap: var(--space-md); }
.sm-card {
    padding: 14px 16px; border-radius: var(--radius-md);
    background: rgba(17, 24, 39, 0.5); border: 1px solid var(--border-default);
    transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}
.sm-card-hit { border-color: rgba(165, 168, 255, 0.85); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); }
.sm-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-md); flex-wrap: wrap; }
.sm-card-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 240px; }
.sm-title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--text-primary); overflow-wrap: anywhere; }
.sm-when { color: var(--text-secondary); font-size: 0.82rem; }
.sm-card-body { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.sm-card-body .sm-kv + .sm-kv { margin-top: 0; }   /* the column's gap already spaces them */
.sm-card-foot { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-md); }
.sm-details { font-size: 0.86rem; }

/* key / value rows (cards and the meeting page) */
.sm-kv { display: flex; gap: var(--space-md); font-size: 0.88rem; line-height: 1.5; }
.sm-kv + .sm-kv { margin-top: 6px; }
.sm-kv > span:first-child { flex: 0 0 96px; color: var(--text-secondary); }
.sm-kv > span:last-child { color: var(--text-primary); min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.sm-label { display: block; color: var(--text-secondary); font-size: 0.84rem; margin-bottom: 4px; }
.sm-line { font-size: 0.88rem; line-height: 1.55; color: var(--text-primary); overflow-wrap: anywhere; }
.sm-line + .sm-line { margin-top: 6px; }

/* ── Join ── */
.sm-join-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px var(--space-md); }
.sm-join:disabled { opacity: 0.5; cursor: not-allowed; }
.sm-join-opens, .sm-join-note { font-size: 0.84rem; }
.sm-join-msg { margin-top: 6px; color: #FCD34D; font-size: 0.84rem; line-height: 1.5; flex-basis: 100%; }
.sm-detail-join { margin-top: var(--space-md); }

/* ── recordings ── */
.sm-rec { margin-top: 4px; }
.sm-rec-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; font-size: 0.9rem; }
.sm-rec-link { color: var(--accent-light); font-weight: 600; }
.sm-rec-link:hover { text-decoration: underline; }
.sm-sep { color: var(--text-muted); }
/* The anyone-with-link warning (S4 / O9, the Run 17 condition): its own style,
   never a run-on continuation of the link line (the Run 28/34 cold-read defect). */
.sm-rec-warn {
    margin-top: 6px; padding: 6px 10px; border-radius: var(--radius-sm);
    font-size: 0.8rem; line-height: 1.5; color: #FBBF24;
    background: rgba(245, 158, 11, 0.10); border: 1px solid rgba(245, 158, 11, 0.25);
}
.sm-rec-line { font-size: 0.88rem; line-height: 1.55; color: var(--text-primary); }
.sm-rec-line + .sm-rec-line, .sm-rec-links + .sm-rec-line, .sm-rec-warn + .sm-rec-line { margin-top: 6px; }
.sm-rec-head { color: var(--text-secondary); }
.sm-rec-error { color: #FCA5A5; }

/* ── All meetings: rows ── */
.sm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm) var(--space-md); margin-bottom: var(--space-md); }
.sm-search { flex: 1 1 220px; min-width: 0; max-width: 360px; }
.sm-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-sm); }
.sm-row {
    display: grid; width: 100%; text-align: left; cursor: pointer;
    grid-template-columns: minmax(180px, 1.2fr) minmax(200px, 2fr) auto; gap: 6px var(--space-lg); align-items: center;
    padding: 14px 16px; border-radius: var(--radius-md);
    background: rgba(17, 24, 39, 0.5); border: 1px solid var(--border-default);
    color: var(--text-primary); font: inherit; font-size: 0.88rem;
    transition: border-color var(--duration-fast), background var(--duration-fast);
}
.sm-row:hover, .sm-row:focus-visible { border-color: rgba(123, 128, 212, 0.45); background: rgba(46, 49, 146, 0.08); outline: none; }
.sm-row-head { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sm-row-who { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }

/* ── one meeting ── */
.sm-back-row { margin-bottom: var(--space-md); }
.sm-actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; margin-top: var(--space-md); }
.sm-danger { color: #FCA5A5; border-color: rgba(239, 68, 68, 0.35); }
.sm-danger:hover { border-color: rgba(239, 68, 68, 0.7); }
.sm-cancel-box {
    margin-top: var(--space-md); padding: 12px 14px; border-radius: var(--radius-md);
    border: 1px solid rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.06);
}
.sm-cancel-box .detail-label { display: block; width: auto; margin-bottom: 6px; }
.sm-people-list { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; }
.sm-person { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* ── the form ── */
.sm-form > * + * { margin-top: var(--space-md); }
.sm-field .detail-label { display: block; width: auto; margin-bottom: 6px; }
.sm-field .filter-input, .sm-field .filter-select { width: 100%; max-width: 520px; }
.sm-field-row { display: flex; flex-wrap: wrap; gap: var(--space-md) var(--space-xl); }
.sm-field-row > .sm-field { flex: 1 1 240px; min-width: 0; }
.sm-length { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.sm-length .filter-select { flex: 1 1 140px; max-width: 220px; }
.sm-length .sm-length-custom { flex: 1 1 150px; max-width: 220px; }
.sm-textarea { min-height: 72px; resize: vertical; font: inherit; padding-top: 10px; }
.sm-invite-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px var(--space-md); }
.sm-invite-head .detail-label { margin-bottom: 0; }
.sm-field .field-hint + .sm-notice, .sm-field .field-hint + .sm-people-search,
.sm-field .sm-notice + .sm-people-search, .sm-invite-head + .field-hint, .sm-invite-head + .sm-notice,
.sm-invite-head + .sm-people-search { margin-top: 8px; }
.sm-people-search { max-width: 360px !important; }
.sm-people {
    margin-top: 10px; max-height: 360px; overflow-y: auto;
    padding: 4px 10px; border-radius: var(--radius-md);
    border: 1px solid var(--border-default); background: rgba(17, 24, 39, 0.35);
}
.sm-group { padding: 8px 0; }
.sm-group + .sm-group { border-top: 1px solid var(--border-default); }
.sm-group-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-md); margin-bottom: 4px; }
.sm-group-title { font-family: var(--font-display); font-weight: 600; font-size: 0.86rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.04em; }
.sm-select-all { font-size: 0.84rem; }
.sm-person-row { padding: 6px 0; min-height: 32px; }

@media (max-width: 760px) {
    .sm-row { grid-template-columns: 1fr; }
    .sm-row .sm-chips { justify-content: flex-start; }
    .sm-kv { flex-direction: column; gap: 0; }
    .sm-kv > span:first-child { flex-basis: auto; }
    .sm-field .filter-input, .sm-field .filter-select { font-size: 16px; }   /* no iOS zoom (Run 52) */
    .sm-person-row { min-height: 40px; }
}
