/* =============================================
   YourNetSalary — Calculator Page Styles
   ============================================= */

.calc-page {
  padding: 48px 0 80px;
}

.calc-page__layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 40px;
  align-items: start;
}

/* --------- Input Panel --------- */

.calc-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 88px;
}

.calc-panel__header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.calc-panel__title {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.calc-panel__sub {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.calc-panel__updated {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--positive);
  background: rgba(5,150,105,0.08);
  padding: 2px 8px;
  border-radius: 100px;
}

/* Salary input */
.salary-input-group {
  position: relative;
  margin-bottom: 14px;
}
.salary-currency-prefix {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
  pointer-events: none;
}
.salary-input {
  width: 100%;
  padding: 13px 14px 13px 56px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--input-bg);
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.salary-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(29,111,164,0.12);
  background: var(--surface);
}
.salary-input::-webkit-inner-spin-button,
.salary-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Period toggle */
.period-toggle {
  display: flex;
  background: var(--input-bg);
  border-radius: var(--radius);
  padding: 3px;
  margin-bottom: 20px;
  gap: 2px;
}
.period-toggle__btn {
  flex: 1;
  padding: 7px;
  background: none;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.period-toggle__btn.active {
  background: var(--surface);
  color: var(--primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

/* Options */
.calc-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.calc-field { position: relative; }
.calc-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.calc-select {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--input-bg);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748B' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s;
}
.calc-select:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: var(--surface);
}

/* --------- Results Panel --------- */

.results-panel { }

.results-empty {
  background: var(--surface);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  color: var(--text-muted);
}
.results-empty svg {
  margin: 0 auto 16px;
  opacity: 0.3;
}

.results-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Take-home hero */
.results-hero {
  background: var(--primary);
  padding: 32px;
  text-align: center;
}
.results-hero__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
}
.results-hero__amount {
  font-family: var(--font-head);
  font-size: 52px;
  font-weight: 700;
  color: var(--amber-light);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.results-hero__period {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}
.results-hero__sub {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 24px;
}
.results-hero__sub-item {
  text-align: center;
}
.results-hero__sub-label {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 2px;
}
.results-hero__sub-value {
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  color: rgba(255,255,255,0.8);
  font-variant-numeric: tabular-nums;
}

/* Effective rate bar */
.effective-rate {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}
.effective-rate__labels {
  flex-shrink: 0;
  min-width: 120px;
}
.effective-rate__title {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.effective-rate__value {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}
.rate-bar {
  flex: 1;
  height: 8px;
  background: var(--input-bg);
  border-radius: 100px;
  overflow: hidden;
}
.rate-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cta), var(--amber));
  border-radius: 100px;
  transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.effective-rate__marginal {
  flex-shrink: 0;
  text-align: right;
}
.effective-rate__marginal-label { font-size: 12px; color: var(--text-muted); }
.effective-rate__marginal-value {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: var(--negative);
  font-variant-numeric: tabular-nums;
}

/* Breakdown table */
.breakdown {
  padding: 24px 28px;
}
.breakdown__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.breakdown__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.breakdown__table tr + tr td { border-top: 1px solid var(--border); }
.breakdown__table td {
  padding: 12px 0;
  vertical-align: middle;
}
.breakdown__table td:last-child {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-head);
}
.breakdown__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 10px;
  flex-shrink: 0;
  vertical-align: middle;
}
.breakdown__item-cell { display: flex; align-items: center; }
.breakdown__label { color: var(--text); }
.breakdown__label--sub { font-size: 12px; color: var(--text-muted); display: block; }

.breakdown__row--gross { font-weight: 600; }
.breakdown__row--gross td:last-child { color: var(--text); }
.breakdown__row--deduction td:last-child { color: var(--negative); }
.breakdown__row--net td { border-top: 2px solid var(--primary) !important; }
.breakdown__row--net td:first-child {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--primary);
}
.breakdown__row--net td:last-child {
  font-family: var(--font-head);
  font-size: 16px;
  color: var(--amber);
}

/* Toggle: Annual / Monthly */
.results-toggle {
  padding: 16px 28px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg);
}
.results-toggle__label { font-size: 13px; color: var(--text-muted); }
.results-toggle__tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.results-toggle__tab {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: none;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.results-toggle__tab.active {
  background: var(--primary);
  color: #fff;
}

/* Source note */
.results-source {
  padding: 16px 28px;
  background: rgba(199,123,45,0.04);
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}
.results-source a { color: var(--cta); }

/* Ad slot between input and results — hidden until AdSense is live */
.calc-page__ad {
  display: none;
}

/* --------- Profession salary context --------- */

.salary-context {
  margin-top: 28px;
  padding: 20px;
  background: rgba(13,33,55,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.salary-context__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}
.salary-context__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.salary-context__item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.salary-context__item a { color: var(--cta); font-weight: 500; }
.salary-context__item span { color: var(--text-muted); }

/* --------- Responsive --------- */

@media (max-width: 960px) {
  .calc-page__layout {
    grid-template-columns: 1fr;
  }
  .calc-panel {
    position: static;
  }
}

@media (max-width: 480px) {
  .results-hero { padding: 24px 20px; }
  .results-hero__amount { font-size: 40px; }
  .results-hero__sub { gap: 16px; }
  .breakdown { padding: 20px; }
  .effective-rate { padding: 20px; flex-wrap: wrap; }
  .effective-rate__marginal { text-align: left; }
}
