/* Tax simulators (simulador-isv, simulador-iuc). Loaded after vehicle-seo-landing.css; same type
   scale as the other tool landings (verificar-vin-matricula, avaliacao-carro-pro). */

.tax-sim [hidden] {
    display: none !important;
}

.tax-sim .vehicle-seo-lead {
    font-size: 1.15rem;
}

.tax-sim .vehicle-seo-copy p,
.tax-sim .vehicle-seo-highlight p {
    font-size: 0.95rem;
}

.tax-sim .vehicle-seo-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

.tax-sim .vehicle-seo-card p {
    font-size: 0.9rem;
}

.tax-sim .vehicle-seo-faq summary {
    font-size: 0.95rem;
    font-weight: 600;
}

.tax-sim .vehicle-seo-faq details p {
    font-size: 0.95rem;
}

.tax-sim .vehicle-seo-final h2 {
    font-size: 1.8rem;
}

/* Same CTA type size as avaliacao-carro-pro (.pro-cta-btn); the pill shape comes from autoexpo.css. */
.tax-sim .btn-lg {
    font-size: 1.1rem;
}

/* Simulator card: form on the left, result on the right (stacked on small screens). */
.tax-card {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    max-width: 1040px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid #dfe7ee;
    border-radius: var(--ae-radius);
    background: #fff;
    box-shadow: 0 14px 36px rgba(26, 37, 47, 0.12);
    text-align: left;
    scroll-margin-top: 90px;
}

.tax-form {
    padding: 1.75rem;
}

.tax-card-title {
    margin-bottom: 1rem;
    color: var(--ae-primary-dark);
    font-size: 1.15rem;
    font-weight: 700;
}

.tax-group {
    margin: 0 0 1rem;
    padding: 0;
    border: 0;
}

.tax-label {
    display: block;
    margin-bottom: 0.4rem;
    color: #465563;
    font-size: 0.9rem;
    font-weight: 600;
}

.tax-segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tax-segmented label {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}

.tax-segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tax-segmented span {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.6rem;
    border: 2px solid #d6e0e8;
    border-radius: var(--ae-radius);
    background: #fff;
    color: #465563;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.tax-segmented input:checked + span {
    border-color: var(--ae-accent);
    background: var(--ae-primary-soft);
    color: var(--ae-primary-dark);
}

.tax-segmented input:focus-visible + span {
    outline: 2px solid var(--ae-accent);
    outline-offset: 2px;
}

.tax-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
}

.tax-field--wide {
    grid-column: 1 / -1;
}

.tax-field .form-control {
    height: 46px;
    border: 2px solid #d6e0e8;
    border-radius: var(--ae-radius);
    color: var(--ae-primary-dark);
    font-weight: 600;
}

.tax-field .form-control:focus {
    border-color: var(--ae-accent);
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.18);
}

.tax-date {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 0.5rem;
}

.tax-hint {
    display: block;
    margin-top: 0.3rem;
    color: #6c7a89;
    font-size: 0.8rem;
}

