/* Use SBC's light navigation treatment from the first paint on calculator pages. */
body:has([data-sbc-tax]) #sbc-main-header.main_menus {
    background-color: #fff !important;
    box-shadow: 0 10px 10px -10px rgb(33 35 38 / 10%);
}
body:has([data-sbc-tax]) #sbc-main-header .blue-logo {
    opacity: 1;
}
body:has([data-sbc-tax]) #sbc-main-header .white-logo {
    opacity: 0;
    visibility: hidden;
}
body:has([data-sbc-tax]) #sbc-main-header :is(
    #menu-header-menu > li > a,
    #menu-header-menu > li > a i,
    .gt-current-lang,
    .gt-current-lang .gt-lang-code
) {
    color: #111 !important;
}
body:has([data-sbc-tax]) #sbc-main-header #menu-header-menu > li > a i::before {
    color: #111 !important;
}
body:has([data-sbc-tax]) #sbc-main-header #menu-header-menu > li > a svg {
    fill: #111 !important;
}
body:has([data-sbc-tax]) #sbc-main-header #cart-sbc svg path {
    stroke: #111 !important;
    fill: transparent !important;
}
body:has([data-sbc-tax]) #sbc-main-header .gt-current-lang img {
    filter: brightness(0);
}
/* SBC's fixed Elementor header sits outside the normal page layout. */
body:has([data-sbc-tax]) .elementor-location-header:has(> #sbc-main-header.elementor-sticky--active) {
    min-block-size: var(--sbc-tax-site-header-height, 0px);
}

