/* ---------------------------------------------------------------------------
   Composites — the tier-3 pieces feature code needed and was hand-rolling with
   inline styles. Every value below is a token; no raw colours.
   --------------------------------------------------------------------------- */

/* Read-only value shown beside an action (e.g. the owner on a lot). */
.field-readonly {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  font-weight: 600;
}
.field-readonly-row { display: flex; align-items: center; gap: 8px; }

/* Inputs that carry a warning meaning. */
.input-danger { color: var(--red); font-weight: 600; }

/* Callout card — an inline notice inside a form or panel. */
.callout { margin-top: 4px; }
.callout-body { padding: 12px 14px; display: flex; align-items: center; gap: 12px; }
.callout-danger { border-color: var(--red); background: var(--red-soft); }
.callout-warn { border-color: var(--amber); background: var(--amber-soft); }
.callout-info { border-color: var(--brand); background: var(--brand-soft); }
.text-danger { color: var(--red); }

/* Checkbox list (contractor pickers, option groups). */
.checklist { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 14px;
  padding: 4px 0;
  cursor: pointer;
}
.checklist-item input[type="checkbox"] { width: auto; }
.checkbox-row { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 400; }
.checkbox-row input[type="checkbox"] { width: auto; }

/* Preview panel — shows the effect of a form before it is submitted. */
.preview-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg-soft);
  font-size: 13px;
}
.preview-scroll { max-height: 180px; overflow-y: auto; }
.preview-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.preview-row:last-child { border-bottom: none; }

/* A single booking line with its cancel action. */
.booking-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  color: var(--text-soft);
}

/* Read-only credential fields in the one-time password hand-off. */
input[readonly] { background: var(--bg-soft); cursor: text; }


/* ---------------------------------------------------------------------------
   Tier 3 composites (ui.js). Every value is a token — no literals live here.
   --------------------------------------------------------------------------- */

/* PageHeader */
.page-header { margin-bottom: 18px; }
.page-crumb { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.page-header-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header-text { min-width: 0; }
.page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.page-sub { color: var(--text-muted); font-size: 13px; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.page-status { display: flex; align-items: center; }

/* DataTable */
.table-scroll { max-height: 520px; overflow-y: auto; }
.table-empty { padding: 8px 0; }
.cell-sub { color: var(--text-muted); font-size: 11px; font-weight: 400; margin-top: 2px; }

/* EmptyState */
.empty-action { margin-top: 16px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* StatRow tones — meaning, not colour names */
.stat-good { color: var(--green); }
.stat-warn { color: var(--amber); }
.stat-danger { color: var(--red); }

/* Callout */
.callout-title { margin-bottom: 2px; }
.callout-text { font-size: 12px; }
.callout-success { border-color: var(--green); background: var(--green-soft); }

/* DefinitionList */
.deflist { display: flex; flex-direction: column; }
.deflist-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.deflist-row:last-child { border-bottom: none; }
.deflist-value { font-weight: 600; text-align: right; }

/* FilterBar */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 18px; }

/* Payment details block (owner portal) */
.pay-details {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg-soft);
}
.pay-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13px; }

/* Role sign-in screens. The accent is set per role from a token, never inline. */
.rl-badge-default { background: var(--avatar-1); }

/* Large avatar — profile modal. */
.avatar-lg {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--avatar-1);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 22px;
  margin: 0 auto 10px;
}

/* Small inline avatar shown before a name in a table cell. */
.avatar-inline {
  width: 28px;
  height: 28px;
  font-size: 11px;
  display: inline-grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-strong);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
}

/* Square placeholder tile for a photo/attachment thumbnail. */
.thumb-tile {
  aspect-ratio: 1;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--bg-hover), var(--bg-soft));
  display: grid;
  place-items: center;
  color: var(--text-muted);
}

/* Back-arrow icon link above a chat thread. */
.icon-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
}

/* Reserved-height "is typing…" line under a chat thread. */
.typing-indicator {
  height: 20px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
