/* ==========================================================================
   Take-Home-Paycheck Calculator Stylesheet
   Matches Calculator Archive Design System & Reference Images 1 & 2
   ========================================================================== */

:root {
  --header-bg: #003366;
  --logo-green: #82c341;
  --link-blue: #0844a4;
  --link-hover: #002277;
  --sidebar-header: #24588e;
  --calc-green-btn: #38761d;
  --calc-green-hover: #275214;
  --calc-gray-btn: #808080;
  --calc-gray-hover: #666666;
  --form-bg: #f4f6f8;
  --form-border: #ccd5de;
  --table-border: #e2e8f0;
}

/* Base resets & typography */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #111827;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

*, *::before, *::after {
  box-sizing: border-box;
}

a {
  color: var(--link-blue);
  text-decoration: underline;
}

a:hover {
  color: var(--link-hover);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   SITE HEADER
   ========================================================================== */
.site-header {
  background-color: var(--header-bg) !important;
  height: 48px;
  width: 100%;
  position: relative;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.header-container {
  max-width: 980px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.logo {
  text-decoration: none !important;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
}

.logo-white {
  color: #ffffff !important;
  font-size: 25px !important;
  font-weight: 700 !important;
  letter-spacing: -0.3px;
  font-family: Arial, Helvetica, sans-serif;
}

.logo-green {
  color: var(--logo-green) !important;
  font-size: 25px !important;
  font-weight: 700 !important;
  font-family: Arial, Helvetica, sans-serif;
}

.lang-switcher-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-icon {
  color: #ffffff;
  flex-shrink: 0;
}

.lang-select {
  background: #ffffff;
  color: #000000;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  font-size: 12px;
  height: 24px;
  padding: 0 6px;
  cursor: pointer;
}

/* ==========================================================================
   PAGE CONTAINER & TOP UTILITY BAR
   ========================================================================== */
.paycheck-page-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 16px 48px;
}

.paycheck-breadcrumbs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: #4b5563;
  flex-wrap: wrap;
  gap: 8px;
}

.paycheck-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 5px;
}

.paycheck-breadcrumbs a {
  color: var(--link-blue);
  text-decoration: underline;
}

.paycheck-breadcrumbs .crumb-current {
  color: #6b7280;
  text-decoration: none;
}

.paycheck-top-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.paycheck-top-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--link-blue);
  text-decoration: underline;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}

.paycheck-top-link-btn:hover {
  color: var(--link-hover);
}

.paycheck-page-title {
  font-size: 22px;
  font-weight: bold;
  color: #003366;
  margin: 0 0 8px 0;
  letter-spacing: -0.2px;
}

.paycheck-page-intro {
  font-size: 12.5px;
  line-height: 1.55;
  color: #333333;
  margin: 0 0 16px 0;
}

/* ==========================================================================
   MAIN 2-COLUMN GRID
   ========================================================================== */
.paycheck-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 24px;
  align-items: start;
}

