/* =========================================================
   Take Home Pay Calculator - Premium Stylesheet
   Designed for SEOsuite.net | 100% Responsive & Accessible
   ========================================================= */

:root {
  --thp-emerald: #059669;
  --thp-emerald-light: #ecfdf5;
  --thp-emerald-dark: #047857;
  --thp-teal: #0d9488;
  --thp-teal-light: #f0fdfa;
  --thp-blue: #0284c7;
  --thp-blue-light: #f0f9ff;
  --thp-navy: #0f172a;
  --thp-slate: #334155;
  --thp-muted: #64748b;
  --thp-border: #e2e8f0;
  --thp-card-bg: #ffffff;
  --thp-radius: 12px;
  --thp-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --thp-shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
}

.thp-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* 16px Base Paragraph Typography */
.thp-para,
.thp-content p,
.thp-content li,
.thp-content dl,
.thp-disclaimer p {
  font-size: 16px !important;
  line-height: 1.68 !important;
  color: #334155 !important;
  margin-bottom: 16px;
}

/* Headings in explicit PX */
.thp-hero-title {
  font-size: 32px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 10px 0 14px 0;
}

.thp-section-h2,
.thp-content h2 {
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.01em;
  margin: 34px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #f1f5f9;
}

.thp-content h3 {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
  margin: 24px 0 12px 0;
}

/* Hero Badge */
.thp-hero {
  margin: 30px 0px;
}

.thp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--thp-emerald-light);
  color: var(--thp-emerald);
  border: 1px solid #a7f3d0;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 8px;
}

/* Main Tool Container Card */
.thp-card {
  background: var(--thp-card-bg);
  border: 1.5px solid var(--thp-border);
  border-radius: var(--thp-radius);
  box-shadow: var(--thp-shadow-md);
  padding: 24px;
  margin-bottom: 30px;
}

/* Presets Bar */
.thp-presets-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 20px;
  border-bottom: 1.5px solid #f1f5f9;
}

.thp-preset-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--thp-muted);
  letter-spacing: 0.05em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.thp-preset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--thp-slate);
  border: 1px solid var(--thp-border);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.thp-preset-btn:hover {
  background: var(--thp-emerald-light);
  color: var(--thp-emerald);
  border-color: #a7f3d0;
  transform: translateY(-1px);
}

.thp-preset-btn.active {
  background: var(--thp-emerald);
  color: #ffffff;
  border-color: var(--thp-emerald);
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

/* Mode Switcher Tabs */
.thp-mode-tabs {
  display: flex;
  background: #f1f5f9;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}

.thp-mode-btn {
  flex: 1;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--thp-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.18s ease;
}

.thp-mode-btn.active {
  background: #ffffff;
  color: var(--thp-emerald);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

/* Form Groups & Inputs */
.thp-form-group {
  margin-bottom: 16px;
}

.thp-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.thp-label-hint {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--thp-muted);
}

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

.thp-prefix {
  position: absolute;
  left: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #64748b;
  pointer-events: none;
  z-index: 2;
}

.thp-suffix {
  position: absolute;
  right: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  pointer-events: none;
}

.thp-input,
.thp-select {
  width: 100%;
  height: 44px;
  padding: 8px 14px;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid var(--thp-border);
  border-radius: 8px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.thp-input.has-prefix {
  padding-left: 28px !important;
}

.thp-input.has-suffix {
  padding-right: 36px !important;
}

.thp-input:focus,
.thp-select:focus {
  outline: none;
  border-color: var(--thp-emerald);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
  background: #ffffff;
}

/* Accordion Advanced Sections */
.thp-accordion-card {
  border: 1.5px solid var(--thp-border);
  border-radius: 10px;
  margin-bottom: 12px;
  background: #f8fafc;
  overflow: hidden;
  transition: all 0.2s ease;
}

.thp-accordion-card.open {
  background: #ffffff;
  border-color: #cbd5e1;
}

.thp-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
}

.thp-acc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.thp-acc-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: #e2e8f0;
  color: #475569;
}

.thp-accordion-card.open .thp-acc-badge {
  background: var(--thp-emerald-light);
  color: var(--thp-emerald);
}

.thp-acc-arrow {
  font-size: 12px;
  color: #64748b;
  transition: transform 0.25s ease;
}

.thp-accordion-card.open .thp-acc-arrow {
  transform: rotate(180deg);
  color: var(--thp-emerald);
}

.thp-accordion-body {
  display: none;
  padding: 4px 16px 16px;
  border-top: 1px solid #f1f5f9;
}

.thp-accordion-card.open .thp-accordion-body {
  display: block;
}

/* Actions Row */
.thp-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.thp-btn-calc {
  flex: 2;
  height: 48px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  transition: all 0.2s ease;
}

.thp-btn-calc:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
}

.thp-btn-reset {
  flex: 1;
  height: 48px;
  background: #f1f5f9;
  color: var(--thp-slate);
  font-size: 15px;
  font-weight: 600;
  border: 1.5px solid var(--thp-border);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s ease;
}

