/* The settings panel. Application chrome, so it follows the viewer's theme. */

.set {
  width: 100%; max-width: 900px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(20, 32, 43, .04);
  overflow: hidden;
}

.set-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--sunk); border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 5;
}
.set-bar strong { font-size: 14.5px; letter-spacing: -.01em; }
.set-bar__spacer { flex: 1 1 auto; }

.set-lead {
  margin: 0 0 10px; font-size: 12.5px; line-height: 1.5;
  color: var(--muted); max-width: 78ch;
}

/* A live sample beats an explanation: somebody who can see £1,234.50 cannot mis-set a separator,
   and somebody who can see INV-2026-0012 cannot mis-set padding. */
.set-sample {
  display: inline-flex; align-items: center;
  padding: 6px 10px; min-height: 33px;
  font-family: var(--font-mono); font-size: 13.5px;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--rule); border-radius: var(--radius);
}

.set-empty { margin: 0 0 8px; font-size: 13px; color: var(--muted); }

/* ---- the rate table ---------------------------------------------------------------------------- */
.set-rates { display: flex; flex-direction: column; gap: 8px; }
.set-rates__grid { overflow-x: auto; display: flex; flex-direction: column; gap: 5px; padding-bottom: 4px; }
.set-rates__head, .set-rates__row {
  display: grid; align-items: center; gap: 6px;
  grid-template-columns: 66px 60px 118px 74px 96px 66px 62px 66px 92px 34px;
  min-width: 760px;
}
.set-rates__head {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.set-rates__head .is-num { text-align: right; }
.set-rates__row .cmp-input { padding: 5px 7px; font-size: 12.5px; }

.set-check { display: flex; align-items: center; justify-content: center; min-height: 30px; }
.set-check input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ---- what just happened -------------------------------------------------------------------------- */
.set-status {
  padding: 10px 14px; font-size: 13px; line-height: 1.45;
  border-top: 1px solid var(--rule); color: var(--muted);
}
.set-status:empty { display: none; }
.set-status.is-ok { background: var(--ok-soft); color: var(--ok); }
.set-status.is-warn { background: var(--warn-soft); color: var(--warn); }

@media print { .set { display: none !important; } }

/* The logo control: preview beside the picker, hidden when there is nothing to preview. */
.set-logo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-logo__img {
  max-height: 48px; max-width: 200px; object-fit: contain;
  padding: 4px 6px; background: #fff;
  border: 1px solid var(--rule); border-radius: 4px;
}
.set-logo__file { font-size: 12.5px; max-width: 230px; }

/* The tab strip: five doors instead of one long corridor. */
.set-tabs {
  display: flex; gap: 2px;
  padding: 6px 10px 0;
  background: var(--sunk);
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
}
.set-tab {
  appearance: none; -webkit-appearance: none; font: inherit;
  font-size: 13px; font-weight: 600; white-space: nowrap;
  color: var(--muted); background: transparent; cursor: pointer;
  border: 0; border-bottom: 2px solid transparent;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 8px 12px;
  transition: color var(--speed), border-color var(--speed), background var(--speed);
}
.set-tab:hover { color: var(--ink); }
.set-tab.is-active { color: var(--accent); border-bottom-color: var(--accent); background: var(--surface); }
.set-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* The message editors: an edited event says so, and the reset sits beside it. */
.set-msg__row { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.set-msg__badge {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 3px;
  background: var(--accent-soft); color: var(--accent);
}