@media (max-width: 820px) {
  .paycheck-main-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   CALCULATOR FORM CARD (EXACT CLONE OF IMAGE 2)
   ========================================================================== */
.paycheck-calc-col {
  min-width: 0;
}

.paycheck-form-card {
  background-color: var(--form-bg);
  border: 1px solid var(--form-border);
  border-radius: 2px;
  padding: 12px 14px 16px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.paycheck-form-table {
  width: 100%;
  border-collapse: collapse;
}

.paycheck-form-table tr {
  border-bottom: 1px solid #e5e9ee;
}

.paycheck-form-table tr:last-child {
  border-bottom: none;
}

.paycheck-label-cell {
  width: 44%;
  padding: 5px 8px 5px 0;
  font-size: 12px;
  color: #222222;
  vertical-align: middle;
}

.paycheck-input-cell {
  width: 56%;
  padding: 5px 0 5px 8px;
  vertical-align: middle;
  font-size: 12px;
}

/* Input boxes styled like Image 2 */
.paycheck-input-row {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
}

.paycheck-input-group {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #7f9db9;
  border-radius: 1px;
  height: 24px;
  padding: 0 4px;
  width: 140px;
  box-sizing: border-box;
}

.paycheck-input-group:focus-within {
  border-color: #003366;
  outline: 1px solid #003366;
}

.paycheck-input-prefix {
  font-size: 12px;
  color: #444444;
  user-select: none;
  padding-right: 2px;
}

.paycheck-input-text {
  border: none;
  outline: none;
  background: transparent;
  font-size: 12px;
  font-family: inherit;
  color: #000000;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.paycheck-unit-label {
  font-size: 11.5px;
  color: #555555;
  user-select: none;
  white-space: nowrap;
}

.paycheck-note-text {
  font-size: 11px;
  color: #555555;
  margin-left: 6px;
  display: inline-block;
}

.paycheck-select {
  height: 24px;
  border: 1px solid #7f9db9;
  border-radius: 1px;
  background-color: #ffffff;
  font-size: 12px;
  padding: 0 4px;
  color: #000000;
  width: 140px;
  font-family: inherit;
}

.paycheck-select:focus {
  border-color: #003366;
  outline: 1px solid #003366;
}

.paycheck-input-narrow {
  width: 70px;
  height: 24px;
  border: 1px solid #7f9db9;
  border-radius: 1px;
  background: #ffffff;
  padding: 0 4px;
  font-size: 12px;
  font-family: inherit;
  color: #000000;
}

.paycheck-input-narrow:focus {
  border-color: #003366;
  outline: 1px solid #003366;
}

.paycheck-radio-group {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #222222;
}

.paycheck-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.paycheck-tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #889bb0;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: bold;
  cursor: help;
  margin-left: 2px;
  line-height: 1;
  text-decoration: none;
}

.paycheck-tooltip-icon:hover {
  background: #003366;
}

/* Action Buttons matching Image 2 */
.paycheck-actions-row {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-calc-submit {
  background-color: var(--calc-green-btn);
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  border: 1px solid #2d5e16;
  border-radius: 3px;
  padding: 5px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  font-family: inherit;
}

.btn-calc-submit:hover {
  background-color: var(--calc-green-hover);
}

.calc-arrow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: var(--calc-green-btn);
  width: 15px;
  height: 15px;
  border-radius: 50%;
  font-size: 9px;
  line-height: 1;
}

.btn-calc-clear {
  background-color: var(--calc-gray-btn);
  color: #ffffff;
  font-size: 12px;
  border: 1px solid #666666;
  border-radius: 2px;
  padding: 5px 14px;
  cursor: pointer;
  font-family: inherit;
}

.btn-calc-clear:hover {
  background-color: var(--calc-gray-hover);
}

/* ==========================================================================
   RESULTS SECTION & KPI SUMMARY CARDS
   ========================================================================== */
.paycheck-results-box {
  margin-top: 24px;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.paycheck-res-header {
  font-size: 17px;
  font-weight: bold;
  color: #003366;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

.paycheck-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

@media (max-width: 680px) {
  .paycheck-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.paycheck-kpi-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 10px 12px;
  text-align: center;
}

.paycheck-kpi-title {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
  font-weight: 600;
}

.paycheck-kpi-value {
  font-size: 18px;
  font-weight: bold;
  color: #003366;
}

.paycheck-kpi-value.highlight {
  color: #15803d;
}

/* Detailed Statutory Table */
.paycheck-stat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-bottom: 20px;
}

.paycheck-stat-table th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 600;
  padding: 8px 10px;
  text-align: right;
  border-bottom: 2px solid #cbd5e1;
}

.paycheck-stat-table th:first-child {
  text-align: left;
}

.paycheck-stat-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: right;
  color: #1e293b;
}

.paycheck-stat-table td:first-child {
  text-align: left;
}

.paycheck-stat-table tr:nth-child(even) {
  background-color: #fafbfc;
}

.paycheck-stat-table tr.total-row td {
  font-weight: bold;
  background-color: #f8fafc;
  border-top: 1px solid #94a3b8;
  border-bottom: 1px solid #94a3b8;
  color: #b91c1c;
}

.paycheck-stat-table tr.net-row td {
  font-weight: bold;
  font-size: 13px;
  background-color: #f0fdf4;
  color: #15803d;
  border-bottom: 2px solid #86efac;
}

/* W-4 Advice Box */
.paycheck-w4-card {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #003366;
  border-radius: 2px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 12px;
}

.paycheck-w4-title {
  font-weight: bold;
  font-size: 13px;
  color: #003366;
  margin-bottom: 8px;
}

.paycheck-w4-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}

@media (max-width: 600px) {
  .paycheck-w4-grid {
    grid-template-columns: 1fr;
  }
}

.paycheck-w4-item {
  color: #334155;
  line-height: 1.4;
}

.paycheck-w4-item strong {
  color: #0f172a;
}

