/* ============================================
   FREELANCE RATE CALCULATOR
   ============================================ */

.fc-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

/* ---- INPUTS COLUMN ---- */

.fc-inputs {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.fc-section {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 1.75rem;
}

.fc-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fc-section-icon {
  font-size: 1.25rem;
}

.fc-field {
  margin-bottom: 1.25rem;
}

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

.fc-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.fc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.fc-input-wrap input,
.fc-field select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  -moz-appearance: textfield;
}

.fc-input-wrap input::-webkit-inner-spin-button,
.fc-input-wrap input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.fc-input-wrap input:focus,
.fc-field select:focus {
  outline: none;
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.fc-prefix span {
  position: absolute;
  left: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 1rem;
  z-index: 1;
}

.fc-prefix input {
  padding-left: 1.75rem;
}

.fc-suffix {
  position: absolute;
  right: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

.fc-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.4;
}

.fc-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2364748B'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

/* ---- RESULTS COLUMN ---- */

.fc-results {
  position: relative;
}

.fc-results-sticky {
  position: sticky;
  top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.fc-result-hero {
  background: var(--navy);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  color: var(--white);
}

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

.fc-result-number {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

.fc-dollar {
  font-size: 1.75rem;
  color: var(--emerald);
  font-weight: 700;
}

.fc-rate-big {
  font-size: 5rem;
  font-weight: 800;
  color: var(--emerald);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: color 0.4s;
}

.fc-per-hour {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.fc-result-drop {
  margin-top: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  min-height: 1.5em;
}

.fc-result-drop.drop-high { color: var(--red); }
.fc-result-drop.drop-mid { color: var(--amber); }
.fc-result-drop.drop-low { color: var(--emerald); }

/* Bar comparison */
.fc-comparison {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 1.5rem;
}

.fc-bar-group {
  margin-bottom: 1rem;
}

.fc-bar-group:last-child {
  margin-bottom: 0;
}

.fc-bar-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.fc-bar-track {
  height: 32px;
  background: var(--surface-alt);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.fc-bar {
  height: 100%;
  border-radius: 8px;
  transition: width 0.6s var(--ease-out);
  display: flex;
  align-items: center;
  padding: 0 0.75rem;
  min-width: 40px;
}

.fc-bar-gross {
  background: var(--slate);
  width: 100%;
}

.fc-bar-net {
  background: var(--emerald);
  width: 50%;
}

.fc-bar-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  text-align: right;
}

/* Breakdown table */
.fc-breakdown {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 1.5rem;
}

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

.fc-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.fc-row-income span:last-child {
  font-weight: 700;
  color: var(--navy);
}

.fc-row-deduct span:first-child {
  color: var(--text-muted);
}

.fc-row-deduct span:last-child {
  color: var(--red);
  font-weight: 600;
}

.fc-breakdown-divider {
  height: 1px;
  background: var(--surface-alt);
  margin: 0.5rem 0;
}

.fc-row-total {
  font-weight: 700;
  font-size: 1rem;
}

.fc-row-total span:last-child {
  color: var(--emerald);
}

.fc-row-hours span {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* W-2 Equivalent */
.fc-w2-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.06));
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.fc-w2-box h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.fc-w2-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.fc-w2-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

/* Quarterly taxes */
.fc-quarterly {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.fc-quarterly h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.fc-quarterly-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.fc-quarterly-amount {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.fc-quarterly-dates {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* CTA section */
.fc-cta-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.fc-export-btn {
  width: 100%;
}

.fc-cta-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.btn-outline {
  background: transparent;
  color: var(--emerald);
  border: 1px solid var(--emerald);
  padding: 0.75rem 2rem;
  border-radius: 12px;
  width: 100%;
}

.btn-outline:hover {
  background: rgba(16, 185, 129, 0.1);
}

.fc-share-btn {
  animation: none;
}

/* Privacy notice */
.fc-privacy {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* ---- CONTEXT SECTION ---- */

.fc-context {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 4rem;
}

.fc-context-card {
  background: var(--white);
  border: 1px solid var(--surface-alt);
  border-radius: 16px;
  padding: 2rem;
}

.fc-context-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.fc-context-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.fc-context-card ul {
  list-style: none;
  padding: 0;
}

.fc-context-card li {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  padding: 0.4rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.fc-context-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
}

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

@media (max-width: 1024px) {
  .fc-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .fc-results-sticky {
    position: static;
  }

  .fc-context {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .fc-rate-big {
    font-size: 3.5rem;
  }

  .fc-section {
    padding: 1.25rem;
  }

  .fc-result-hero {
    padding: 1.5rem;
  }

  .calc-header {
    padding: 2rem 0;
  }

  .fc-w2-amount {
    font-size: 1.5rem;
  }
}
