/* ── Comparison table ─────────────────────────────────────────────────── */

.tps-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tps-comparison-table,
.tps-rules-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9rem;
	white-space: nowrap;
}

.tps-comparison-table th,
.tps-comparison-table td,
.tps-rules-table th,
.tps-rules-table td {
	padding: 8px 12px;
	border: 1px solid #e0e0e0;
	text-align: left;
	vertical-align: middle;
}

.tps-comparison-table thead th {
	background: #1a1a2e;
	color: #fff;
	font-weight: 600;
	white-space: nowrap;
}

.tps-comparison-table tbody tr:nth-child(even) {
	background: #f7f7f7;
}

.tps-comparison-table tbody tr:hover {
	background: #eef2ff;
}

.tps-rules-table th {
	width: 180px;
	font-weight: 600;
	background: #f2f2f2;
	white-space: nowrap;
}

.tps-none {
	color: #27ae60;
	font-weight: 600;
}

/* ── Firm grid ────────────────────────────────────────────────────────── */

.tps-firm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
}

.tps-firm-card {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	background: #fff;
}

.tps-firm-logo {
	text-align: center;
	padding: 16px;
	background: #f9f9f9;
}

.tps-firm-logo img {
	max-height: 60px;
	width: auto;
}

.tps-firm-card-body {
	padding: 16px;
}

.tps-firm-name {
	margin: 0 0 8px;
	font-size: 1rem;
}

.tps-firm-name a {
	text-decoration: none;
	color: inherit;
}

.tps-firm-excerpt {
	font-size: 0.85rem;
	color: #555;
	margin: 6px 0 12px;
}

/* ── Rule changes ─────────────────────────────────────────────────────── */

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

.tps-change-item {
	border-left: 4px solid #ccc;
	padding: 12px 16px;
	margin-bottom: 12px;
	background: #fff;
	border-radius: 0 4px 4px 0;
}

.tps-change--info     { border-left-color: #3498db; }
.tps-change--important{ border-left-color: #f39c12; }
.tps-change--critical { border-left-color: #e74c3c; }

.tps-change-header {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 8px;
}

.tps-change-firm {
	font-size: 1rem;
}

.tps-change-account {
	color: #555;
	font-size: 0.9rem;
}

.tps-severity {
	font-size: 0.75rem;
	padding: 2px 8px;
	border-radius: 12px;
	text-transform: uppercase;
	font-weight: 700;
}

.tps-severity--info      { background: #d6eaf8; color: #1a5276; }
.tps-severity--important { background: #fef9e7; color: #7d6608; }
.tps-severity--critical  { background: #fdedec; color: #922b21; }

.tps-old-value { color: #c0392b; text-decoration: line-through; }
.tps-new-value { color: #27ae60; font-weight: 600; }

.tps-change-footer {
	display: flex;
	gap: 16px;
	margin-top: 8px;
	font-size: 0.8rem;
	color: #888;
}

/* ── Account rules block ──────────────────────────────────────────────── */

.tps-account-block {
	margin-bottom: 32px;
}

.tps-account-title {
	font-size: 1.1rem;
	margin-bottom: 8px;
	border-bottom: 2px solid #1a1a2e;
	padding-bottom: 4px;
}

.tps-source-note {
	font-size: 0.8rem;
	color: #888;
	margin-top: 6px;
	display: flex;
	gap: 12px;
	align-items: center;
}

.tps-verified-date::before {
	content: '✓ ';
	color: #27ae60;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */

.tps-btn {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 4px;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.tps-btn--secondary {
	background: #1a1a2e;
	color: #fff;
}

.tps-btn--secondary:hover {
	background: #2c2c54;
	color: #fff;
}

/* ── Status badges ────────────────────────────────────────────────────── */

.tps-status {
	display: inline-block;
	font-size: 0.75rem;
	padding: 2px 8px;
	border-radius: 12px;
	text-transform: uppercase;
	font-weight: 700;
	margin-bottom: 8px;
}

.tps-status--active  { background: #d5f5e3; color: #1e8449; }
.tps-status--paused  { background: #fef9e7; color: #7d6608; }
.tps-status--closed  { background: #fadbd8; color: #922b21; }
.tps-status--warning { background: #fdebd0; color: #784212; }

/* ── Phase badges ─────────────────────────────────────────────────────── */

.tps-phase-badge {
	display: inline-block;
	font-size: 0.7rem;
	padding: 2px 8px;
	border-radius: 12px;
	text-transform: uppercase;
	font-weight: 700;
	vertical-align: middle;
	margin-left: 8px;
}

.tps-phase-badge--evaluation  { background: #dbeafe; color: #1e40af; }
.tps-phase-badge--performance  { background: #d1fae5; color: #065f46; }
.tps-phase-badge--instant      { background: #fef3c7; color: #92400e; }
.tps-phase-badge--funded       { background: #ede9fe; color: #5b21b6; }

.tps-linked-account {
	font-size: 0.85rem;
	color: #555;
	margin: 4px 0 12px;
}

/* ── Platform filter ──────────────────────────────────────────────────── */

.tps-platform-filter {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.tps-platform-filter-label {
	font-weight: 600;
	font-size: 0.875rem;
}

.tps-platform-btn {
	padding: 4px 14px;
	border: 1px solid #ccc;
	border-radius: 16px;
	background: #fff;
	cursor: pointer;
	font-size: 0.8rem;
	font-weight: 500;
	line-height: 1.6;
}

.tps-platform-btn.active {
	background: #1a1a2e;
	color: #fff;
	border-color: #1a1a2e;
}

.tps-platform-btn:hover:not(.active) {
	background: #f0f0f0;
}

.tps-plat-hidden {
	display: none;
}

/* ── Platform price mini-table (account rules view) ───────────────────── */

.tps-platform-price-display {
	width: auto;
	border-collapse: collapse;
	font-size: 0.85rem;
}

.tps-platform-price-display th,
.tps-platform-price-display td {
	padding: 4px 10px;
	border: 1px solid #e0e0e0;
	white-space: nowrap;
}

.tps-platform-price-display thead th {
	background: #f2f2f2;
	font-weight: 600;
}

/* ── Scaling tiers mini-table ─────────────────────────────────────────── */

.tps-scaling-tiers-display {
	width: auto;
	border-collapse: collapse;
	font-size: 0.85rem;
}

.tps-scaling-tiers-display th,
.tps-scaling-tiers-display td {
	padding: 4px 10px;
	border: 1px solid #e0e0e0;
	white-space: nowrap;
}

.tps-scaling-tiers-display thead th {
  background: #f2f2f2;
  font-weight: 600;
}

.tps-platform-matrix-display {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.tps-platform-matrix-display th,
.tps-platform-matrix-display td {
  padding: 5px 8px;
  border: 1px solid #e0e0e0;
  text-align: left;
  vertical-align: top;
}

.tps-platform-matrix-display th {
  width: 120px;
  font-weight: 600;
  background: #f2f2f2;
}

.tps-platform-matrix-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 2px 4px 2px 0;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #d0d7de;
  background: #f6f8fa;
  color: #0969da;
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

a.tps-platform-matrix-pill:hover {
  background: #ddf4ff;
  border-color: #54aeef;
  color: #0550ae;
}

/* ── Empty state ──────────────────────────────────────────────────────── */

.tps-empty {
	color: #888;
	font-style: italic;
}