/* ==========================================================================
   CHARTS & GRAPHS SECTION (REQUIREMENT 5)
   ========================================================================== */
.paycheck-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 700px) {
  .paycheck-charts-row {
    grid-template-columns: 1fr;
  }
}

.paycheck-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  padding: 12px;
  text-align: center;
}

.paycheck-chart-title {
  font-size: 12.5px;
  font-weight: bold;
  color: #334155;
  margin-bottom: 8px;
}

.paycheck-chart-svg-wrap {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paycheck-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  font-size: 11px;
  color: #475569;
  margin-top: 8px;
}

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

.paycheck-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

/* ==========================================================================
   FRACTION ARITHMETIC & PROPORTION SOLVER (REQUIREMENTS 1 & 5)
   ========================================================================== */
.paycheck-fraction-box {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  padding: 14px;
  margin-top: 24px;
}

.paycheck-fraction-header {
  font-size: 15px;
  font-weight: bold;
  color: #003366;
  margin-bottom: 6px;
}

.paycheck-fraction-desc {
  font-size: 12px;
  color: #475569;
  margin-bottom: 12px;
  line-height: 1.5;
}

.paycheck-fraction-ratios-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  padding: 8px 12px;
  margin-bottom: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
}

.paycheck-fraction-ratio-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.paycheck-ratio-pill {
  font-weight: bold;
  color: #003366;
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid #e2e8f0;
}

.paycheck-fraction-calc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #ffffff;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  margin-bottom: 12px;
}

