/* earnings-calculator.css — Styles for the creator earnings calculator page.
   Owns: calculator layout, surface tabs, input forms, results display, comparison table.
   Does NOT own: sidebar, header, global theme. */

.ec-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #222;
  background: #0A0A0A;
  position: sticky;
  top: 0;
  z-index: 10;
}
.ec-topbar-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.ec-topbar-right a {
  color: #A0A0B0;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}
.ec-topbar-right a:hover { color: #FF4D6D; }

.ec-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* Hero */
.ec-hero {
  text-align: center;
  margin-bottom: 32px;
}
.ec-hero h2 {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
}
.ec-hero p {
  color: #A0A0B0;
  font-size: 15px;
  margin: 0;
}

/* Surface tabs */
.ec-tabs {
  display: flex;
  gap: 4px;
  background: #1A1A1A;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.ec-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: #A0A0B0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}
.ec-tab:hover { color: #fff; background: #252525; }
.ec-tab.active {
  background: #FF4D6D;
  color: #fff;
}
.ec-tab:focus-visible {
  outline: 2px solid #FF4D6D;
  outline-offset: 2px;
}

/* Calculator card */
.ec-card {
  background: #1A1A1A;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.ec-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 20px;
}

/* Form fields */
.ec-field {
  margin-bottom: 16px;
}
.ec-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #A0A0B0;
  margin-bottom: 6px;
}
.ec-field input[type="number"] {
  width: 100%;
  padding: 10px 14px;
  background: #0A0A0A;
  border: 1px solid #333;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.ec-field input[type="number"]:focus {
  outline: none;
  border-color: #FF4D6D;
}
.ec-field input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Slider */
.ec-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ec-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: #333;
  border-radius: 3px;
  outline: none;
}
.ec-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #FF4D6D;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
}
.ec-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #FF4D6D;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
}
.ec-slider:focus-visible {
  outline: 2px solid #FF4D6D;
  outline-offset: 2px;
}
.ec-slider-val {
  font-size: 14px;
  font-weight: 700;
  color: #FF4D6D;
  min-width: 36px;
  text-align: right;
}

/* Revenue split info row */
.ec-split-info {
  display: flex;
  justify-content: space-between;
  background: #0A0A0A;
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 8px;
}
.ec-split-info span {
  font-size: 13px;
  color: #A0A0B0;
}
.ec-split-info .ec-split-creator { color: #FF4D6D; font-weight: 600; }
.ec-split-info .ec-split-platform { color: #3A8DFF; font-weight: 600; }

/* Results */
.ec-results {
  background: #1A1A1A;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}
.ec-results-title {
  font-size: 14px;
  font-weight: 600;
  color: #A0A0B0;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Split bar */
.ec-split-bar {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #333;
}
.ec-split-bar-creator {
  background: #FF4D6D;
  transition: width 0.4s ease;
  border-radius: 6px 0 0 6px;
}
.ec-split-bar-platform {
  background: #3A8DFF;
  transition: width 0.4s ease;
  border-radius: 0 6px 6px 0;
}

.ec-split-legend {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 20px;
}
.ec-split-legend-creator { color: #FF4D6D; font-weight: 600; }
.ec-split-legend-platform { color: #3A8DFF; font-weight: 600; }

/* Big numbers */
.ec-earnings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.ec-earnings-item {
  text-align: center;
}
.ec-earnings-amount {
  font-size: 28px;
  font-weight: 800;
  color: #FF4D6D;
  margin: 0;
}
.ec-earnings-amount.platform-amount {
  color: #3A8DFF;
  font-size: 22px;
}
.ec-earnings-label {
  font-size: 12px;
  color: #A0A0B0;
  margin: 4px 0 0;
  font-weight: 500;
}

.ec-summary-text {
  text-align: center;
  font-size: 14px;
  color: #A0A0B0;
  margin: 16px 0 0;
  padding: 12px;
  background: #0A0A0A;
  border-radius: 8px;
}
.ec-summary-text strong {
  color: #FF4D6D;
}

/* Comparison toggle */
.ec-compare-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.ec-compare-toggle label {
  font-size: 14px;
  color: #A0A0B0;
  cursor: pointer;
  font-weight: 500;
}
.ec-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  -webkit-appearance: none;
  appearance: none;
  background: #333;
  border-radius: 12px;
  cursor: pointer;
  outline: none;
  border: none;
  transition: background 0.2s;
}
.ec-toggle:checked { background: #FF4D6D; }
.ec-toggle::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.ec-toggle:checked::before { transform: translateX(20px); }
.ec-toggle:focus-visible {
  outline: 2px solid #FF4D6D;
  outline-offset: 2px;
}

/* Comparison table */
.ec-compare-table {
  width: 100%;
  border-collapse: collapse;
  background: #1A1A1A;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}
.ec-compare-table th,
.ec-compare-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #222;
}
.ec-compare-table th {
  background: #0A0A0A;
  color: #A0A0B0;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ec-compare-table td {
  color: #fff;
}
.ec-compare-table td.ec-amount-cell {
  color: #FF4D6D;
  font-weight: 700;
}
.ec-compare-table tr:last-child td { border-bottom: none; }
.ec-compare-table tr.ec-active-row { background: #1a1a2e; }

/* Revenue split table */
.ec-split-table-section {
  margin-top: 32px;
}
.ec-split-table-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
}
.ec-split-table {
  width: 100%;
  border-collapse: collapse;
  background: #1A1A1A;
  border-radius: 12px;
  overflow: hidden;
}
.ec-split-table th,
.ec-split-table td {
  padding: 12px 16px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid #222;
}
.ec-split-table th {
  background: #0A0A0A;
  color: #A0A0B0;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ec-split-table td { color: #fff; }
.ec-split-table .ec-creator-pct { color: #FF4D6D; font-weight: 700; }
.ec-split-table .ec-platform-pct { color: #3A8DFF; font-weight: 700; }
.ec-split-table tr:last-child td { border-bottom: none; }

/* Mobile responsive */
@media (max-width: 640px) {
  .ec-container { padding: 16px 12px 48px; }
  .ec-hero h2 { font-size: 22px; }
  .ec-tabs { gap: 2px; padding: 3px; }
  .ec-tab { padding: 8px 10px; font-size: 12px; }
  .ec-card, .ec-results { padding: 16px; }
  .ec-earnings-grid { grid-template-columns: 1fr; gap: 12px; }
  .ec-earnings-amount { font-size: 24px; }
  .ec-compare-table th,
  .ec-compare-table td,
  .ec-split-table th,
  .ec-split-table td {
    padding: 10px 12px;
    font-size: 13px;
  }
}