.tax-checks {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tax-check {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0;
    color: #465563;
    cursor: pointer;
    font-size: 0.88rem;
    line-height: 1.45;
}

.tax-check input {
    flex: none;
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0.15rem;
}

/* Result panel */
.tax-result {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border-left: 1px solid #e3e9ee;
    background: linear-gradient(160deg, #f7fbff 0%, #eaf3fb 100%);
}

.tax-total {
    margin: 0 0 0.35rem;
    color: #8a99a8;
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.tax-total.is-ready {
    color: var(--ae-primary-dark);
}

.tax-result-note {
    margin: 0 0 1rem;
    color: #596773;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tax-result-note:empty {
    display: none;
}

.tax-badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 1rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #fff;
    color: var(--ae-primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(26, 37, 47, 0.08);
}

.tax-badge:empty {
    display: none;
}

.tax-breakdown {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0;
    margin: 0 0 1rem;
}

.tax-breakdown dt,
.tax-breakdown dd {
    margin: 0;
    padding: 0.6rem 0;
    border-bottom: 1px solid #d9e5ef;
    font-size: 0.9rem;
}

.tax-breakdown dt {
    color: var(--ae-primary-dark);
    font-weight: 600;
}

.tax-breakdown dd {
    padding-left: 0.75rem;
    color: var(--ae-primary-dark);
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.tax-breakdown dd.is-negative {
    color: #1f7a45;
}

.tax-breakdown-detail {
    display: block;
    margin-top: 0.15rem;
    color: #6c7a89;
    font-size: 0.8rem;
    font-weight: 400;
}

.tax-disclaimer {
    margin: auto 0 0;
    color: #6c7a89;
    font-size: 0.8rem;
    line-height: 1.45;
}

/* Worked example */
.tax-example-table {
    margin: 0;
    border-radius: var(--ae-radius);
    background: #fff;
}

.tax-example-table th,
.tax-example-table td {
    padding: 0.7rem 0.9rem;
    border-top: 1px solid #e3e9ee;
    font-size: 0.92rem;
}

.tax-example-table tr:first-child th,
.tax-example-table tr:first-child td {
    border-top: 0;
}

.tax-example-table th {
    color: #465563;
    font-weight: 500;
}

.tax-example-table td {
    color: var(--ae-primary-dark);
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.tax-example-total th,
.tax-example-total td {
    background: var(--ae-primary-soft);
    color: var(--ae-primary-dark);
    font-weight: 800;
}

/* Rate tables */
.tax-tables-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.tax-table-card {
    padding: 1.4rem;
    border: 1px solid #e3e9ee;
    border-radius: var(--ae-radius);
    background: #fff;
    box-shadow: 0 3px 14px rgba(26, 37, 47, 0.06);
    scroll-margin-top: 90px;
}

.tax-table-card--wide {
    grid-column: 1 / -1;
}

.tax-table-card h3 {
    margin-bottom: 0.8rem;
    color: var(--ae-primary-dark);
    font-size: 1rem;
    font-weight: 700;
}

.tax-table {
    margin: 0;
    font-size: 0.88rem;
}

.tax-table th,
.tax-table td {
    padding: 0.5rem 0.6rem;
    border-top: 1px solid #edf1f5;
    white-space: nowrap;
}

.tax-table thead th {
    border-top: 0;
    border-bottom: 2px solid #e3e9ee;
    color: #6c7a89;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tax-table td:not(:first-child),
.tax-table th:not(:first-child) {
    text-align: right;
}

.tax-table td:first-child {
    color: var(--ae-primary-dark);
    font-weight: 600;
}

.tax-table-note {
    margin: 0.8rem 0 0;
    color: #6c7a89;
    font-size: 0.82rem;
    line-height: 1.5;
}

.tax-checklist {
    grid-template-columns: 1fr;
}

/* Numbered steps */
.tax-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
    list-style: none;
}

.tax-steps li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.tax-steps .vehicle-seo-step-number {
    flex: none;
    width: 38px;
    height: 38px;
    margin: 0;
    font-size: 0.95rem;
}

.tax-steps p {
    margin: 0;
    color: #596773;
    font-size: 0.95rem;
    line-height: 1.6;
}

.tax-steps strong {
    color: var(--ae-primary-dark);
}

.tax-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    max-width: 960px;
    margin: 2rem auto 0;
    padding: 1rem 1.2rem;
    border: 1px solid #f1d9a6;
    border-radius: var(--ae-radius);
    background: #fff9ec;
}

.tax-tip i {
    margin-top: 0.2rem;
    color: #c98a0b;
}

.tax-tip p {
    margin: 0;
    color: #5b4a24;
    font-size: 0.92rem;
    line-height: 1.6;
}

.tax-related {
    justify-content: center;
}

@media (max-width: 991.98px) {
    .tax-card {
        grid-template-columns: 1fr;
    }

    .tax-result {
        border-top: 1px solid #e3e9ee;
        border-left: 0;
    }

    .tax-tables-grid,
    .tax-steps {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .tax-form,
    .tax-result {
        padding: 1.25rem;
    }

    .tax-grid {
        grid-template-columns: 1fr;
    }

    /* Width follows the label, so a short option ("Novo") leaves room for the long ones on one line. */
    .tax-segmented label {
        flex: 1 1 auto;
    }

    .tax-segmented span {
        flex-direction: column;
        gap: 0.2rem;
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }

    .tax-total {
        font-size: 2rem;
    }

    .tax-table th,
    .tax-table td {
        white-space: normal;
    }
}