.fraction-stacked-input {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.fraction-stacked-input input {
  width: 50px;
  height: 22px;
  text-align: center;
  font-size: 12px;
  border: 1px solid #7f9db9;
  border-radius: 1px;
}

.fraction-divider-line {
  width: 48px;
  height: 1.5px;
  background: #000000;
}

.fraction-op-select {
  height: 26px;
  border: 1px solid #7f9db9;
  font-size: 14px;
  font-weight: bold;
  background: #ffffff;
  border-radius: 2px;
  padding: 0 4px;
}

.fraction-equal-sign {
  font-size: 18px;
  font-weight: bold;
  color: #334155;
}

.fraction-result-container {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 2px;
  padding: 4px 10px;
  min-width: 60px;
}

.fraction-res-value {
  font-size: 14px;
  font-weight: bold;
  color: #15803d;
}

.fraction-dec-value {
  font-size: 11px;
  color: #475569;
}

.fraction-btn-calculate {
  background: #003366;
  color: #ffffff;
  border: 1px solid #002244;
  border-radius: 2px;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 12px;
  cursor: pointer;
  font-family: inherit;
}

.fraction-btn-calculate:hover {
  background: #0844a4;
}

.fraction-step-output {
  font-size: 12px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  padding: 8px 12px;
  font-family: monospace;
}

/* ==========================================================================
   RIGHT SIDEBAR (EXACT CLONE OF IMAGE 2)
   ========================================================================== */
.paycheck-sidebar {
  width: 100%;
}

.paycheck-side-search-box {
  display: flex;
  margin-bottom: 12px;
  position: relative;
}

.paycheck-side-search-input {
  flex: 1;
  min-width: 0;
  height: 26px;
  border: 1px solid #7f9db9;
  border-right: none;
  padding: 0 8px;
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.paycheck-side-search-input:focus {
  border-color: #003366;
}

.paycheck-side-search-btn {
  background-color: var(--sidebar-header);
  color: #ffffff;
  border: 1px solid var(--sidebar-header);
  padding: 0 12px;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  height: 26px;
  font-family: inherit;
}

.paycheck-side-search-btn:hover {
  background-color: #1a436a;
}

.paycheck-search-dropdown {
  position: absolute;
  top: 27px;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #7f9db9;
  border-top: none;
  z-index: 5000;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  display: none;
}

.paycheck-search-item {
  padding: 6px 8px;
  font-size: 12px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.paycheck-search-item:hover,
.paycheck-search-item.selected {
  background-color: #f1f5f9;
  color: #003366;
}

.paycheck-search-item-cat {
  font-size: 10px;
  color: #94a3b8;
  text-transform: uppercase;
}

/* Sidebar Financial Calculators Card */
.paycheck-side-card {
  border: 1px solid #7f9db9;
  border-radius: 1px;
  overflow: hidden;
  background: #ffffff;
}

.paycheck-side-card-header {
  background-color: var(--sidebar-header);
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 10px;
  text-align: left;
}

.paycheck-side-links-grid {
  display: flex;
  padding: 8px 10px;
  gap: 12px;
  background: #ffffff;
}

.paycheck-side-col {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
}

.paycheck-side-col li {
  margin-bottom: 4px;
  line-height: 1.45;
}

.paycheck-side-col li a {
  font-size: 12px;
  color: var(--link-blue);
  text-decoration: underline;
  display: inline-block;
  white-space: nowrap;
}

.paycheck-side-col li a:hover {
  color: var(--link-hover);
}

.paycheck-side-card-footer {
  border-top: 1px solid #cbd5e1;
  background-color: #f1f5f9;
  padding: 6px 8px;
  font-size: 11px;
  text-align: center;
  color: #475569;
}

.paycheck-side-card-footer a {
  color: var(--link-blue);
  text-decoration: underline;
  margin: 0 3px;
}

.paycheck-side-card-footer a:hover {
  color: var(--link-hover);
}

/* ==========================================================================
   MODAL DIALOGS (IMAGE 1 INSTANT TOOL, HISTORY, STATE TAX LOOKUP)
   ========================================================================== */
.paycheck-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  box-sizing: border-box;
}

.paycheck-modal-card {
  background-color: #ffffff;
  border-radius: 2px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  border: 1px solid #7f9db9;
  animation: paycheckModalFadeIn 0.2s ease-out;
}

@keyframes paycheckModalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.paycheck-modal-header {
  background-color: #24588e;
  color: #ffffff;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.paycheck-modal-title {
  margin: 0;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: -0.2px;
}

.paycheck-modal-close-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
}

.paycheck-modal-body {
  padding: 14px 16px 18px;
  font-size: 12px;
}

.paycheck-modal-desc {
  margin: 0 0 14px 0;
  color: #555555;
  font-size: 12px;
  line-height: 1.4;
}

.paycheck-modal-row {
  margin-bottom: 12px;
}

.paycheck-modal-row label {
  display: block;
  font-size: 12px;
  font-weight: bold;
  color: #333333;
  margin-bottom: 4px;
}

.paycheck-modal-row input {
  width: 100%;
  height: 26px;
  border: 1px solid #7f9db9;
  border-radius: 1px;
  padding: 2px 6px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

.paycheck-modal-row input:focus {
  border-color: #003366;
  outline: 1px solid #003366;
}

.paycheck-modal-btn {
  background-color: #24588e;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: bold;
  border: 1px solid #1a436a;
  border-radius: 2px;
  padding: 6px 14px;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
  font-family: inherit;
}

.paycheck-modal-btn:hover {
  background-color: #1a436a;
}

.paycheck-modal-res-box {
  margin-top: 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
  padding: 10px 12px;
}

/* History Table in Modal */
.paycheck-hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  margin-top: 10px;
}

.paycheck-hist-table th {
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  padding: 5px 6px;
  text-align: left;
}

.paycheck-hist-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #e2e8f0;
}

/* ==========================================================================
   SEO / ARTICLE & FAQ SECTION
   ========================================================================== */
.paycheck-seo-article {
  margin-top: 32px;
  font-size: 13px;
  line-height: 1.65;
  color: #334155;
}

.paycheck-seo-article h2 {
  font-size: 18px;
  font-weight: bold;
  color: #003366;
  margin: 24px 0 10px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}

.paycheck-seo-article h3 {
  font-size: 14.5px;
  font-weight: bold;
  color: #003366;
  margin: 18px 0 6px;
}

.paycheck-seo-article p {
  margin: 0 0 12px;
}

.paycheck-faq-item {
  border: 1px solid #e2e8f0;
  border-radius: 3px;
  margin-bottom: 8px;
  background: #ffffff;
  overflow: hidden;
}

.paycheck-faq-question {
  padding: 10px 14px;
  font-weight: bold;
  font-size: 13px;
  color: #003366;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.paycheck-faq-question:hover {
  background: #f1f5f9;
}

.paycheck-faq-answer {
  padding: 12px 14px;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.6;
  border-top: 1px solid #e2e8f0;
  display: none;
}

.paycheck-faq-item.open .paycheck-faq-answer {
  display: block;
}

.paycheck-faq-item.open .paycheck-faq-question span:last-child {
  transform: rotate(180deg);
}

