/* =============================================================
   Paycheck Calculator — paycheck-calculator.css
   Mobile-first. Scoped to .pc-wrap
   ============================================================= */

.pc-wrap *, .pc-wrap *::before, .pc-wrap *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}

.pc-wrap {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  color: #1e293b;
  max-width: 1000px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────── */
.pc-header {
  padding: 24px 24px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.pc-title {
  font-size: 22px; font-weight: 700; color: #1e3a5f; margin-bottom: 4px;
}
.pc-subtitle { font-size: 13.5px; color: #64748b; }

/* ── Body ─────────────────────────────────────────────────── */
.pc-body { display: flex; flex-direction: column; }

@media (min-width: 720px) {
  .pc-body { flex-direction: row; align-items: flex-start; }
  .pc-inputs  { width: 55%; border-right: 1px solid #e2e8f0; }
  .pc-results { width: 45%; position: sticky; top: 0; }
}

/* ── Inputs ───────────────────────────────────────────────── */
.pc-inputs {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pc-field { display: flex; flex-direction: column; gap: 7px; }

.pc-label-row {
  display: flex; justify-content: space-between; align-items: center; gap: 4px;
}
.pc-label { font-size: 13px; font-weight: 600; color: #334155; }
.pc-hint  { font-size: 11.5px; color: #94a3b8; }

/* Toggle buttons */
.pc-toggle-group {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.pc-toggle-btn {
  padding: 11px; border: 1.5px solid #cbd5e1; border-radius: 8px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  background: #f8fafc; color: #475569; transition: all .15s;
}
.pc-toggle-btn.active { background: #0F6E56; border-color: #0F6E56; color: #fff; }
.pc-toggle-btn:hover:not(.active) { border-color: #0F6E56; color: #0F6E56; }

/* Select */
.pc-select {
  width: 100%; padding: 10px 12px; height: 44px;
  border: 1.5px solid #cbd5e1; border-radius: 8px;
  font-size: 14px; color: #1e293b; background: #f8fafc;
  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 fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px; transition: border-color .18s;
}
.pc-select:focus { outline: none; border-color: #0F6E56; background-color: #fff; }

/* Inputs with prefix/suffix */
.pc-prefix-wrap, .pc-suffix-wrap {
  display: flex; align-items: center;
  border: 1.5px solid #cbd5e1; border-radius: 8px;
  overflow: hidden; background: #f8fafc; transition: border-color .18s;
}
.pc-prefix-wrap:focus-within,
.pc-suffix-wrap:focus-within { border-color: #0F6E56; background: #fff; }

.pc-prefix, .pc-suffix {
  padding: 0 10px; font-size: 14px; font-weight: 600;
  color: #64748b; background: #f1f5f9; height: 44px;
  display: flex; align-items: center; flex-shrink: 0;
}
.pc-prefix { border-right: 1px solid #e2e8f0; }
.pc-suffix  { border-left:  1px solid #e2e8f0; }

.pc-input {
  flex: 1; border: none; background: transparent;
  padding: 0 12px; height: 44px; font-size: 14px;
  color: #1e293b; outline: none; min-width: 0;
  -moz-appearance: textfield;
}
.pc-input::-webkit-outer-spin-button,
.pc-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Plain input (no wrap) */
.pc-input-plain {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1.5px solid #cbd5e1; border-radius: 8px;
  font-size: 14px; color: #1e293b; background: #f8fafc;
  outline: none; transition: border-color .18s;
  -moz-appearance: textfield;
}
.pc-input-plain:focus { border-color: #0F6E56; background: #fff; }
.pc-input-plain::-webkit-outer-spin-button,
.pc-input-plain::-webkit-inner-spin-button { -webkit-appearance: none; }

.pc-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Divider */
.pc-divider {
  display: flex; align-items: center; gap: 10px;
  color: #94a3b8; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
}
.pc-divider::before, .pc-divider::after {
  content: ''; flex: 1; height: 1px; background: #e2e8f0;
}

/* ── Results ──────────────────────────────────────────────── */
.pc-results {
  padding: 20px; display: flex; flex-direction: column;
  gap: 14px; background: #f8fafc;
}

/* Hero */
.pc-hero-card {
  background: #0F6E56; border-radius: 12px;
  padding: 22px 20px; text-align: center; color: #fff;
}
.pc-hero-label {
  font-size: 12px; font-weight: 700; opacity: .8;
  text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px;
}
.pc-hero-amount {
  font-size: 44px; font-weight: 800;
  letter-spacing: -.02em; line-height: 1;
}
.pc-hero-sub { font-size: 13px; opacity: .75; margin-top: 6px; }

/* Breakdown card */
.pc-breakdown-card, .pc-annual-card {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 12px; padding: 16px;
}
.pc-bk-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: #94a3b8; margin-bottom: 10px;
}
.pc-bk-section {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em; color: #64748b;
  margin: 10px 0 6px; padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
.pc-bk-section:first-of-type { margin-top: 0; border-top: none; padding-top: 0; }

.pc-bk-row {
  display: flex; justify-content: space-between;
  align-items: center; padding: 5px 0;
  font-size: 13px; color: #475569;
  border-bottom: 1px solid #f8fafc;
}
.pc-bk-row:last-child { border-bottom: none; }

.pc-bk-gross { font-weight: 600; color: #1e293b; font-size: 14px; }
.pc-bk-net   {
  font-size: 15px; font-weight: 700; color: #0F6E56;
  border-top: 1.5px solid #e2e8f0; margin-top: 6px;
  padding-top: 10px; border-bottom: none;
}
.pc-deduct { color: #E24B4A; font-weight: 500; }

/* Annual grid */
.pc-annual-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.pc-annual-item {
  background: #f8fafc; border-radius: 8px; padding: 10px 12px;
}
.pc-annual-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; color: #94a3b8; margin-bottom: 4px;
}
.pc-annual-val  { font-size: 15px; font-weight: 700; color: #1e3a5f; }
.pc-annual-val.pc-red   { color: #E24B4A; }
.pc-annual-val.pc-green { color: #0F6E56; }

/* Actions */
.pc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-btn {
  flex: 1; min-width: 90px; padding: 11px 10px;
  border-radius: 9px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; border: none; transition: opacity .18s;
}
.pc-btn:hover { opacity: .85; }
.pc-btn-pdf   { background: #185FA5; color: #fff; }
.pc-btn-print { background: #0F6E56; color: #fff; }
.pc-btn-reset { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

/* ── Pay stub (print only) ────────────────────────────────── */
.pc-paystub {
  padding: 32px; border-top: 1px solid #e2e8f0;
}

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  .pc-header  { padding: 18px 16px 14px; }
  .pc-inputs, .pc-results { padding: 16px; }
  .pc-title   { font-size: 19px; }
  .pc-hero-amount { font-size: 36px; }
  .pc-annual-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .pc-inputs, .pc-hero-card, .pc-actions,
  .pc-annual-card, .pc-breakdown-card { display: none !important; }
  .pc-body    { display: block; }
  .pc-results { display: none; }
  .pc-wrap    { border: none; border-radius: 0; }
  .pc-paystub { display: block !important; }
}
