/* ============================================
   TOTAL COMPENSATION CALCULATOR
   ============================================ */

/* ---- Two-offer input grid ---- */

.tc-offers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.tc-offer-card {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  overflow: hidden;
}

.tc-offer-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
}

.tc-offer-a-header { background: var(--navy); }
.tc-offer-b-header { background: #1E3A5F; }

.tc-offer-name {
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  width: 100%;
  outline: none;
}

.tc-offer-name::placeholder { color: rgba(255,255,255,0.5); }

.tc-section {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--surface-alt);
}

.tc-section:last-child { border-bottom: none; }

.tc-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.tc-field {
  margin-bottom: 0.6rem;
}

.tc-field:last-child { margin-bottom: 0; }

.tc-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.tc-field input[type="number"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--surface-alt);
  border-radius: 8px;
  font-size: 0.85rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s;
}

.tc-field input[type="number"]:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ---- Results section ---- */

.tc-results {
  max-width: 800px;
  margin: 0 auto;
}

/* Winner banner */
.tc-winner-banner {
  background: var(--navy);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.tc-winner-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--emerald);
  margin-bottom: 0.5rem;
}

.tc-winner-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--white);
}

/* Breakdown table */
.tc-breakdown-card {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tc-breakdown-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.tc-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.tc-breakdown-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  border-bottom: 2px solid var(--surface-alt);
}

.tc-breakdown-table th:not(:first-child) {
  text-align: right;
}

.tc-breakdown-table td {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--surface-alt);
  color: var(--text);
}

.tc-breakdown-table td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tc-breakdown-table tr:last-child td {
  border-bottom: none;
}

.tc-row-total td {
  font-weight: 800;
  font-size: 0.95rem;
  border-top: 2px solid var(--navy);
  color: var(--navy);
}

.tc-row-deduct td { color: var(--red); }

.tc-diff-positive { color: var(--emerald) !important; font-weight: 600; }
.tc-diff-negative { color: var(--red) !important; font-weight: 600; }
.tc-diff-neutral { color: var(--text-muted) !important; }

/* Visual bar comparison */
.tc-visual-card {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.tc-visual-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.tc-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tc-bar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tc-bar-label {
  width: 80px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tc-bar-track {
  flex: 1;
  height: 36px;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}

.tc-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.6s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  min-width: 0;
}

.tc-bar-a { background: var(--navy); }
.tc-bar-b { background: #3B82F6; }

.tc-bar-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  min-width: 80px;
  text-align: right;
}

.tc-bar-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Hourly rate */
.tc-hourly-card {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.tc-hourly-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.tc-hourly-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tc-hourly-cols {
  display: flex;
  gap: 1.5rem;
}

.tc-hourly-box {
  flex: 1;
  text-align: center;
  padding: 1rem;
  background: var(--surface);
  border-radius: 12px;
}

.tc-hourly-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.tc-hourly-rate {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
}

.tc-hourly-winner {
  background: rgba(16, 185, 129, 0.1);
}

.tc-hourly-winner .tc-hourly-rate {
  color: var(--emerald);
}

/* ---- RESPONSIVE ---- */

@media (max-width: 1024px) {
  .tc-offers-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .tc-winner-amount {
    font-size: 1.75rem;
  }

  .tc-breakdown-table {
    font-size: 0.75rem;
  }

  .tc-hourly-cols {
    flex-direction: column;
    gap: 0.75rem;
  }

  .tc-hourly-rate {
    font-size: 1.5rem;
  }

  .tc-bar-label {
    width: 60px;
    font-size: 0.7rem;
  }
}
