/* Financing Calculator Styles */
.vehizo-financing-calculator {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.vehizo-financing-calc-inner h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 8px;
}

.vehizo-calc-row,
.vehizo-calc-row-group {
    margin-bottom: 14px;
}

.vehizo-calc-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.vehizo-calc-col label,
.vehizo-calc-row label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.vehizo-down-payment-slider {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-top: 6px;
}

.vehizo-down-payment-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--vehizo-pro-primary, #ff6600);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vehizo-down-payment-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--vehizo-pro-primary, #ff6600);
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vehizo-input-value,
.vehizo-static-value {
    display: block;
    text-align: right;
    font-weight: 600;
    font-size: 1rem;
    color: var(--vehizo-pro-primary, #ff6600);
    margin-top: 2px;
}

.vehizo-static-value {
    color: #374151;
    /* Dark grey for static text like Balloon */
    background: #f3f4f6;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.95rem;
}

.vehizo-months-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.95rem;
}

.vehizo-calc-result {
    background: #f9fafb;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 12px;
    border: 1px solid #f3f4f6;
}

.vehizo-rate-label {
    display: block;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    margin-bottom: 2px;
}

.vehizo-rate-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.1;
}

.vehizo-rate-value.vehizo-error {
    font-size: 1.25rem;
    color: #dc2626;
}

.vehizo-small-details {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 4px;
}

.vehizo-rate-note {
    display: block;
    font-size: 0.82rem;
    color: #9ca3af;
    margin-top: 4px;
}

.vehizo-calc-actions .vehizo-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 14px;
    background: var(--vehizo-pro-primary, #ff6600);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.vehizo-calc-actions .vehizo-btn:hover {
    opacity: 0.9;
}

.vehizo-leasing-legal,
.vehizo-financing-legal {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.4;
    text-align: center;
    border-top: 1px solid #f3f4f6;
    padding-top: 8px;
}

/* --- TAB STYLES FOR DUAL MODE --- */
.vehizo-calculator-tabs-wrapper {
    margin: 16px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.vehizo-calculator-nav {
    display: flex;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.vehizo-calc-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: none;
    font-weight: 500;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.vehizo-calc-tab:hover {
    background: #f3f4f6;
    color: #111827;
}

.vehizo-calc-tab.active {
    background: #fff;
    color: var(--vehizo-pro-primary, #ff6600);
    border-bottom: 2px solid var(--vehizo-pro-primary, #ff6600);
    margin-bottom: -1px;
    font-weight: 600;
}

/* Adjust contained calculators to remove their own borders/margins if wrapped */
.vehizo-calculator-tabs-wrapper .vehizo-leasing-calculator,
.vehizo-calculator-tabs-wrapper .vehizo-financing-calculator {
    margin: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding: 20px;
}

@media (max-width: 768px) {
    .vehizo-calc-row-group {
        grid-template-columns: 1fr;
    }
}

/* Defensive override against aggressive theme styles (tiny widgets/sidebar rules). */
.vehizo-single__actions .vehizo-financing-calculator,
.vehizo-single__actions .vehizo-financing-calculator * {
    box-sizing: border-box;
}

.vehizo-single__actions .vehizo-financing-calculator {
    font-size: 16px !important;
    line-height: 1.45 !important;
    min-width: 0;
}

.vehizo-single__actions .vehizo-financing-calculator .vehizo-calc-col label,
.vehizo-single__actions .vehizo-financing-calculator .vehizo-calc-row label,
.vehizo-single__actions .vehizo-financing-calculator .vehizo-months-select,
.vehizo-single__actions .vehizo-financing-calculator .vehizo-static-value,
.vehizo-single__actions .vehizo-financing-calculator .vehizo-rate-note,
.vehizo-single__actions .vehizo-financing-calculator .vehizo-input-value,
.vehizo-single__actions .vehizo-financing-calculator .vehizo-small-details {
    font-size: 0.95rem !important;
}

.vehizo-single__actions .vehizo-financing-calculator .vehizo-rate-value {
    font-size: 1.8rem !important;
}

.vehizo-single__actions .vehizo-financing-calculator .vehizo-months-select,
.vehizo-single__actions .vehizo-financing-calculator .vehizo-months-select option {
    color: #111827 !important;
    background: #ffffff !important;
    opacity: 1 !important;
}

.vehizo-single__actions .vehizo-financing-calculator .vehizo-months-select {
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
    -webkit-text-fill-color: #111827 !important;
    text-indent: 0 !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.35 !important;
    min-height: 42px !important;
    padding-right: 32px !important;
}
