/* TokenOps Platform Stylesheet */
/* Complements token-cost-comparator.css for shared .tc-* components */

/* ============================================
   Model Comparison Table
   ============================================ */

.to-comparison-section {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.to-comparison-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  margin: 24px 0;
}

.to-comparison-table thead {
  background: var(--bg-tertiary);
  border-bottom: 2px solid var(--border-color);
}

.to-comparison-table th {
  padding: 16px 12px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  white-space: nowrap;
}

.to-comparison-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.to-comparison-table tr:last-child td {
  border-bottom: none;
}

.to-comparison-table tbody tr:hover {
  background: var(--bg-tertiary);
}

.to-model-name {
  font-weight: 600;
  color: var(--text-primary);
}

.to-pricing-cell {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent-primary);
  font-weight: 500;
}

.to-context-cell {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.to-tier-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.to-tier-badge.fast {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.to-tier-badge.balanced {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.to-tier-badge.powerful {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.to-capability-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 2px;
  vertical-align: middle;
}

.to-capability-dot.yes {
  background: #22c55e;
}

.to-capability-dot.no {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
}

.to-best-for {
  font-size: 0.85rem;
  max-width: 300px;
}

/* ============================================
   Budget Simulator
   ============================================ */

.to-budget-section {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.to-budget-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.to-budget-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.to-budget-input-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.to-budget-input-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.to-budget-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--bg-secondary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.to-budget-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
  transition: box-shadow 0.2s ease;
}

.to-budget-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
}

.to-budget-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
  transition: box-shadow 0.2s ease;
}

.to-budget-slider::-moz-range-thumb:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.6);
}

.to-budget-value {
  min-width: 140px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-primary);
  text-align: right;
}

.to-budget-number-input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.to-budget-number-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.to-budget-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.to-budget-table thead {
  background: var(--bg-tertiary);
  border-bottom: 2px solid var(--border-color);
}

.to-budget-table th {
  padding: 16px 12px;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
}

.to-budget-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.to-budget-table tr:last-child td {
  border-bottom: none;
}

.to-budget-table tbody tr:hover {
  background: var(--bg-tertiary);
}

.to-model-name {
  font-weight: 600;
  color: var(--text-primary);
}

.to-cost-cell {
  font-family: var(--font-mono);
  font-weight: 600;
  text-align: right;
}

.to-cost-cell.monthly,
.to-cost-cell.annual {
  color: var(--accent-primary);
}

.to-cost-cell.daily {
  color: var(--text-secondary);
}

.to-budget-savings {
  margin-top: 16px;
  padding: 16px;
  background: rgba(34, 197, 94, 0.08);
  border-left: 4px solid #22c55e;
  border-radius: 6px;
}

.to-budget-savings strong {
  color: #22c55e;
  font-weight: 600;
}

/* ============================================
   Platform CTA
   ============================================ */

.to-platform-cta {
  background: rgba(59, 130, 246, 0.08);
  border-left: 4px solid var(--accent-primary);
  padding: 20px;
  border-radius: 8px;
  margin: 32px 0;
}

.to-platform-cta strong {
  color: var(--accent-primary);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 8px;
}

.to-platform-cta p {
  margin: 8px 0 12px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .to-comparison-table {
    font-size: 0.85rem;
  }

  .to-comparison-table th,
  .to-comparison-table td {
    padding: 10px 8px;
  }

  .to-budget-controls {
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .to-budget-input-row {
    flex-direction: column;
  }

  .to-budget-value {
    min-width: auto;
    text-align: left;
  }

  .to-comparison-table {
    font-size: 0.8rem;
  }

  .to-comparison-table th,
  .to-comparison-table td {
    padding: 8px 6px;
  }

  .to-best-for {
    max-width: none;
  }

  .to-comparison-section,
  .to-budget-section,
  .tc-provider-panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .to-comparison-table {
    min-width: 920px;
  }

  .to-budget-table {
    min-width: 760px;
  }
}

/* ============================================
   Light Mode Overrides
   ============================================ */

html[data-theme="light"] .to-comparison-table,
html[data-theme="light"] .to-budget-table {
  border-color: #e2e8f0;
}

html[data-theme="light"] .to-comparison-table thead,
html[data-theme="light"] .to-budget-table thead {
  background: #f1f5f9;
  border-bottom-color: #e2e8f0;
}

html[data-theme="light"] .to-comparison-table th,
html[data-theme="light"] .to-budget-table th {
  color: #0f172a;
}

html[data-theme="light"] .to-comparison-table td,
html[data-theme="light"] .to-budget-table td {
  border-bottom-color: #e2e8f0;
  color: #475569;
}

html[data-theme="light"] .to-comparison-table tbody tr:hover,
html[data-theme="light"] .to-budget-table tbody tr:hover {
  background: #f8fafc;
}

html[data-theme="light"] .to-budget-controls {
  background: #f1f5f9;
}

html[data-theme="light"] .to-budget-number-input {
  background: #fff;
  border-color: #e2e8f0;
  color: #0f172a;
}

html[data-theme="light"] .to-budget-number-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

html[data-theme="light"] .to-tier-badge.fast {
  background: rgba(34, 197, 94, 0.1);
}

html[data-theme="light"] .to-tier-badge.balanced {
  background: rgba(59, 130, 246, 0.1);
}

html[data-theme="light"] .to-tier-badge.powerful {
  background: rgba(139, 92, 246, 0.1);
}

html[data-theme="light"] .to-platform-cta {
  background: rgba(59, 130, 246, 0.06);
  border-left-color: #3b82f6;
}

html[data-theme="light"] .to-budget-savings {
  background: rgba(34, 197, 94, 0.06);
  border-left-color: #22c55e;
}

html[data-theme="light"] .to-budget-savings strong {
  color: #16a34a;
}
