/* ════════════════════════════════════════════
   FX MATRIX
   ════════════════════════════════════════════ */

/* ── Spot / Forward tab toggle ── */
.fx-view-tabs {
  display: flex;
  gap: 0;
}
.fx-view-tab {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 2px 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: color 0.1s, border-color 0.1s;
}
.fx-view-tab:first-child { border-radius: 2px 0 0 2px; }
.fx-view-tab:last-child  { border-radius: 0 2px 2px 0; border-left: none; }
.fx-view-tab:hover       { color: var(--text); }
.fx-view-active          { color: var(--accent) !important; border-color: var(--accent) !important; }

/* ── Shared content container ── */
.fx-content-container {
  flex: 1;
  overflow: auto;
  padding: 6px;
}

/* ── Forward tenor sub-tabs ── */
.fx-tenor-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 5px 8px;
  gap: 4px;
  flex-shrink: 0;
}
.fx-tenor-tab {
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--muted);
  padding: 2px 10px;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 2px;
  transition: color 0.1s, border-color 0.1s;
}
.fx-tenor-tab:hover { color: var(--text); }
.fx-tenor-active    { color: var(--accent) !important; border-color: var(--accent) !important; }

/* ── Spot matrix ── */
.fx-matrix-container {
  flex: 1;
  overflow: auto;
  padding: 6px;
}

.fx-matrix {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

.fx-header-row,
.fx-data-row {
  display: table-row;
}

.fx-corner,
.fx-col-header,
.fx-row-header,
.fx-cell,
.fx-diagonal {
  display: table-cell;
  padding: 5px 7px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 12px;
  white-space: nowrap;
}

.fx-col-header,
.fx-row-header {
  background: var(--header);
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 1px;
  text-align: center;
}

.fx-corner {
  background: var(--bg);
}

.fx-diagonal {
  background: #111;
  color: var(--border);
}

/* ────────────────────────────────────────────────────────────────────────
   Phase 6b — fx_matrix alignment
   Cell tint for forward direction; typography aligned with .fl-table-*.
   Placed after legacy fx rules so cascade applies (later wins).
   ──────────────────────────────────────────────────────────────────────── */

.fx-row-header,
.fx-col-header,
.fx-corner {
    color: #777;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.fx-cell {
    font-family: Inter, system-ui, sans-serif;
    font-size: 12px;
    color: #E0E0E0;
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum' 1;
}

.fx-up {
    color: #00C805;
    background: rgba(0, 200, 5, 0.06);
}

.fx-down {
    color: #FF3737;
    background: rgba(255, 55, 55, 0.06);
}

.fx-diagonal {
    color: #555;
}

.fx-rates-note {
    color: #777;
    font-size: 9px;
    font-family: Inter, system-ui, sans-serif;
    margin-top: 8px;
}

/* ── Forward table ── */
.fwd-table {
  width: 100%;
}
.fwd-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
}
.fwd-header-row {
  background: var(--header);
  position: sticky;
  top: 0;
  z-index: 5;
}
.fwd-row:not(.fwd-header-row):hover { background: var(--hover); }

.fwd-cell {
  flex: 1;
  padding: 4px 6px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
}
.fwd-pair-col { flex: 1.2; text-align: left; font-size: 12px; }
.fwd-spot     { color: var(--text); }
.fwd-header   { color: var(--muted); font-size: 10px; letter-spacing: 1px; }

.fwd-pct { font-size: 10px; color: var(--muted); }

.fx-rates-note {
  font-size: 10px;
  color: var(--muted);
  padding: 5px 6px 3px;
  border-top: 1px solid var(--border);
  letter-spacing: 0.5px;
}

/* ── FX currency tags + add row ── */
.fx-ccy-section {
  padding: 6px 10px 4px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.fx-currency-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
  min-height: 22px;
}
.fx-ccy-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--header);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 12px;
  font-weight: bold;
}
.fx-ccy-label { color: var(--accent); }
.fx-ccy-remove {
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.fx-ccy-remove:hover { color: var(--negative); }

