/* Self-contained calculator component; intentionally namespaced for WordPress themes. */
.nds-calculator {
  --nds-ink: #1d2b25;
  --nds-muted: #748078;
  --nds-line: #e4ebe5;
  --nds-green: #23775a;
  --nds-deep: #174e3b;
  --nds-soft: #eaf4ed;
  color: var(--nds-ink);
  font-family: inherit;
}
.nds-calculator *, .nds-calculator *::before, .nds-calculator *::after { box-sizing: border-box; }
.nds-calculator [hidden] { display: none !important; }
.nds-card {
  padding: clamp(20px, 3vw, 34px);
  border: 1px solid #e7ece7;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(25, 55, 39, .09);
}
.nds-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.nds-overline { margin: 0 0 7px; color: var(--nds-green); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.nds-card-head h2 { margin: 0; color: var(--nds-ink); font-size: clamp(23px, 3vw, 29px); line-height: 1.2; letter-spacing: -.045em; font-weight: 760; }
.nds-card-intro { margin: 8px 0 0; color: var(--nds-muted); font-size: 13px; line-height: 1.6; }
.nds-icon-button {
  display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px;
  padding: 0; border: 1px solid var(--nds-line); border-radius: 13px; color: #68766d; background: #fff; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, transform .15s;
}
.nds-icon-button:hover { color: var(--nds-green); border-color: #bdd6c5; background: #f7fbf8; transform: rotate(-8deg); }
.nds-icon-button svg { width: 17px; height: 17px; }
.nds-calc-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(340px, .98fr); gap: 18px; }
.nds-input-panel { padding: 23px; border: 1px solid #edf0ed; border-radius: 19px; background: #fbfcfb; }
.nds-field-group + .nds-field-group { margin-top: 23px; }
.nds-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.nds-label { display: block; margin-bottom: 10px; color: #44534a; font-size: 12px; font-weight: 750; }
.nds-label-row .nds-label { margin: 0; }
.nds-rate-note { color: #9aa49d; font-size: 10px; }
.nds-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border: 1px solid var(--nds-line); border-radius: 13px; background: #f2f5f2; }
.nds-mode-button {
  min-height: 41px; padding: 7px 9px; border: 0; border-radius: 10px; color: #69756d; background: transparent; cursor: pointer;
  font-size: 11px; line-height: 1.25; font-weight: 700; transition: color .15s, background .15s, box-shadow .15s;
}
.nds-mode-button:hover { color: var(--nds-deep); }
.nds-mode-button.is-active { color: var(--nds-deep); background: #fff; box-shadow: 0 2px 8px rgba(34, 57, 43, .09); }
.nds-amount-field { margin-top: 21px; }
.nds-money-input { position: relative; display: flex; align-items: center; border: 1px solid #dce5dd; border-radius: 13px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.nds-money-input:focus-within { border-color: #89b79b; box-shadow: 0 0 0 3px rgba(35, 119, 90, .09); }
.nds-money-input input {
  display: block; width: 100%; min-width: 0; height: 56px; padding: 0 16px; border: 0; outline: 0; border-radius: 13px;
  color: var(--nds-ink); background: transparent; font-size: 21px; line-height: 1; font-weight: 720; letter-spacing: -.035em;
}
.nds-money-input input::placeholder { color: #b6c0b8; font-weight: 500; }
.nds-money-input > span { padding: 0 16px 0 8px; color: #859087; font-size: 14px; font-weight: 700; }
.nds-input-hint { margin: 8px 0 0; color: #94a098; font-size: 10px; }
.nds-rates { display: flex; flex-wrap: wrap; gap: 8px; }
.nds-rate-button {
  min-width: 57px; min-height: 37px; padding: 0 13px; border: 1px solid #e1e8e2; border-radius: 10px; color: #68756c; background: #fff;
  cursor: pointer; font-size: 12px; font-weight: 750; transition: color .15s, border-color .15s, background .15s;
}
.nds-rate-button:hover { border-color: #afcfb8; color: var(--nds-green); }
.nds-rate-button.is-active { border-color: var(--nds-green); color: #fff; background: var(--nds-green); box-shadow: 0 4px 10px rgba(35, 119, 90, .13); }
.nds-custom-rate { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 11px 12px; border: 1px solid #e4ebe5; border-radius: 11px; color: #647169; background: #fff; font-size: 11px; font-weight: 650; }
.nds-custom-rate-control { display: flex; align-items: center; gap: 6px; }
.nds-custom-rate-control input { width: 75px; height: 33px; padding: 0 8px; border: 1px solid #dce5dd; border-radius: 8px; outline: 0; text-align: right; color: var(--nds-ink); background: #fbfcfb; font-size: 13px; font-weight: 750; }
.nds-custom-rate-control input:focus { border-color: #89b79b; box-shadow: 0 0 0 3px rgba(35, 119, 90, .08); }
.nds-custom-rate-control span { color: #77837b; }
.nds-rate-disclaimer { display: flex; gap: 8px; margin: 16px 0 0; color: #87938a; font-size: 10px; line-height: 1.5; }
.nds-rate-disclaimer svg { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 1px; color: #89a795; }

.nds-result-panel { display: flex; flex-direction: column; min-height: 100%; padding: 22px; border-radius: 19px; background: #f3f7f3; }
.nds-result-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.nds-result-eyebrow { display: block; color: #6f7d73; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.nds-result-mode { margin-top: 5px; color: #38483e; font-size: 13px; font-weight: 700; }
.nds-live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #dfebe1; border-radius: 8px; color: #65806c; background: #f8fbf8; font-size: 9px; line-height: 1; font-weight: 750; letter-spacing: .08em; white-space: nowrap; }
.nds-live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #52a374; box-shadow: 0 0 0 3px #e2f0e5; }
.nds-tax-highlight { position: relative; overflow: hidden; padding: 18px 19px; border-radius: 15px; color: #fff; background: var(--nds-deep); }
.nds-tax-highlight::after { content: ""; position: absolute; top: -45px; right: -30px; width: 140px; height: 140px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; box-shadow: 0 0 0 18px rgba(255,255,255,.025), 0 0 0 38px rgba(255,255,255,.018); pointer-events: none; }
.nds-tax-label { position: relative; z-index: 1; display: block; color: rgba(255,255,255,.73); font-size: 11px; font-weight: 650; }
.nds-tax-value-row { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 7px; }
.nds-tax-value { min-width: 0; overflow-wrap: anywhere; font-size: clamp(28px, 4vw, 38px); line-height: 1.12; letter-spacing: -.055em; font-weight: 760; }
.nds-copy-button { display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 10px; color: #fff; background: rgba(255,255,255,.1); cursor: pointer; transition: background .15s, transform .15s; }
.nds-copy-button:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.nds-copy-button svg { width: 15px; height: 15px; }
.nds-words { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin-top: 7px; padding: 0; border: 0; color: rgba(255,255,255,.67); background: transparent; text-align: left; font-family: inherit; font-size: 10px; line-height: 1.5; cursor: pointer; }
.nds-words:hover { color: #fff; }
.nds-words svg { flex: 0 0 13px; width: 13px; height: 13px; opacity: .7; }
.nds-words:focus-visible, .nds-row-words:focus-visible { outline-color: rgba(35,119,90,.35); outline-offset: 2px; }
.nds-breakdown { display: grid; gap: 0; margin-top: 13px; padding: 2px 14px; border: 1px solid #e3eae4; border-radius: 14px; background: rgba(255,255,255,.85); }
.nds-break-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; min-height: 58px; border-bottom: 1px solid #edf0ed; }
.nds-break-row:last-child { border-bottom: 0; }
.nds-break-label { min-width: 0; color: #56645b; font-size: 11px; font-weight: 700; }
.nds-break-label small { display: block; margin-top: 2px; color: #9aa49d; font-size: 9px; font-weight: 500; }
.nds-break-value { color: var(--nds-ink); font-size: 13px; white-space: nowrap; font-weight: 760; letter-spacing: -.015em; }
.nds-row-copy { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; color: #87958b; background: transparent; cursor: pointer; }
.nds-row-copy:hover { color: var(--nds-green); background: #edf5ef; }
.nds-row-copy svg { width: 14px; height: 14px; }
.nds-row-words { display: flex; align-items: center; justify-content: space-between; gap: 8px; grid-column: 1 / -1; width: 100%; margin: -4px 0 9px; padding: 0; border: 0; color: #929d95; background: transparent; text-align: left; font-family: inherit; font-size: 9px; line-height: 1.4; cursor: pointer; }
.nds-row-words:hover { color: var(--nds-green); }
.nds-row-words svg { flex: 0 0 12px; width: 12px; height: 12px; opacity: .65; }
.nds-result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
.nds-action-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 12px;
  border: 1px solid #dfe7e0; border-radius: 10px; color: #4b5a50; background: #fff; cursor: pointer; font-size: 10px; font-weight: 750; transition: border .15s, color .15s, background .15s;
}
.nds-action-button:hover { border-color: #b6d0bd; color: var(--nds-green); background: #fbfefb; }
.nds-action-button.primary { border-color: var(--nds-green); color: #fff; background: var(--nds-green); }
.nds-action-button.primary:hover { border-color: var(--nds-deep); background: var(--nds-deep); }
.nds-action-button svg { width: 14px; height: 14px; }
.nds-words-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 2px 0; color: #829087; font-size: 10px; }
.nds-words-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; border: 0; color: #5e7766; background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.nds-words-toggle:hover { color: var(--nds-green); }
.nds-words-toggle svg { width: 14px; height: 14px; }
.nds-calculator.words-hidden .nds-words { display: none; }
.nds-calculator.words-hidden .nds-row-words { display: none; }
.nds-saved-box { margin-top: 21px; padding: 20px 22px; border: 1px solid #e7ece7; border-radius: 18px; background: #fff; }
.nds-saved-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.nds-saved-head h3 { margin: 0; color: var(--nds-ink); font-size: 15px; letter-spacing: -.025em; }
.nds-saved-head p { margin: 4px 0 0; color: #8a968d; font-size: 10px; }
.nds-clear-saved { padding: 5px 0; border: 0; color: #8d9990; background: transparent; cursor: pointer; font-size: 10px; font-weight: 700; }
.nds-clear-saved:hover { color: #b24c49; }
.nds-empty-saved { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 14px; border-radius: 11px; color: #89958c; background: #f7f9f7; font-size: 11px; }
.nds-empty-saved svg { flex: 0 0 17px; width: 17px; height: 17px; color: #a1afa5; }
.nds-saved-list { margin-top: 14px; overflow-x: auto; }
.nds-saved-table { width: 100%; border-collapse: collapse; min-width: 680px; text-align: left; }
.nds-saved-table th { padding: 9px 10px; color: #9aa49d; font-size: 9px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.nds-saved-table td { padding: 12px 10px; border-top: 1px solid #edf0ed; color: #516057; font-size: 11px; white-space: nowrap; }
.nds-saved-row { cursor: pointer; transition: background .15s; }
.nds-saved-row:hover { background: #f7faf7; }
.nds-saved-row strong { color: var(--nds-ink); font-weight: 750; }
.nds-mode-tag { display: inline-block; padding: 4px 7px; border-radius: 7px; color: #557764; background: #eef5ef; font-size: 9px; font-weight: 700; }
.nds-delete-saved { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; color: #a0aaa2; background: transparent; cursor: pointer; }
.nds-delete-saved:hover { color: #b24c49; background: #fff2f1; }
.nds-delete-saved svg { width: 14px; height: 14px; }
.nds-toast {
  position: fixed; z-index: 99; left: 50%; bottom: 26px; max-width: calc(100vw - 32px); padding: 11px 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px;
  color: #fff; background: #183f31; box-shadow: 0 10px 30px rgba(17,44,32,.25); font-size: 12px; font-weight: 650;
  opacity: 0; pointer-events: none; transform: translate(-50%, 10px); transition: opacity .18s, transform .18s;
}
.nds-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .nds-calc-grid { grid-template-columns: 1fr; }
  .nds-input-panel { padding: 20px; }
  .nds-result-panel { min-height: 0; }
  .nds-result-actions { margin-top: 0; }
}
@media (max-width: 520px) {
  .nds-card { padding: 18px 14px; border-radius: 21px; }
  .nds-card-head { margin-bottom: 19px; }
  .nds-card-head h2 { font-size: 23px; }
  .nds-card-intro { font-size: 12px; }
  .nds-icon-button { flex-basis: 37px; width: 37px; height: 37px; }
  .nds-input-panel, .nds-result-panel { padding: 16px 13px; border-radius: 15px; }
  .nds-calc-grid { gap: 12px; }
  .nds-mode-button { min-height: 42px; padding-inline: 5px; font-size: 10px; }
  .nds-rate-button { min-width: 52px; padding-inline: 10px; }
  .nds-breakdown { padding-inline: 10px; }
  .nds-break-row { grid-template-columns: minmax(0, 1fr) auto 24px; gap: 5px; }
  .nds-break-label { font-size: 10px; }
  .nds-break-value { font-size: 12px; }
  .nds-saved-box { padding: 17px 14px; }
  .nds-words-toggle-row { align-items: flex-start; flex-direction: column; gap: 2px; }
}