.thp-btn-reset:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Results Column Styling */
.thp-results-box {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1.5px solid var(--thp-border);
  border-radius: 12px;
  padding: 22px;
}

.thp-result-headline {
  text-align: center;
  margin-bottom: 20px;
}

.thp-result-pay-label {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--thp-muted);
  margin-bottom: 4px;
}

.thp-result-pay-val {
  font-size: 38px;
  font-weight: 900;
  color: var(--thp-emerald);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.thp-result-period-pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  background: var(--thp-emerald-light);
  color: var(--thp-emerald);
  padding: 2px 10px;
  border-radius: 9999px;
  margin-top: 6px;
  border: 1px solid #a7f3d0;
}

/* Key Metrics Grid */
.thp-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.thp-metric-card {
  background: #ffffff;
  border: 1px solid var(--thp-border);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.thp-metric-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--thp-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.thp-metric-value {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

/* Horizontal Stacked Bar */
.thp-stacked-bar-wrap {
  margin-bottom: 20px;
}

.thp-stacked-bar {
  display: flex;
  height: 14px;
  border-radius: 9999px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.thp-bar-seg {
  height: 100%;
  transition: width 0.4s ease;
}

.thp-bar-seg.seg-net { background: #059669; }
.thp-bar-seg.seg-fed { background: #0284c7; }
.thp-bar-seg.seg-state { background: #ea580c; }
.thp-bar-seg.seg-fica { background: #8b5cf6; }
.thp-bar-seg.seg-pretax { background: #0d9488; }
.thp-bar-seg.seg-posttax { background: #e11d48; }

.thp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  margin-top: 8px;
  justify-content: center;
}

.thp-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.thp-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

/* Detailed Tax Breakdown List */
.thp-breakdown-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  border-top: 1px solid var(--thp-border);
}

.thp-breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 4px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13.5px;
}

.thp-breakdown-row.total-row {
  font-weight: 800;
  font-size: 14.5px;
  color: #0f172a;
  border-bottom: 1.5px solid var(--thp-border);
  background: #f8fafc;
  padding: 10px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

.thp-row-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--thp-slate);
}

.thp-row-val {
  font-weight: 700;
  color: #0f172a;
}

.thp-row-val.text-green { color: #059669; }
.thp-row-val.text-red { color: #dc2626; }

/* Donut Chart & Visual Circular Progress */
.thp-chart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid #f1f5f9;
}

.thp-donut-svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.thp-donut-bg {
  fill: none;
  stroke: #e2e8f0;
  stroke-width: 14;
}

.thp-donut-val {
  fill: none;
  stroke: var(--thp-emerald);
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke-dasharray 0.6s ease;
}

/* Paycheck Comparison Multi-Frequency Table */
.thp-table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--thp-border);
  border-radius: 10px;
  margin: 24px 0;
  background: #ffffff;
}

.thp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: right;
}

.thp-table th,
.thp-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
}

.thp-table th {
  background: #f8fafc;
  font-weight: 800;
  color: #1e293b;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.thp-table th:first-child,
.thp-table td:first-child {
  text-align: left;
}

.thp-table tr:hover td {
  background: #f8fafc;
}

.thp-table tr.highlight-net td {
  font-weight: 800;
  background: #ecfdf5;
  color: #065f46;
  border-top: 1.5px solid #a7f3d0;
  border-bottom: 1.5px solid #a7f3d0;
}

/* Scenario Comparison Tool */
.thp-scenario-card {
  background: #ffffff;
  border: 1.5px solid var(--thp-border);
  border-radius: var(--thp-radius);
  padding: 20px;
  margin-top: 24px;
}

.thp-scenario-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.thp-scenario-col {
  background: #f8fafc;
  border: 1px solid var(--thp-border);
  border-radius: 8px;
  padding: 14px;
}

.thp-scenario-col.active {
  background: #ffffff;
  border-color: var(--thp-emerald);
  box-shadow: 0 0 0 1px var(--thp-emerald);
}

.thp-scenario-header {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Educational / SEO Content Sections */
.thp-content {
  margin-top: 40px;
}

.thp-faq-card {
  background: #ffffff;
  border: 1.5px solid var(--thp-border);
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 18px 20px;
}

.thp-faq-q {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

/* Export Buttons Bar */
.thp-export-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.thp-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--thp-border);
  background: #ffffff;
  color: var(--thp-slate);
  cursor: pointer;
  transition: all 0.15s ease;
}

.thp-export-btn:hover {
  background: #f1f5f9;
  color: var(--thp-emerald);
  border-color: #cbd5e1;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
  .thp-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .thp-chart-container {
    flex-direction: column;
  }

  .thp-scenario-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .thp-card {
    padding: 16px;
  }

  .thp-hero-title {
    font-size: 24px !important;
  }

  .thp-result-pay-val {
    font-size: 30px;
  }

  .thp-actions-row {
    flex-direction: column;
  }

  .thp-btn-calc,
  .thp-btn-reset {
    width: 100%;
  }

  .thp-metrics-grid {
    grid-template-columns: 1fr;
  }
}

