/*
 * The look comes from ICANHAZUIKIT, the shared UI kit (public/css/uikit/, see docs/uikit.md). Every
 * page loads uikit/fonts.css, uikit/tokens.css and uikit/base.css before this file. Never edit those
 * copies: a change goes to the kit's owner, through Figma.
 *
 * Nabu's short names, each pointing at one kit role token (never a primitive like --color-gray-800).
 * Light or dark follows the device unless data-theme is set; the kit does that, not this file.
 * Accent and status colours have no short name here: a colour's job decides its token, so use the
 * kit's directly, e.g. --color-accent-solid for a fill, --color-accent-text for text,
 * --color-accent-border for a border, and the same for --color-status-danger-* and the other statuses.
 * Spacing uses the kit's --gap-xs/sm/md/lg directly (4/8/16/24 at default density). Nabu's old
 * --space-1..4 are gone: the kit has primitives named --space-2 and --space-4, and redeclaring them
 * here broke the kit's own spacing. Never declare a name the kit already has (tests/unit/uikit.test.js).
 */
:root {
  --bg: var(--color-surface-page);
  --surface: var(--color-surface-raised);
  --text: var(--color-text-primary);
  --muted: var(--color-text-secondary);
  --border: var(--color-border-default);
  --radius: var(--radius-container);
  --font: var(--font-family-sans);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 var(--font);
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--gap-lg) var(--gap-md);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--gap-lg);
}

h1 {
  font-size: 1.25rem;
  margin: 0;
}

h2 {
  font-size: 1rem;
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--gap-md);
  margin-bottom: var(--gap-md);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
}

label {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xs);
  color: var(--muted);
  font-size: 0.875rem;
}

input,
textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--gap-sm);
}

.btn {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: var(--radius);
  padding: var(--gap-sm) var(--gap-md);
  background: var(--color-accent-solid);
  color: var(--color-accent-on-solid);
  align-self: flex-start;
}

.btn-quiet {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}

/* Destructive actions (deleting an organization): red, and only ever behind a typed confirmation. */
.btn-danger {
  background: var(--color-status-danger-solid);
  color: var(--color-status-danger-on-solid);
}

.danger-zone > summary {
  color: var(--color-status-danger-text);
}

/* The review page: its clip player, and the timeline's time column. */
.review-player {
  width: 100%;
  max-height: 60vh;
  background: #000;
  border-radius: var(--radius);
}

.timeline-at {
  min-width: 7.5rem;
  font-variant-numeric: tabular-nums;
}

.tag-danger {
  color: var(--color-status-danger-text);
  border-color: var(--color-status-danger-border);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--gap-md);
  padding: var(--gap-md) 0;
  border-bottom: 1px solid var(--border);
}

.list-item p {
  margin: var(--gap-xs) 0 0;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.empty {
  color: var(--muted);
  padding: var(--gap-md) 0;
}

.muted {
  color: var(--muted);
}

.container-wide {
  max-width: 880px;
}

h3 {
  font-size: 1rem;
  margin: 0;
}

.section-title {
  margin: var(--gap-lg) 0 var(--gap-md);
}

.row {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

.row.wrap {
  flex-wrap: wrap;
}

select {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--gap-sm);
}

a {
  color: var(--color-accent-text);
}

a.btn {
  text-decoration: none;
}

.tag {
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 var(--gap-sm);
  white-space: nowrap;
}

.link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
}

/* An invite link to copy: long, so it wraps rather than pushing the page sideways on a phone. */
.link-row code {
  overflow-wrap: anywhere;
  min-width: 0;
}

/* A checkbox with its words beside it, not above. */
.choice {
  flex-direction: row;
  align-items: center;
  gap: var(--gap-sm);
}

details > summary {
  cursor: pointer;
}

details[open] > summary {
  margin-bottom: var(--gap-sm);
}

@media (max-width: 560px) {
  .stack-mobile {
    flex-direction: column;
  }
}

.flash {
  border: 1px solid var(--color-status-danger-border);
  color: var(--color-status-danger-text);
  border-radius: var(--radius);
  padding: var(--gap-sm) var(--gap-md);
  margin-bottom: var(--gap-md);
}