/* ==========================================================================
   PRINT STYLES & STATEMENT EXPORT (REQUIREMENT 3)
   ========================================================================== */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* When printing statement from modal */
  body.paycheck-printing-modal .site-header,
  body.paycheck-printing-modal .paycheck-page-container,
  body.paycheck-printing-modal .paycheck-modal-header,
  body.paycheck-printing-modal .paycheck-modal-actions-bar,
  body.paycheck-printing-modal #instantToolModal,
  body.paycheck-printing-modal #savedCalcModal {
    display: none !important;
  }

  body.paycheck-printing-modal #paycheckPrintModal {
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  body.paycheck-printing-modal .paycheck-modal-card {
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  body.paycheck-printing-modal .paycheck-modal-body {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  /* When printing regular page (not from modal) */
  body:not(.paycheck-printing-modal) .site-header,
  body:not(.paycheck-printing-modal) .paycheck-sidebar,
  body:not(.paycheck-printing-modal) .paycheck-top-links,
  body:not(.paycheck-printing-modal) .paycheck-actions-row,
  body:not(.paycheck-printing-modal) .paycheck-fraction-calc-row,
  body:not(.paycheck-printing-modal) .paycheck-modal-overlay,
  body:not(.paycheck-printing-modal) .paycheck-faq-item span:last-child {
    display: none !important;
  }

  body:not(.paycheck-printing-modal) .paycheck-main-grid {
    grid-template-columns: 100% !important;
  }

  body:not(.paycheck-printing-modal) .paycheck-page-container {
    max-width: 100% !important;
    padding: 0 !important;
  }

  body:not(.paycheck-printing-modal) .paycheck-form-card,
  body:not(.paycheck-printing-modal) .paycheck-results-box,
  body:not(.paycheck-printing-modal) .paycheck-fraction-box {
    border: 1px solid #999999 !important;
    box-shadow: none !important;
  }
}

/* ==========================================================================
   SITE FOOTER (Standard Calculator Archive Specification)
   ========================================================================== */
.site-footer {
  background-color: var(--footer-bg, #e9e9e9) !important;
  border-top: 1px solid var(--footer-border, #d4d4d4) !important;
  padding: 24px 0 32px 0 !important;
  width: 100% !important;
  margin-top: 40px !important;
  clear: both !important;
  display: block !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

.footer-container {
  max-width: 980px !important;
  margin: 0 auto !important;
  padding: 0 16px !important;
  box-sizing: border-box !important;
}

.footer-desc {
  font-size: 12px !important;
  color: #555555 !important;
  line-height: 1.55 !important;
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  text-align: left !important;
}

.footer-links-row {
  text-align: center !important;
  margin-top: 18px !important;
  font-size: 12.5px !important;
  color: #666666 !important;
}

.footer-link {
  color: var(--link-blue, #0844a4) !important;
  text-decoration: none !important;
  margin: 0 4px !important;
}

.footer-link:hover {
  text-decoration: underline !important;
}

.footer-copyright {
  margin-left: 10px !important;
  margin-inline-start: 10px !important;
  color: #666666 !important;
}

/* Search Dropdown Improvements */
.paycheck-search-item {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
}

.paycheck-search-item-title {
  color: #1b365d !important;
  font-weight: 500 !important;
}

.paycheck-search-item-cat {
  font-size: 10.5px !important;
  color: #64748b !important;
  background: #f1f5f9 !important;
  padding: 1px 6px !important;
  border-radius: 3px !important;
  white-space: nowrap !important;
}

.paycheck-search-empty {
  padding: 10px 12px !important;
  font-size: 12px !important;
  color: #64748b !important;
  text-align: center !important;
}

/* RTL Support for Arabic */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .paycheck-label-cell {
  text-align: right;
  padding: 5px 0 5px 8px;
}

[dir="rtl"] .paycheck-input-cell {
  text-align: right;
  padding: 5px 8px 5px 0;
}

[dir="rtl"] .paycheck-stat-table th,
[dir="rtl"] .paycheck-stat-table td {
  text-align: left;
}

[dir="rtl"] .paycheck-stat-table th:first-child,
[dir="rtl"] .paycheck-stat-table td:first-child {
  text-align: right;
}

[dir="rtl"] .footer-desc {
  text-align: right !important;
}

[dir="rtl"] .footer-links-row {
  direction: rtl !important;
}

[dir="rtl"] .footer-copyright {
  margin-left: 0 !important;
  margin-right: 10px !important;
  margin-inline-start: 10px !important;
}
