/* Belgian ownership tax & LEZ calculator — reusable widget on guides + compare pages. */

.tax-calc {
    margin: 2rem 0;
    padding: 1.5rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius, 16px);
    background: var(--surface, #fff);
    box-shadow: var(--shadow, 0 2px 6px rgba(17, 24, 39, .06));
}

.tax-calc-head h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.tax-calc-head h2 i {
    color: var(--accent, #c8a24b);
}

.tax-calc-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 720px) {
    .tax-calc-grid {
        grid-template-columns: 1fr;
    }
}

.tax-calc-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

.tax-calc-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--text-muted, #6b7280);
}

.tax-calc-field span {
    font-weight: 600;
}

.tax-calc-field input {
    width: 100%;
    height: 44px;
    padding: 0 0.85rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--text, #111827);
    background-color: var(--surface, #fff);
    box-shadow: 0 1px 2px rgba(17, 24, 39, .03);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.tax-calc-field input:hover {
    border-color: var(--text-muted, #9aa1ab);
}

.tax-calc-field input:focus {
    outline: none;
    border-color: var(--primary, #ff4d3d);
    box-shadow: 0 0 0 3px rgba(255, 77, 61, .12);
}

/* Hide the native number spinners for a clean look. */
.tax-calc-field input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.tax-calc-field input[type="number"]::-webkit-outer-spin-button,
.tax-calc-field input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Custom dropdown (replaces the native <select>). */
.tax-dd {
    position: relative;
    width: 100%;
}

.tax-dd-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    height: 44px;
    padding: 0 0.85rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    background-color: var(--surface, #fff);
    color: var(--text, #111827);
    font-family: inherit;
    font-size: 0.92rem;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(17, 24, 39, .03);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.tax-dd-btn:hover {
    border-color: var(--text-muted, #9aa1ab);
}

.tax-dd.open .tax-dd-btn {
    border-color: var(--primary, #ff4d3d);
    box-shadow: 0 0 0 3px rgba(255, 77, 61, .12);
}

.tax-dd-caret {
    color: var(--text-muted, #6b7280);
    font-size: 0.7rem;
    transition: transform .15s ease;
    flex-shrink: 0;
}

.tax-dd.open .tax-dd-caret {
    transform: rotate(180deg);
}

.tax-dd-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    margin: 0;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    background-color: var(--surface, #fff);
    box-shadow: var(--shadow-lg, 0 8px 24px rgba(17, 24, 39, .16));
}

.tax-dd.open .tax-dd-menu {
    display: block;
}

.tax-dd-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text, #111827);
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
}

.tax-dd-option:hover {
    background: var(--bg, #f7f8fa);
}

.tax-dd-option.is-selected {
    background: var(--bg, #f7f8fa);
    color: var(--primary, #ff4d3d);
    font-weight: 700;
}

.tax-calc-result {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem;
    border-radius: var(--radius-sm, 10px);
    background: var(--bg, #f7f8fa);
}

.tax-calc-fact {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.tax-calc-fact-label {
    font-weight: 700;
    font-size: 0.9rem;
}

.tax-calc-fact-value {
    font-size: 1.1rem;
    font-weight: 800;
}

.tax-calc-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

.tax-calc-line-label {
    color: var(--text-muted, #6b7280);
}

.tax-calc-line-value {
    font-weight: 600;
    white-space: nowrap;
}

.tax-calc-total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.35rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border, #e5e7eb);
    font-weight: 800;
    font-size: 1rem;
}

.tax-calc-total .tax-calc-line-value {
    color: var(--accent, #c8a24b);
}

.tax-calc-lez {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border, #e5e7eb);
}

.tax-calc-lez-title {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-muted, #6b7280);
}

.tax-calc-lez-badges {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tax-calc-badge {
    display: inline-block;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.tax-calc-badge--green {
    background: #dcfce7;
    color: #166534;
}

.tax-calc-badge--amber {
    background: #fef3c7;
    color: #92400e;
}

.tax-calc-badge--red {
    background: #fee2e2;
    color: #991b1b;
}

.tax-calc-disclaimer {
    margin: 1rem 0 0;
    font-size: 0.76rem;
    color: var(--text-muted, #6b7280);
    line-height: 1.45;
}

.tax-calc-disclaimer i {
    margin-right: 0.25rem;
}
