/******************* Income Tax Calculator ********************/
.income-tax-calculator-main {
  padding: 80px 0 0 0;
}
.itc-layout {
  display: grid;
  grid-template-columns: minmax(0, 760fr) minmax(0, 408fr);
  gap: 32px;
  align-items: start;
}

.itc-title {
  margin: 0 0 24px;
  color: #16181D;
  font: normal normal 800 42px/32px "Urbanist";
}

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

/* Form */
.itc-form {
  padding: 32px;
  background-color: #F8F8F8;
  border: 1px solid #E2E4E9;
  border-radius: 12px;
}

.itc-accordion {
  margin-bottom: 24px;
  background-color: #ffffff;
  border: 1px solid #E2E4E9;
  border-radius: 12px;
}

.itc-accordion-head {
  display: flex;
  padding: 16px;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-radius: 12px;
  cursor: pointer;
  list-style: none;
}

.itc-accordion-head::-webkit-details-marker {
  display: none;
}

.itc-accordion-head h3 {
  margin: 0;
  color: #16181D;
  font: normal normal 600 20px/24px "Inter";
}

.itc-chevron {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-right: 2px solid #16181D;
  border-bottom: 2px solid #16181D;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}

.itc-accordion[open] .itc-chevron {
  transform: rotate(-135deg) translateY(-3px);
}

.itc-accordion-body {
  padding: 0 16px 16px;
}

.itc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
}

.itc-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.itc-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.itc-field label,
.itc-field legend {
  margin: 0;
  padding: 0;
  color: #16181D;
  font: normal normal 500 16px/20px "Inter";
}

.itc-amount {
  position: relative;
}

.itc-currency {
  position: absolute;
  top: 50%;
  left: 14px;
  color: #16181D;
  font: normal normal 500 14px/20px "Inter";
  transform: translateY(-50%);
  pointer-events: none;
}

.itc-input {
  width: 100%;
  height: 44px;
  padding: 10px 14px;
  color: #16181D;
  font: normal normal 600 16px/20px "Inter";
  background-color: #ffffff;
  border: 1px solid #C5CAD3;
  border-radius: 8px;
}

.itc-amount .itc-input {
  padding-left: 30px;
}

.itc-select {
  padding-right: 36px;
  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 1.5l5 5 5-5' fill='none' stroke='%2316181D' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.itc-input:disabled {
  color: #5B6270;
  background-color: #F5F5F5;
  cursor: not-allowed;
}

.itc-input:focus-visible,
.itc-accordion-head:focus-visible,
.itc-tooltip-btn:focus-visible,
.itc-btn:focus-visible,
.itc-radio input:focus-visible,
.itc-table-wrap:focus-visible {
  outline: 2px solid #1a6e69;
  outline-offset: 2px;
}

.itc-help {
  margin: 6px 0 0;
  color: #5B6270;
  font: normal normal 400 12px/16px "Inter";
}

/* Senior citizen radios */
.itc-radio-field legend {
  float: left;
  margin: 0 6px 8px 0;
}

.itc-radio-field .itc-tooltip {
  float: left;
  margin-top: 2px;
}

.itc-radio-group {
  display: flex;
  clear: both;
  gap: 24px;
  min-height: 44px;
  align-items: center;
}

.itc-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #16181D;
  font: normal normal 500 14px/20px "Inter";
  cursor: pointer;
}

.itc-radio input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #1a6e69;
}

/* Tooltip */
.itc-tooltip {
  position: relative;
  display: inline-flex;
}

.itc-tooltip-btn {
  display: inline-flex;
  padding: 1px;
  color: #5B6270;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  height: 20px;
  width: 20px;
}

.itc-tooltip-text {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 20;
  display: none;
  width: 260px;
  padding: 12px 12px;
  color: #ffffff;
  font: normal normal 500 14px/22px "Inter";
  background-color: #2A948F;
  border-radius: 8px;
  transform: translateX(-50%);
}

.itc-tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  border: 6px solid transparent;
  border-top-color: #2A948F;
  transform: translateX(-50%);
}

.itc-tooltip:hover .itc-tooltip-text,
.itc-tooltip:focus-within .itc-tooltip-text {
  display: block;
}

/* Buttons */
.itc-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.itc-btn {
  padding: 12px 24px;
  font: normal normal 600 16px/24px "Inter";
  border-radius: 8px;
  cursor: pointer;
}

.itc-btn-primary {
  color: #ffffff;
  background-color: #2E4757;
}

.itc-btn-primary:hover {
  background-color: #1f323e;
}

.itc-btn-secondary {
  color: #16181D;
  background-color: #ffffff;
  border: 1px solid #2E4757;
}

.itc-btn-secondary:hover {
  border-color: #16181D;
}

.itc-btn:disabled,
.itc-btn:disabled:hover {
  color: #ffffff;
  background-color: #BCD0DC;
  border-color: #BCD0DC;
  cursor: not-allowed;
}

/* Results */
/* Regime banner: not in Figma, hidden for now (JS still fills it) */
.itc-banner {
  display: none !important;
}

/* "No tax payable" message: hidden for now (JS still toggles it) */
.itc-estimate .itc-no-tax {
  display: none !important;
}

.itc-banner {
  margin: 0 0 16px;
  padding: 12px 16px;
  color: #16181D;
  font: normal normal 500 14px/20px "Inter";
  background-color: #F8F8F8;
  border-left: 4px solid #1a6e69;
  border-radius: 12px;
}

#itc-results-title:focus {
  outline: none;
}

