/* ================= PROFILE & ACCOUNT → ORGANIZATION — pane-local styling =================
   Everything shared (card, header band, row, button, select, input) comes from
   alt-settings-stride.css and alt-components.css. This file adds only the identity row (mark +
   name) and the blocked-state note; every color is a `--stg-*` token, nothing restates one. */

.org-profile-id{
  display:flex;
  align-items:center;
  gap:10px;
  padding:2px 0 12px;
}
.org-profile-mark{
  flex:0 0 auto;
  width:30px;
  height:30px;
  /* `--stg-r`, not a literal 8px — alt-org-settings.css's `.org-mark-preview` rounds the same
     concept the same way; the value isn't among the declared radii (6/9/14, 7/10) either. */
  border-radius:var(--stg-r);
  object-fit:contain;
  background:var(--stg-surface-2);
}
/* The placeholder — no mark yet — reuses org-settings.js's initials-avatar idiom
   (`.org-owner-av`), sized to match the image case so the row never jumps. Decorative only. */
.org-profile-mark-ph{
  flex:0 0 auto;
  width:30px;
  height:30px;
  /* Same `--stg-r` reasoning as `.org-profile-mark` above — not a literal 8px. */
  border-radius:var(--stg-r);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:var(--a-fs-ctl-sm);
  font-weight:700;
  letter-spacing:.02em;
  color:#fff;
  /* `--accent-fill`, not `--accent` — white on `--accent` fails AA in dark (3.677:1); this role
     measures 4.518:1. Square by design (an org mark, not `.a-av`'s circle) — kept its own
     geometry rather than growing a "square sometimes" modifier onto a shared avatar. */
  background:var(--accent-fill);
}
.org-profile-name{
  font-size:var(--a-fs-16);
  font-weight:600;
  color:var(--stg-text);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* "Transfer ownership before leaving" — warm, not red: this explains a refusal the server
   already made, so it borrows the Owners card's warning tone, not the Leave button's red. */
.org-profile-blocked{
  color:var(--stg-c-email, #ffc45d);
  font-weight:600;
}

.org-profile-invite-note{ margin-bottom:6px; }

/* ---------- THE FINAL-OWNER BLOCK'S RHYTHM, MEASURED RATHER THAN ADJUSTED ----------
   The "rule" under the transfer row is `.stg-row`'s own border-bottom, which only pads ABOVE
   itself — nothing spaces what comes after, which is why the controls read as touching. Given
   their own flex row with the filter rows' 8px gap instead of inline spacing. */
.org-profile-transfer{
  display:flex; align-items:center; flex-wrap:wrap; gap:8px; width:100%;
}
.org-profile-transfer > select{ min-width:160px; }

/* 14px below the rule against its own 13px above it — near-symmetry reads as a separator, not a lid. */
.org-profile-actions{ margin-top:14px; }

/* ---- Create an Organization: a name and a button ----
   Reuses `.org-profile-transfer`'s flex-row shape (8px gap, wraps); the warning gets
   `flex-basis:100%` so it never squeezes between field and button. */
.org-profile-create{
  display:flex; align-items:center; flex-wrap:wrap; gap:8px; width:100%;
}
.org-profile-create > .a-input{ flex:1 1 220px; min-width:0; }
.org-profile-create > .a-hint{ flex:1 1 100%; margin:0; }

/* ---------- Organization AI assistant (JS/features/org-ai-settings.js) ----------
   The card, rows, buttons and notes are shared; this adds only the key field's column, the masked key,
   and the usage fold and table. Tokens only. */
.org-ai-keywrap{ display:flex; flex-direction:column; gap:6px; width:100%; }
.org-ai-keywrap > .a-hint{ margin:0; }
.org-ai-mask{ font-family:ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing:.04em; color:var(--stg-text); }
/* A VALUE in a row's control column (Provider, Set by, Last check, Site, Last delivery) is text, not a control, so nothing
   sized it: the dialog's base is 16px, which drew every value larger than the 13px label beside it. Same 13px the label
   (`.stg-row-t`) and My Settings give it. Scoped to this pane because a text value is only drawn here. */
#orgPaneBody .stg-row-ctl{ font-size:var(--a-fs-ctl); line-height:var(--a-lh-ui); color:var(--stg-text); }
/* The row rule above the buttons ends the list; the buttons are a new group, not its last line. */
#orgPaneBody .stg-sec-body > .stg-row + .a-row-actions{ margin-top:12px; }
#orgPaneBody .stg-sec-body > .stg-row + .a-callout, #orgPaneBody .stg-sec-body > .stg-row + .a-err-note{ margin-top:12px; }
/* The fold repeats the pane's own disclosure recipe (`.org-logo-more`, alt-org-settings.css): a rule above, 13px/650 summary. */
.org-ai-fold{ margin-top:14px; padding-top:10px; border-top:1px solid var(--stg-line); }
.org-ai-fold-h{ cursor:pointer; padding:4px 2px; font-size:var(--a-fs-ctl); font-weight:600; color:var(--stg-text); border-radius:var(--stg-r); }
.org-ai-fold-h:focus-visible{ outline:2px solid var(--accent-text); outline-offset:2px; }
.org-ai-fold[open] > .org-ai-fold-h{ margin-bottom:6px; }
.org-ai-usage-wrap{ overflow-x:auto; }
.org-ai-usage{ width:100%; border-collapse:collapse; font-size:var(--a-fs-ctl-sm); }
.org-ai-usage th, .org-ai-usage td{ text-align:left; padding:6px 8px; border-bottom:1px solid var(--stg-line, var(--a-line)); color:var(--stg-text); }
.org-ai-usage th{ color:var(--stg-dim); font-weight:600; font-size:var(--a-fs-11); text-transform:uppercase; letter-spacing:.06em; }
.org-ai-usage th:first-child, .org-ai-usage td:first-child{ padding-left:0; }
.org-ai-usage th:last-child, .org-ai-usage td:last-child{ padding-right:0; }
.org-ai-usage th.n, .org-ai-usage td.n{ text-align:right; font-variant-numeric:tabular-nums; }

/* "AI key for your requests": the select is long ("{Org} · {Provider}"), so below 560px the row stacks as
   `.stg-row.stacked` does and the select takes the row, instead of clipping beside its description. `.org-ai-ctl` is the same
   stacking for the organization cards' own control rows (provider segment, Datadog site) in the narrow Team settings dialog. */
@media (max-width:560px){
  .stg-row.org-ai-choice, .stg-row.org-ai-ctl{ grid-template-columns:minmax(0,1fr); }
  .stg-row.org-ai-choice .stg-row-ctl, .stg-row.org-ai-ctl .stg-row-ctl{ justify-content:flex-start; margin-top:10px; }
  .stg-row.org-ai-choice .stg-row-ctl > .a-select, .stg-row.org-ai-ctl .stg-row-ctl > .a-select{ width:100%; min-width:0; }
}