.sbc-tax {
    --sbc-ink: #29163b;
    --sbc-muted: #4a4a4a;
    --sbc-purple: #6c3baa;
    --sbc-deep: #39155b;
    --sbc-lavender: #f4edfb;
    --sbc-line: #dfd2ec;
    --sbc-white: #fff;
    max-width: 72rem;
    margin: 1.5rem auto;
    border: 1px solid var(--sbc-line);
    border-radius: 1.25rem;
    background: var(--sbc-white);
    color: var(--sbc-ink);
    font: 400 1rem/1.55 system-ui, sans-serif;
    text-align: left;
    overflow-wrap: anywhere;
    container-type: inline-size;
}
.sbc-tax *, .sbc-tax *::before, .sbc-tax *::after { box-sizing: border-box; }
.sbc-tax [hidden] { display: none !important; }
.sbc-tax :is(h2, h3, h4, p, dl, dd) { margin: 0; color: inherit; }
.sbc-tax :is(h2, h3, h4) { font-family: inherit; font-weight: 700; line-height: 1.2; }
.sbc-tax a { color: var(--sbc-purple); text-decoration: underline; text-underline-offset: .15em; }
.sbc-tax :is(a, button, input, select, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--sbc-purple);
    outline-offset: 3px;
}
.sbc-tax-header {
    padding: clamp(1.2rem, 4vw, 2.6rem);
    background: var(--sbc-purple);
    border-radius: 1.2rem 1.2rem 0 0;
    color: var(--sbc-white);
}
.sbc-tax-header h2 { margin: .45rem 0 .5rem; font-size: clamp(1.7rem, 4vw, 2.65rem); }
.sbc-tax-header .sbc-tax-brand { font-size: .86rem; font-weight: 650; color: #eadcf6; }
.sbc-tax-brand span { margin: 0 .25rem; }
.sbc-tax-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.07fr) minmax(0, 1fr);
    gap: clamp(1rem, 3vw, 1.65rem);
    padding: clamp(1rem, 3vw, 1.65rem);
    align-items: start;
}
.sbc-tax-inputs, .sbc-tax-results { min-width: 0; }
.sbc-tax h3 { margin-bottom: .9rem; font-size: 1.25rem; }
.sbc-tax h4 { margin-bottom: .65rem; font-size: 1rem; }
.sbc-tax-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.sbc-tax-field { display: grid; align-content: start; gap: .36rem; color: var(--sbc-ink); font-size: .9rem; font-weight: 650; }
.sbc-tax-field small, .sbc-tax .sbc-tax-help { color: var(--sbc-muted); font-size: .83rem; font-weight: 400; }
.sbc-tax .sbc-tax-help { margin: .55rem 0 .8rem; }
.sbc-tax :is(.sbc-tax-choice > summary, input[type="text"]) {
    min-width: 0;
    width: 100%;
    min-height: 2.8rem;
    margin: 0;
    padding: .56rem .65rem;
    border: 1px solid #a997b9;
    border-radius: .58rem;
    background: var(--sbc-white);
    color: var(--sbc-ink);
    font: 400 1rem/1.3 system-ui, sans-serif;
}
.sbc-tax-choice > summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .55rem;
    cursor: pointer;
    list-style: none;
}
.sbc-tax-choice > summary::-webkit-details-marker { display: none; }
.sbc-tax-choice > summary::after {
    content: "";
    width: .5rem;
    height: .5rem;
    flex: 0 0 .5rem;
    border: solid var(--sbc-purple);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-2px);
}
.sbc-tax-choice[open] > summary::after { transform: rotate(225deg); }
.sbc-tax-choice-options {
    display: grid;
    gap: .15rem;
    margin-top: .3rem;
    padding: .25rem;
    background: var(--sbc-white);
    border: 1px solid var(--sbc-line);
    border-radius: .58rem;
}
.sbc-tax .sbc-tax-choice-options > button {
    min-width: 0;
    min-height: 2.75rem;
    padding: .38rem .55rem;
    /* Keep both colours together when the WordPress theme styles buttons. */
    background: var(--sbc-purple) !important;
    color: var(--sbc-white) !important;
    border: 0;
    border-radius: .35rem;
    text-align: left;
    text-transform: none;
    white-space: normal;
    font: inherit;
    cursor: pointer;
}
.sbc-tax .sbc-tax-choice-options > button:hover {
    background: var(--sbc-deep) !important;
}
.sbc-tax .sbc-tax-choice-options > button[aria-pressed="true"] {
    background: var(--sbc-lavender) !important;
    color: var(--sbc-deep) !important;
}
.sbc-tax-money { position: relative; display: block; }
.sbc-tax-money > span { position: absolute; top: .67rem; left: .65rem; color: var(--sbc-muted); pointer-events: none; }
.sbc-tax-money input[type="text"] { padding-left: 2.25rem; }
.sbc-tax fieldset { min-width: 0; margin: 0 0 .85rem; padding: .6rem .8rem; border: 1px solid var(--sbc-line); border-radius: .65rem; }
.sbc-tax legend { padding: 0 .25rem; font-size: .9rem; font-weight: 650; }
.sbc-tax-modes label { display: inline-flex; align-items: center; min-height: 2rem; margin-right: .8rem; gap: .35rem; cursor: pointer; }
.sbc-tax input:is([type="radio"], [type="checkbox"]) { width: 1.05rem; height: 1.05rem; margin: 0; accent-color: var(--sbc-purple); flex-shrink: 0; appearance: auto; }
.sbc-tax .sbc-tax-message { margin: .65rem 0; padding: .75rem; border-radius: .65rem; background: var(--sbc-lavender); font-size: .88rem; }
.sbc-tax > .sbc-tax-message { margin: 1rem; }
.sbc-tax-check { display: flex; align-items: flex-start; gap: .48rem; margin-top: .55rem; font-weight: 650; }
.sbc-tax-check input { margin-top: .16rem !important; }
.sbc-tax-group { padding: .85rem 0; border-bottom: 1px solid var(--sbc-line); }
.sbc-tax-group:first-child { padding-top: .2rem; }
.sbc-tax-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.sbc-tax-actions button {
    min-height: 2.8rem;
    padding: .58rem 1rem;
    border: 1px solid var(--sbc-purple);
    border-radius: .65rem;
    background: var(--sbc-purple);
    color: var(--sbc-white);
    font: 650 .95rem/1.3 system-ui, sans-serif;
    text-transform: none;
    cursor: pointer;
}
.sbc-tax-actions button:hover { background: var(--sbc-deep); }
.sbc-tax-actions [data-reset] { color: var(--sbc-purple); background: var(--sbc-white); }
.sbc-tax-actions [data-reset]:hover { background: var(--sbc-lavender); }
.sbc-tax .sbc-tax-error { margin-top: .6rem; color: #9a1537; font-size: .88rem; }
.sbc-tax [aria-invalid="true"] { outline: 2px solid #b32049; outline-offset: 1px; }
.sbc-tax-results { border: 1px solid var(--sbc-line); border-radius: .9rem; background: var(--sbc-lavender); padding: clamp(.8rem, 2.3vw, 1.3rem); }
.sbc-tax-result-head { color: var(--sbc-deep); }
.sbc-tax-result-head .sbc-tax-total { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 750; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sbc-tax-result-head .sbc-tax-context { margin-top: .35rem; font-size: .88rem; }
.sbc-tax .sbc-tax-metrics { margin: .9rem 0; }
.sbc-tax dl > div { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem 0; font-size: .87rem; border-bottom: 1px solid var(--sbc-line); }
.sbc-tax dd { flex: 0 0 auto; font-weight: 650; font-variant-numeric: tabular-nums; text-align: right; }
.sbc-tax-breakdown { margin-top: .75rem; padding: .7rem; border: 1px solid var(--sbc-line); border-radius: .65rem; background: var(--sbc-white); }
.sbc-tax-breakdown summary { font-weight: 700; cursor: pointer; }
.sbc-tax-breakdown dl, .sbc-tax-comparison, .sbc-tax-table-wrap { margin-top: .6rem; }
.sbc-tax-comparison { padding: .55rem; border-radius: .4rem; background: var(--sbc-lavender); font-size: .83rem; }
.sbc-tax-table-wrap { overflow: auto; }
.sbc-tax table { width: 100%; border-collapse: collapse; margin: 0; font-size: .8rem; font-variant-numeric: tabular-nums; }
.sbc-tax caption { padding: .35rem 0; font-weight: 700; text-align: left; }
.sbc-tax :is(td, th) { padding: .35rem; border: 0; border-bottom: 1px solid var(--sbc-line); text-align: right; white-space: nowrap; }
.sbc-tax :is(td, th):first-child { text-align: left; }
.sbc-tax-footer { display: grid; justify-items: start; gap: .55rem; padding: 1rem clamp(1rem, 3vw, 1.65rem); border-top: 1px solid var(--sbc-line); color: var(--sbc-muted); font-size: .82rem; }
.sbc-tax-cta { display: inline-flex; align-items: center; min-height: 2.75rem; gap: .35rem; font-size: .93rem; font-weight: 700; }
.sbc-tax .sbc-tax-sr { position: absolute; width: 1px; height: 1px; padding: 0; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }

@media (max-width: 52rem) {
    .sbc-tax-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 30rem) {
    .sbc-tax-grid { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 52rem) {
    .sbc-tax-layout { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 30rem) {
    .sbc-tax-grid { grid-template-columns: minmax(0, 1fr); }
}