.itc-result-card {
  margin-bottom: 24px;
  overflow: hidden;
  background-color: #ffffff;
  border: 1px solid #E2E4E9;
  border-radius: 12px;
}

.itc-estimate {
  padding: 32px;
  background-color: #EBF9F9;
}

.itc-estimate p {
  margin: 0;
}

.itc-estimate-label {
  color: #16181D;
  font: normal normal 400 16px/24px "Inter";
}

.itc-estimate .itc-estimate-value {
  margin: 8px 0;
  color: #2A948F;
  font: normal normal 500 32px/39px "Inter";
  overflow-wrap: anywhere;
}

.itc-estimate-year {
  color: #16181D;
  font: normal normal 400 12px/18px "Inter";
}

.itc-estimate .itc-no-tax {
  margin-top: 8px;
  color: #1a6e69;
  font: normal normal 600 14px/20px "Inter";
}

.itc-regimes {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 0;
  padding: 32px;
}

.itc-regime-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.itc-regime-row dt {
  color: #16181D;
  font: normal normal 400 16px/24px "Inter";
}

.itc-regime-row dd {
  margin: 0;
  color: #16181D;
  font: normal normal 500 16px/24px "Inter";
}

.itc-decision {
  margin: 0 32px 32px;
  padding-top: 12px;
  color: #16181D;
  font: normal normal 400 13px/20px "Inter";
  border-top: 1px solid #E2E4E9;
}

/* Important note (ACF WYSIWYG) */
.itc-note {
  padding: 24px;
  background-color: #F8F8F8;
  border-radius: 12px;
}

.itc-note-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #16181D;
  font: normal normal 600 18px/26px "Inter";
}

.itc-note-icon {
  flex-shrink: 0;
  color: #2A948F;
}

.itc-note-content p,
.itc-note-content li {
  margin: 0 0 12px;
  color: #2C313A;
  font: normal normal 400 14px/22px "Inter";
}

.itc-note-content > :last-child,
.itc-note-content li:last-child {
  margin-bottom: 0;
}

.itc-note-content ul {
  margin: 0;
  padding-left: 22px;
}

.itc-note-content li {
  list-style: disc;
}

/* Breakdown table */
.itc-breakdown {
  margin-top: 48px;
}

.itc-table-wrap {
  overflow-x: auto;
  background-color: #ffffff;
  border: 1px solid #E2E4E9;
  border-radius: 16px;
}

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

.itc-table th,
.itc-table td {
  padding: 24px 16px;
  color: #16181D;
  font: normal normal 600 16px/24px "Inter";
  text-align: right;
  white-space: nowrap;
}

.itc-table th {
  font-weight: 600;
}

.itc-table th:first-child {
  width: 765px;
  text-align: left;
}

.itc-table thead th + th {
  width: 217.5px;
}

.itc-table th + th,
.itc-table th + td,
.itc-table td + td {
  border-left: 2px solid #E2E4E9;
}

.itc-table thead th {
  padding-top: 28px;
  padding-bottom: 28px;
  background-color: #E2E4E9;
}

.itc-table tbody tr:nth-child(even) {
  background-color: #F5F8F9;
}

.page-template-Template-income-tax-calculator .itc-radio-group span {
    font: normal normal 400 16px / 20px "Inter";
}

@media screen and (max-width: 991px) {

  .itc-title {
        font: normal normal 800 32px / 32px "Urbanist";
  }
  .itc-accordion-head {
    padding: 24px;
  }
  .itc-accordion-body {
    padding: 0 24px 24px;
  }
  .itc-label {
    margin-bottom: 12px;
  }
  .itc-btn {
    padding: 16.5px 24px;
  }
  .itc-estimate .itc-estimate-value {
    font: normal normal 600 32px / 36px "Inter";
  }
  .itc-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .itc-estimate,
  .itc-regimes {
    padding: 24px;
  }

  .itc-decision {
    margin: 0 24px 24px;
  }

  .itc-table {
    min-width: 840px;
  }

  .itc-table th:first-child {
    width: 320px;
  }

  .itc-table thead th + th {
    width: 260px;
  }
}

@media screen and (max-width: 575px) {
  .itc-form {
    padding: 16px;
  }
  .itc-accordion-head h3 {
    font: normal normal 600 16px / 24px "Inter";
  }
  .itc-accordion[open] .itc-accordion-head {
    padding: 16px 16px 24px 16px;
  }
  .itc-accordion {
    margin-bottom: 16px;
  }
  .itc-label {
    margin-bottom: 12px;
  }
  .itc-title {
    font-size: 22px;
    line-height: 24px;
  }
  .itc-estimate .itc-estimate-value {
    font: normal normal 600 24px / 32px "Inter";
  }
  .itc-breakdown .itc-title {
    font-size: 28px;
    line-height: 32px;
  }
  .income-tax-calculator .calculator-main {
    padding: 40px 0 0 0;
  }
  .itc-grid {
    gap: 24px 24px;
  }
  .itc-note {
    padding: 16px;
  }
  .itc-accordion-body {
    padding: 0 16px 16px;
  }

  .itc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .itc-estimate,
  .itc-regimes {
    padding: 16px;
  }

  .itc-estimate .itc-estimate-value {
    font-size: 24px;
    line-height: 32px;
  }

  .itc-decision {
    margin: 0 16px 16px;
  }

  .itc-actions {
    flex-direction: column;
  }

  .itc-btn {
    width: 100%;
  }

  .itc-tooltip-text {
    width: 220px;
  }

  .itc-table {
    min-width: 520px;
  }

  .itc-table th:first-child {
    width: 200px;
  }

  .itc-table thead th + th {
    width: 160px;
  }
}
