/* =========================================================
   TAXRUNNER WIDGET – FULL SaaS STYLESHEET
   Includes all UI previously in default.php
   ========================================================= */


/* =========================
   Footer Stripe Restore
========================= */

.site-footer{
  background:#000;
  color:#fff;
  width:100%;
}

.site-footer .footer-inner{
  max-width:1200px;
  margin:0 auto;
  padding:16px 20px;
  font-size:14px;
}


/* =========================
   BASE / RESET
   ========================= */

.taxrunner-widget *,
.taxrunner-widget *::before,
.taxrunner-widget *::after {
  box-sizing: border-box;
}

.taxrunner-widget {
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color: #111827;
}


/* =========================
   WIDGET BOX
   ========================= */

.taxrunner-widget .box {
  max-width: 520px;
  margin: 40px auto;
  background: #fff;
  padding: 22px;
  border-radius: 8px;
}


/* =========================
   HERO
   ========================= */

.taxrunner-widget .hero {
  background: #0b1f3b;
  color: #fff;
}

.taxrunner-widget .hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 20px 32px;
}

.taxrunner-widget .hero h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.taxrunner-widget .hero p {
  font-size: 16px;
  max-width: 720px;
  line-height: 1.5;
  color: #c7d2fe;
}


/* =========================
   INPUT LAYOUT
   ========================= */

.taxrunner-widget label {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
}

.taxrunner-widget input,
.taxrunner-widget select {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  font-family: inherit;
  transition: border-color .15s ease,
              box-shadow .15s ease;
}

.taxrunner-widget input[inputmode="numeric"] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.taxrunner-widget input::placeholder {
  color: #9ca3af;
}

.taxrunner-widget input:focus,
.taxrunner-widget select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}


/* =========================
   BUTTONS
   ========================= */

.taxrunner-widget .button-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.taxrunner-widget button {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 4px;
  cursor: pointer;
}

.taxrunner-widget #run-tax-widget {
  background: #2563eb;
  color: #fff;
  border: 1px solid #2563eb;
}

.taxrunner-widget #run-tax-widget:hover {
  background: #1e40af;
}

.taxrunner-widget #clear-tax-widget {
  background: #fff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.taxrunner-widget #clear-tax-widget:hover {
  background: #f3f4f6;
}


/* =========================
   ANI PANEL
   ========================= */

.taxrunner-widget .ani-panel {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid #e3e7ee;
  border-radius: 8px;
  background: #fafbfd;
}

.taxrunner-widget .ani-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.taxrunner-widget .ani-result-row {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid #e3e7ee;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.taxrunner-widget .ani-text small {
  display: block;
  opacity: .6;
}

.taxrunner-widget .ani-value {
  font-size: 1.25rem;
  font-weight: 600;
}


/* =========================
   WOW FIELDS
   ========================= */

.taxrunner-widget .wow-field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin-top: 10px;
  border: 2px solid #2563eb;
  border-radius: 8px;
  background: linear-gradient(
    90deg,#f0f7ff 0%,#fff 60%
  );
}

.taxrunner-widget .wow-label {
  flex: 1;
  font-weight: 600;
  color: #1e3a8a;
}

.taxrunner-widget .wow-label small {
  display: block;
  font-size: 12px;
  color: #475569;
  margin-top: 2px;
}

.taxrunner-widget .wow-field input {
  width: 140px;
  text-align: right;
  font-weight: 700;
}


/* =========================
   TAX GRID
   ========================= */

.taxrunner-widget .tax-grid {
  display: grid;
  grid-template-columns:
    28% 16% 16% 16% 8% 16%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  font-size: 13px;
  background: #fff;
  margin-top: 6px;
}

.taxrunner-widget .cell {
  padding: 4px 6px;
  border-right: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  text-align: right;
  line-height: 1.2;
}

.taxrunner-widget .cell:nth-child(6n) {
  border-right: none;
}

.taxrunner-widget .cell.header {
  background: #f3f4f6;
  font-weight: 700;
  text-align: center;
}

.taxrunner-widget .cell.rowhead {
  text-align: left;
  font-weight: 600;
}


/* =========================
   TOTAL ROWS
   ========================= */

.taxrunner-widget .total-row {
  font-weight: 600;
  background: #f9fafb;
  border-top: 2px solid #e5e7eb;
  border-bottom: 2px solid #e5e7eb;
}

.taxrunner-widget .total-row:not(.rowhead) {
  color: #0d47a1;
}


/* =========================
   SUMMARY ROWS
   ========================= */

.taxrunner-widget .summary-row {
  display: grid;
  grid-template-columns: 1fr 16%;
  align-items: center;
  padding: 8px 6px;
  font-size: 14px;
}

.taxrunner-widget .summary-value {
  text-align: right;
  font-weight: 700;
  color: #0d47a1;
}

.taxrunner-widget .summary-row.total {
  border-top: 2px solid #2563eb;
}

.taxrunner-widget .summary-row.total .summary-value {
  font-size: 18px;
  color: #2563eb;
}


/* =========================
   PERSONAL ALLOWANCE WARNING
   ========================= */

.taxrunner-widget .tax-grid.pa-warning {
  border-color: #fca5a5;
}

.taxrunner-widget .tax-grid.pa-warning .pa-row {
  background: #ff6267;
}


/* =========================
   PENSION HINT
   ========================= */

.taxrunner-widget .pension-hint {
  margin-top: 6px;
  font-size: 12px;
  color: #1d4ed8;
  background: #eff6ff;
  border-left: 3px solid #2563eb;
  padding: 6px 10px;
  border-radius: 4px;
}


/* =========================
   FOOTER (IF EMBEDDED)
   ========================= */

.taxrunner-widget .site-footer {
  background: #000;
  color: #fff;
  width: 100%;
}

.taxrunner-widget .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 20px;
  font-size: 14px;
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width:640px){

  .taxrunner-widget .ani-inputs {
    grid-template-columns: 1fr;
  }

  .taxrunner-widget .ani-result-row {
    flex-direction: column;
    gap: .25rem;
  }

}