/* ==========================================================================
   Loan Calculator — loan-calculator.css
   Uses existing CSS custom properties from the GeneratePress child theme.
   Designed to blend seamlessly with the fintech blue design system.
   ========================================================================== */

/* ── Wrap ── */
.lc-wrap {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    font-family: var(--font-family-primary, 'Inter', sans-serif);
}

.hero-section .lc-wrap {
    max-width: 680px;
}

/* ==========================================================================
   HERO CALCULATOR
   ========================================================================== */

.lc-hero-calc {
    width: 100%;
    padding: var(--space-5, 1.25rem);
    background: #ffffff;
    border: 1px solid rgba(var(--color-primary-rgb, 10, 37, 64), 0.08);
    border-radius: 16px;
    box-shadow: 0 28px 70px rgba(10, 37, 64, 0.18);
    text-align: left;
    transition:
        transform var(--transition-slow, 0.3s ease),
        box-shadow var(--transition-slow, 0.3s ease);
}

.lc-hero-calc:hover {
    transform: translateY(-3px);
    box-shadow: 0 34px 84px rgba(10, 37, 64, 0.22);
}

.lc-hero-calc__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3, 0.75rem);
    margin-bottom: var(--space-4, 1rem);
    padding-bottom: var(--space-3, 0.75rem);
    border-bottom: 1px solid rgba(var(--color-primary-rgb, 10, 37, 64), 0.08);
}

