/* Components: buttons, chips, theme toggle, tables, the quote panel, flags and the logo. */

/* ---------- buttons and chips ---------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--tap);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card, var(--surface));
  color: var(--ink);
  font: 600 var(--fs-base) / 1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--blue-ink);
}

.btn.primary {
  background: var(--blue-ink);
  border-color: var(--blue-ink);
  color: var(--on-blue);
}

.btn.primary:hover {
  filter: brightness(1.08);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--card, var(--surface));
  font-size: var(--fs-sm);
}

.chip.go {
  background: var(--blue-soft);
  border-color: transparent;
  color: var(--blue-deep);
  font-weight: 600;
}

.chip.wait {
  background: var(--gold-soft);
  border-color: transparent;
  color: var(--gold-ink);
  font-weight: 600;
}

.chip.new {
  background: var(--coral-soft);
  border-color: transparent;
  color: var(--coral);
  font-weight: 600;
}

/* ---------- theme toggle: shows the theme you would switch to ---------- */

.theme-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover {
  border-color: var(--blue-ink);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
}

.theme-toggle .i-sun,
:root[data-theme='dark'] .theme-toggle .i-moon {
  display: none;
}

:root[data-theme='dark'] .theme-toggle .i-sun {
  display: block;
}

/* ---------- family-business chip beside the logo ---------- */

.family-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--bg);
  color: var(--muted);
  font-size: var(--fs-xs);
  font-weight: 600;
}

.family-chip svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--gold-ink);
}

/* ---------- tables ---------- */

.tablebox {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tr:last-child th,
tr:last-child td {
  border-bottom: 0;
}

thead th {
  font-size: var(--fs-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

tbody th {
  font-weight: 600;
  color: var(--muted);
}

/* ---------- dossier panels (quote) ---------- */

.dossier {
  display: grid;
  gap: var(--sp-5);
  min-width: 0;
}

.dossier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
}

/* ---------- flags: a tinted box with a bold label, no side bar ---------- */

.flags {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: minmax(0, 1fr);
}

.flag {
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--coral);
  border-radius: var(--r-lg);
  background: var(--coral-soft);
}

.flag.open {
  border-color: var(--gold);
  background: var(--gold-soft);
}

.flag strong {
  display: block;
}

/* --bp-sm */
@media (min-width: 600px) {
  .flags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Ẹlẹ́kọ O's logo parts (the sprite's <symbol> uses these classes) ---------- */

.mk-deep {
  stroke: var(--blue-deep);
}

.mk-blue {
  stroke: var(--blue);
}

/* The undyed dots: drawn in the page colour so they read as gaps in the dye. */
.mk-cut {
  stroke: var(--bg);
}

.mk-bead {
  fill: var(--gold);
}