.lc-hero-calc__product {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: var(--space-1, 0.25rem) var(--space-3, 0.75rem);
    border-radius: var(--radius-full, 9999px);
    background: rgba(var(--color-primary-rgb, 10, 37, 64), 0.06);
    color: var(--color-primary, #0A2540);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
}

.lc-hero-calc__rate {
    color: var(--color-text-secondary, #425466);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 500;
    white-space: nowrap;
}

.lc-hero-calc__rate strong,
.lc-hero-calc__rate b {
    color: var(--color-text-primary, #0A2540);
    font-weight: 700;
}

.lc-hero-calc__body {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4, 1rem);
    align-items: start;
}

.lc-hero-calc__controls {
    display: grid;
    gap: var(--space-4, 1rem);
    align-content: center;
}

.lc-hero-calc__field .lc-field__header {
    margin-bottom: var(--space-2, 0.5rem);
    gap: var(--space-3, 0.75rem);
}

.lc-hero-calc__field .lc-field__label {
    color: var(--color-text-secondary, #425466);
    letter-spacing: 0;
    text-transform: none;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 500;
}

.lc-hero-calc__field .lc-field__value-wrap {
    min-height: auto;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    gap: var(--space-2, 0.5rem);
}

.lc-hero-calc__field .lc-field__value-wrap:focus-within {
    background: transparent;
    border: none;
    box-shadow: none;
}

.lc-hero-calc__field .lc-amount-display,
.lc-hero-calc__field .lc-term-display {
    width: 110px;
    padding: 2px 0;
    font-size: var(--font-size-base, 1rem);
    font-weight: 700;
    color: var(--color-text-primary, #0A2540);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--transition-base, 0.2s ease);
}

.lc-hero-calc__field .lc-amount-display:focus,
.lc-hero-calc__field .lc-term-display:focus {
    border-bottom-color: var(--color-cta, #635BFF);
}

.lc-hero-calc__field .lc-field__unit {
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    color: var(--color-text-muted, #8898AA);
}

.hero-section .lc-slider {
    height: 7px;
    background: linear-gradient(
        to right,
        #635BFF var(--fill, 50%),
        rgba(var(--color-primary-rgb, 10, 37, 64), 0.14) var(--fill, 50%)
    );
    touch-action: pan-y;
}

.hero-section .lc-slider::-webkit-slider-thumb {
    border-color: #635BFF;
    box-shadow: 0 8px 18px rgba(99, 91, 255, 0.26);
}

.hero-section .lc-slider::-moz-range-thumb {
    border-color: #635BFF;
    box-shadow: 0 8px 18px rgba(99, 91, 255, 0.26);
}

.lc-hero-calc__field .lc-slider-minmax {
    margin-top: var(--space-2, 0.5rem);
    font-size: var(--font-size-xs, 0.75rem);
    font-weight: 500;
    color: var(--color-text-muted, #8898AA);
}

.lc-hero-calc__result {
    display: flex;
    flex-direction: column;
    gap: var(--space-3, 0.75rem);
    padding: var(--space-5, 1.25rem);
    border: 0;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(0, 212, 170, 0.14), rgba(0, 212, 170, 0)),
        var(--color-primary, #0A2540);
    color: #ffffff;
}

.lc-hero-calc__result-label {
    display: block;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 500;
    letter-spacing: 0;
}

.lc-hero-calc__payment {
    display: block;
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.875rem, 3.5vw, 2.5rem);
    font-weight: 900;
    line-height: 1;
    text-align: left;
    justify-self: stretch;
    letter-spacing: -0.01em;
}

.lc-hero-calc__cta,
.lc-hero-calc .lc-apply-btn {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin-top: 0;
    padding: 9px var(--space-4, 1rem);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    background: #635BFF;
    box-shadow: 0 2px 8px rgba(99, 91, 255, 0.24);
    white-space: nowrap;
}

.lc-hero-calc__cta:hover,
.lc-hero-calc .lc-apply-btn:hover {
    background: #544de6;
    box-shadow: 0 4px 14px rgba(99, 91, 255, 0.34);
    transform: none;
}

.lc-hero-calc__secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2, 0.5rem) var(--space-4, 1rem);
    margin: 0;
    padding-top: var(--space-3, 0.75rem);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-xs, 0.75rem);
    font-weight: 500;
}

.lc-hero-calc__secondary strong {
    display: block;
    margin-top: 2px;
    color: #ffffff;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 700;
}

.lc-hero-calc__all-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1, 0.25rem);
    margin-top: var(--space-4, 1rem);
    color: var(--color-text-muted, #8898AA);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-base, 0.2s ease);
}

.lc-hero-calc__all-link:hover,
.lc-hero-calc__all-link:focus {
    color: var(--color-cta-dark, #4B44DB);
    text-decoration: none;
}

.lc-hero-calc__all-link:hover::after,
.lc-hero-calc__all-link:focus::after {
    transform: translateX(2px);
}

.lc-hero-calc__all-link::after {
    content: "→";
    transition: transform var(--transition-base, 0.2s ease);
}

/* ==========================================================================
   TABS
   ========================================================================== */

.lc-tabs {
    display: flex;
    gap: 0;
    background: var(--color-background, #F8FAFC);
    border: 1px solid var(--color-border, #E2E8F0);
    border-radius: var(--radius-xl, 16px);
    padding: 6px;
    margin-bottom: var(--space-6, 1.5rem);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.lc-tabs::-webkit-scrollbar {
    display: none;
}

.lc-tab {
    flex: 1;
    min-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-lg, 12px);
    cursor: pointer;
    color: var(--color-text-secondary, #64748B);
    font-family: inherit;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 500;
    transition: background var(--transition-base, 0.2s ease),
                color var(--transition-base, 0.2s ease),
                box-shadow var(--transition-base, 0.2s ease);
    white-space: nowrap;
    position: relative;
}

.lc-tab:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--color-primary, #2563EB);
}

.lc-tab--active {
    background: var(--color-surface, #FFFFFF);
    color: var(--color-primary, #2563EB);
    box-shadow: var(--shadow-md,
        0 4px 6px -1px rgba(0,0,0,0.1),
        0 2px 4px -2px rgba(0,0,0,0.1));
}

.lc-tab__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity var(--transition-base, 0.2s ease);
}

.lc-tab--active .lc-tab__icon,
.lc-tab:hover .lc-tab__icon {
    opacity: 1;
}

.lc-tab__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ── Panel slots ── */
.lc-panel-slot {
    display: none;
}

.lc-panel-slot--active {
    display: block;
    animation: lc-fade-in 0.25s ease forwards;
}

/* ==========================================================================
   PANEL
   ========================================================================== */

.lc-panel {
    background: var(--color-surface, #FFFFFF);
    border: 1px solid var(--color-border, #E2E8F0);
    border-radius: var(--radius-xl, 16px);
    padding: var(--space-8, 2rem);
    box-shadow: var(--shadow-lg,
        0 10px 25px -5px rgba(0,0,0,0.1),
        0 8px 10px -6px rgba(0,0,0,0.1));
    position: relative;
    overflow: hidden;
}

.lc-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        var(--color-primary, #2563EB),
        var(--color-accent, #06B6D4)
    );
}

.lc-panel--animate {
    animation: lc-slide-up 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ── Rate Badge ── */
.lc-rate-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    background: linear-gradient(135deg,
        rgba(37, 99, 235, 0.08),
        rgba(6, 182, 212, 0.08));
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-full, 9999px);
    padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
    margin-bottom: var(--space-6, 1.5rem);
    font-size: var(--font-size-sm, 0.875rem);
}

.lc-rate-badge__label {
    color: var(--color-text-secondary, #64748B);
    font-weight: 500;
}

.lc-rate-badge__value {
    color: var(--color-primary, #2563EB);
    font-size: var(--font-size-xl, 1.25rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.lc-rate-badge__sub {
    color: var(--color-text-muted, #94A3B8);
    font-size: var(--font-size-xs, 0.75rem);
}

/* ==========================================================================
   INPUTS & SLIDERS
   ========================================================================== */

.lc-inputs {
    display: flex;
    flex-direction: column;
    gap: var(--space-8, 2rem);
    margin-bottom: var(--space-8, 2rem);
}

.lc-currency-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3, 0.75rem);
    margin-bottom: var(--space-6, 1.5rem);
    padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
    background: var(--color-background, #F8FAFC);
    border: 1px solid var(--color-border, #E2E8F0);
    border-radius: var(--radius-lg, 12px);
}

.lc-currency-switch__label {
    color: var(--color-text-secondary, #64748B);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.lc-currency-switch__options {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: var(--radius-full, 9999px);
}

.lc-currency-switch__option {
    min-width: 68px;
    padding: 8px 14px;
    border: none;
    border-radius: var(--radius-full, 9999px);
    background: transparent;
    color: var(--color-text-secondary, #64748B);
    font: inherit;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 700;
    cursor: pointer;
    transition:
        background var(--transition-base, 0.2s ease),
        color var(--transition-base, 0.2s ease),
        box-shadow var(--transition-base, 0.2s ease);
}

.lc-currency-switch__option:hover,
.lc-currency-switch__option:focus-visible {
    color: var(--color-primary, #2563EB);
    outline: none;
}

.lc-currency-switch__option--active {
    background: var(--color-surface, #FFFFFF);
    color: var(--color-primary, #2563EB);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.16);
}

.lc-field__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4, 1rem);
    gap: var(--space-4, 1rem);
}

.lc-field__label {
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    color: var(--color-text-secondary, #64748B);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.lc-field__value-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    background: var(--color-background, #F8FAFC);
    border: 1.5px solid var(--color-border, #E2E8F0);
    border-radius: var(--radius-md, 8px);
    padding: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
    transition: border-color var(--transition-base, 0.2s ease),
                box-shadow var(--transition-base, 0.2s ease);
}

.lc-field__value-wrap:focus-within {
    border-color: var(--color-primary, #2563EB);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.lc-amount-display,
.lc-term-display {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: var(--font-size-lg, 1.125rem);
    font-weight: 700;
    color: var(--color-text-primary, #1E293B);
    width: 130px;
    text-align: right;
    outline: none;
    /* Remove number input arrows */
    -moz-appearance: textfield;
}

.lc-term-display {
    width: 60px;
}

.lc-amount-display::-webkit-outer-spin-button,
.lc-amount-display::-webkit-inner-spin-button,
.lc-term-display::-webkit-outer-spin-button,
.lc-term-display::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.lc-field__unit {
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    color: var(--color-text-muted, #94A3B8);
    white-space: nowrap;
}

/* ── Range Slider ── */
.lc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: var(--radius-full, 9999px);
    background: linear-gradient(
        to right,
        var(--color-primary, #2563EB) var(--fill, 50%),
        var(--color-border, #E2E8F0) var(--fill, 50%)
    );
    outline: none;
    cursor: pointer;
    touch-action: pan-y;
    --fill: 50%;
}

.lc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-surface, #FFFFFF);
    border: 2.5px solid var(--color-primary, #2563EB);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
    cursor: pointer;
    transition: transform var(--transition-base, 0.2s ease),
                box-shadow var(--transition-base, 0.2s ease);
}

.lc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.lc-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.lc-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-surface, #FFFFFF);
    border: 3px solid var(--color-primary, #2563EB);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.25);
    cursor: pointer;
}

@media (max-width: 640px) {
    .lc-slider::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        border-width: 3px;
    }
    .lc-slider::-moz-range-thumb {
        width: 24px;
        height: 24px;
        border-width: 3px;
    }
}

.lc-slider-minmax {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-2, 0.5rem);
    font-size: var(--font-size-xs, 0.75rem);
    color: var(--color-text-muted, #94A3B8);
    font-weight: 500;
}

/* ==========================================================================
   RESULTS
   ========================================================================== */

.lc-results {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-4, 1rem);
    background: linear-gradient(135deg,
        var(--color-primary-darker, #1E3A8A),
        var(--color-primary-dark, #1E40AF));
    border-radius: var(--radius-lg, 12px);
    padding: var(--space-6, 1.5rem) var(--space-4, 1rem);
    margin-bottom: var(--space-6, 1.5rem);
}

.lc-result {
    text-align: center;
    position: relative;
}

.lc-result + .lc-result::before {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.lc-result__label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-2, 0.5rem);
    line-height: 1.3;
}

.lc-result__value {
    font-size: var(--font-size-lg, 1.125rem);
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.02em;
    line-height: 1;
    transition: transform 0.15s ease;
}

/* Primary (EMI) result is bigger */
.lc-result--primary .lc-result__label {
    color: rgba(255, 255, 255, 0.8);
}

.lc-result--primary .lc-result__value {
    font-size: var(--font-size-2xl, 1.5rem);
    color: #FFFFFF;
}

/* Flash animation when value updates */
@keyframes lc-value-flash {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.1); color: #8B5CF6; }
    100% { transform: scale(1); }
}

.lc-result__value--flash {
    animation: lc-value-flash 0.25s ease;
}

/* ==========================================================================
   BREAKDOWN BAR
   ========================================================================== */

.lc-breakdown {
    margin-bottom: var(--space-6, 1.5rem);
}

.lc-breakdown__bar {
    display: flex;
    height: 8px;
    border-radius: var(--radius-full, 9999px);
    overflow: hidden;
    margin-bottom: var(--space-2, 0.5rem);
}

.lc-breakdown__principal {
    background: var(--color-primary, #2563EB);
    transition: width 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.lc-breakdown__interest {
    background: var(--color-accent, #06B6D4);
    transition: width 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.lc-breakdown__legend {
    display: flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    font-size: var(--font-size-xs, 0.75rem);
    color: var(--color-text-muted, #94A3B8);
}

.lc-breakdown__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.lc-breakdown__dot--principal { background: var(--color-primary, #2563EB); }
.lc-breakdown__dot--interest  { background: var(--color-accent, #06B6D4); }

.lc-breakdown__legend-label {
    margin-right: var(--space-3, 0.75rem);
    font-weight: 500;
}

/* ==========================================================================
   APPLY BUTTON
   ========================================================================== */

.lc-apply-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2, 0.5rem);
    width: 100%;
    padding: var(--space-4, 1rem) var(--space-6, 1.5rem);
    background: var(--color-cta, #635BFF);
    color: #FFFFFF;
    font-family: inherit;
    font-size: var(--font-size-base, 1rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    border: none;
    border-radius: var(--radius-lg, 12px);
    cursor: pointer;
    text-decoration: none;
    transition:
        transform var(--transition-base, 0.2s ease),
        box-shadow var(--transition-base, 0.2s ease),
        background var(--transition-base, 0.2s ease);
    box-shadow: 0 12px 24px rgba(99, 91, 255, 0.30);
    margin-top: var(--space-2, 0.5rem);
}

.lc-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(99, 91, 255, 0.40);
    background: var(--color-cta-hover, #7A73FF);
    color: #FFFFFF;
    text-decoration: none;
}

.lc-apply-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

/* ==========================================================================
   HERO BUTTONS — Loan Type Selector (front-page)
   Extends existing .loan-type-btn with icon layout
   ========================================================================== */

/* 4-button grid */
.hero-loan-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3, 0.75rem);
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
}

/* Base .loan-type-btn is already styled in style.css — we extend it here */
.loan-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-4, 1rem) var(--space-3, 0.75rem);
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg, 12px);
    color: #FFFFFF;
    font-family: var(--font-family-primary, 'Inter', sans-serif);
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    letter-spacing: 0.01em;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition:
        background var(--transition-base, 0.2s ease),
        border-color var(--transition-base, 0.2s ease),
        transform var(--transition-base, 0.2s ease),
        box-shadow var(--transition-base, 0.2s ease);
    cursor: pointer;
    min-height: 80px;
}

.loan-type-btn:hover,
.loan-type-btn:focus {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: #FFFFFF;
    text-decoration: none;
}

.loan-type-btn:active {
    transform: translateY(-1px);
}

.loan-type-btn__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md, 8px);
    background: rgba(255, 255, 255, 0.15);
    transition: background var(--transition-base, 0.2s ease);
}

.loan-type-btn:hover .loan-type-btn__icon {
    background: rgba(255, 255, 255, 0.25);
}

.loan-type-btn__label {
    line-height: 1.2;
}

/* ==========================================================================
   HERO STANDALONE BUTTONS (from [loan_hero_buttons] shortcode)
   ========================================================================== */

.lc-hero-buttons {
    display: flex;
    gap: var(--space-3, 0.75rem);
    flex-wrap: wrap;
    justify-content: center;
}

.lc-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2, 0.5rem);
    padding: var(--space-3, 0.75rem) var(--space-5, 1.25rem);
    background: var(--color-surface, #FFFFFF);
    border: 1.5px solid var(--color-border, #E2E8F0);
    border-radius: var(--radius-lg, 12px);
    color: var(--color-text-primary, #1E293B);
    font-family: inherit;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: 600;
    text-decoration: none;
    transition:
        border-color var(--transition-base, 0.2s ease),
        box-shadow var(--transition-base, 0.2s ease),
        transform var(--transition-base, 0.2s ease);
    box-shadow: var(--shadow-sm);
}

.lc-hero-btn:hover {
    border-color: var(--color-primary, #2563EB);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
    color: var(--color-primary, #2563EB);
    text-decoration: none;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes lc-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lc-slide-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
    .lc-hero-calc__body {
        grid-template-columns: 1fr;
    }

    .lc-hero-calc__result {
        min-height: auto;
    }
}

@media (max-width: 640px) {
    .lc-hero-calc {
        padding: var(--space-4, 1rem);
        border-radius: 16px;
    }

    .lc-hero-calc__topline {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--space-2, 0.5rem) var(--space-3, 0.75rem);
        margin-bottom: var(--space-3, 0.75rem);
    }

    .lc-hero-calc__rate {
        white-space: normal;
    }

    .lc-hero-calc__field .lc-field__header {
        align-items: center;
        justify-content: space-between;
    }

    .lc-hero-calc__field .lc-field__value-wrap {
        justify-content: flex-end;
        width: auto;
        flex: 0 0 auto;
    }

    .lc-hero-calc__field .lc-amount-display,
    .lc-hero-calc__field .lc-term-display {
        width: auto;
        max-width: 110px;
        min-width: 0;
    }

    .lc-hero-calc__result {
        padding: var(--space-4, 1rem);
    }

    .lc-hero-calc__payment {
        font-size: clamp(2rem, 9vw, 2.5rem);
    }

    .lc-hero-calc__cta,
    .lc-hero-calc .lc-apply-btn {
        min-height: 44px;
        padding: var(--space-2, 0.5rem) var(--space-4, 1rem);
        font-size: var(--font-size-sm, 0.875rem);
    }

    .lc-hero-calc__all-link {
        display: inline-flex;
        line-height: 1.35;
    }

    .lc-panel {
        padding: var(--space-6, 1.5rem) var(--space-4, 1rem);
        border-radius: var(--radius-lg, 12px);
    }

    .lc-results {
        grid-template-columns: 1fr;
        gap: var(--space-4, 1rem);
        padding: var(--space-5, 1.25rem);
    }

    .lc-currency-switch {
        flex-wrap: wrap;
    }

    .lc-currency-switch__options {
        width: 100%;
        justify-content: stretch;
    }

    .lc-currency-switch__option {
        flex: 1 1 0;
    }

    .lc-result + .lc-result::before {
        display: none;
    }

    .lc-result {
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
        padding-bottom: var(--space-3, 0.75rem);
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .lc-result:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .lc-result__label {
        margin-bottom: 0;
    }

    .lc-result--primary .lc-result__value {
        font-size: var(--font-size-xl, 1.25rem);
    }

    .lc-result__value {
        font-size: var(--font-size-base, 1rem);
    }

    .lc-tab {
        padding: 8px 6px;
        min-width: 72px;
    }

    .lc-tab__label {
        font-size: 9px;
        letter-spacing: 0;
        text-transform: none;
        line-height: 1.2;
        white-space: normal;
        text-align: center;
    }

    .hero-loan-buttons {
        gap: var(--space-2, 0.5rem);
    }

    .loan-type-btn {
        min-height: 70px;
        padding: var(--space-3, 0.75rem) var(--space-2, 0.5rem);
    }

    .lc-amount-display {
        width: 100px;
    }

    .lc-field__header {
        flex-wrap: wrap;
        gap: var(--space-2, 0.5rem);
    }
}

@media (max-width: 480px) {
    .lc-hero-calc__secondary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 380px) {
    .lc-hero-calc__payment {
        font-size: 1.85rem;
    }

    .lc-hero-calc__field .lc-amount-display,
    .lc-hero-calc__field .lc-term-display {
        max-width: 96px;
        font-size: var(--font-size-sm, 0.875rem);
    }

    .lc-rate-badge {
        flex-wrap: wrap;
        gap: var(--space-1, 0.25rem);
    }
}

/* ==========================================================================
   LOADING STATE
   ========================================================================== */

.lc-loading {
    display: flex;
    justify-content: center;
    padding: var(--space-12, 3rem);
}

.lc-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--color-border, #E2E8F0);
    border-top-color: var(--color-primary, #2563EB);
    border-radius: 50%;
    animation: lc-spin 0.7s linear infinite;
}

@keyframes lc-spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   ADMIN PAGE STYLING (only used in wp-admin context, harmless on frontend)
   ========================================================================== */

.lc-admin-wrap .lc-settings-table input:focus {
    border-color: #2563eb !important;
    outline: 2px solid rgba(37, 99, 235, 0.2);
}

/* ==========================================================================
   DARK MODE OVERRIDES
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .lc-wrap {
        color: #E2E8F0;
    }

    .lc-tabs {
        background: #0F172A;
        border-color: #334155;
    }

    .lc-tab {
        color: #94A3B8;
    }

    .lc-tab:hover {
        background: rgba(37, 99, 235, 0.12);
        color: var(--color-primary-light, #3B82F6);
    }

    .lc-tab--active {
        background: #1E293B;
        color: var(--color-primary-light, #3B82F6);
    }

    .lc-panel {
        background: #1E293B;
        border-color: #334155;
    }

    .lc-field__label {
        color: #94A3B8;
    }

    .lc-currency-switch {
        background: #0F172A;
        border-color: #334155;
    }

    .lc-currency-switch__label {
        color: #94A3B8;
    }

    .lc-currency-switch__options {
        background: rgba(37, 99, 235, 0.14);
    }

    .lc-currency-switch__option {
        color: #94A3B8;
    }

    .lc-currency-switch__option--active {
        background: #1E293B;
        color: var(--color-primary-light, #3B82F6);
    }

    .lc-field__value-wrap {
        background: #0F172A;
        border-color: #334155;
    }

    .lc-amount-display,
    .lc-term-display {
        color: #E2E8F0;
    }

    .lc-field__unit {
        color: #64748B;
    }

    .lc-slider {
        background: linear-gradient(
            to right,
            var(--color-primary, #2563EB) var(--fill, 50%),
            #334155 var(--fill, 50%)
        );
    }

    .lc-slider-minmax {
        color: #64748B;
    }

    .lc-rate-badge {
        background: linear-gradient(135deg,
            rgba(37, 99, 235, 0.15),
            rgba(6, 182, 212, 0.15));
        border-color: rgba(37, 99, 235, 0.3);
    }

    .lc-rate-badge__label {
        color: #94A3B8;
    }

    .lc-breakdown__legend {
        color: #64748B;
    }

    /* Calculator page dark mode */
    .lc-calc-page {
        background: #0F172A;
    }

    .lc-calc-page__title {
        color: #E2E8F0;
    }

    .lc-calc-page__subtitle {
        color: #94A3B8;
    }

    .lc-calc-page__disclaimer {
        background: #1E293B;
        border-color: #334155;
        color: #64748B;
    }

    .lc-breadcrumb {
        color: #64748B;
    }

    .lc-breadcrumb a {
        color: var(--color-primary-light, #3B82F6);
    }

    .hero-section .lc-hero-calc {
        background: #ffffff;
        border-color: rgba(10, 37, 64, 0.1);
        color: #0A2540;
    }

    .hero-section .lc-hero-calc__product {
        background: rgba(10, 37, 64, 0.06);
        color: #0A2540;
    }

    .hero-section .lc-hero-calc__rate,
    .hero-section .lc-hero-calc__all-link {
        color: rgba(10, 37, 64, 0.68);
    }

    .hero-section .lc-hero-calc__field .lc-field__label,
    .hero-section .lc-amount-display,
    .hero-section .lc-term-display {
        color: #0A2540;
    }

    .hero-section .lc-hero-calc__field .lc-field__value-wrap {
        background: transparent;
        border: none;
    }

    .hero-section .lc-field__unit,
    .hero-section .lc-slider-minmax {
        color: #64748B;
    }
}
