/* ─────────────────────────────────────────────
   Kavo Financing Consumer Modal — BR Only
   Design: Minimal / Tesla-Apple inspired
   ───────────────────────────────────────────── */

/* ── Trigger button ── */
.kavo-fin-trigger-btn {
    border: 1.5px solid #0f766e;
    color: #0f766e;
    background: transparent;
    border-radius: 50px;
    font-size: 0.925rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 10px 20px;
    gap: 8px;
    transition: background 0.15s, color 0.15s, transform 0.1s;
    cursor: pointer;
}
.kavo-fin-trigger-btn:hover {
    background: rgba(15, 118, 110, 0.06);
    color: #0b5d56;
    border-color: #0b5d56;
}
.kavo-fin-trigger-btn:active {
    transform: scale(0.99);
}
.kavo-fin-trigger-btn svg {
    flex-shrink: 0;
}

/* ── Dialog ── */
.kavo-financing-dialog {
    max-width: 500px;
}

/* ── Modal card ── */
.kavo-financing-modal {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.14), 0 4px 16px rgba(15, 23, 42, 0.06);
    position: relative;
}

/* ── Header ── */
.kavo-fin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}
.kavo-fin-header__left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.kavo-fin-header__icon {
    width: 40px;
    height: 40px;
    background: rgba(15, 118, 110, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0f766e;
    flex-shrink: 0;
}
.kavo-fin-header__title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.kavo-fin-header__subtitle {
    font-size: 0.78rem;
    color: #6b7280;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
}
.kavo-fin-close {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 8px;
    color: #9ca3af;
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
    margin-left: 8px;
}
.kavo-fin-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* ── Step indicator ── */
.kavo-fin-steps {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    gap: 8px;
    background: #fafafa;
    border-bottom: 1px solid #f1f5f9;
}
.kavo-fin-step {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #9ca3af;
    transition: color 0.2s;
}
.kavo-fin-step__num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.kavo-fin-step--active .kavo-fin-step__num,
.kavo-fin-step--done .kavo-fin-step__num {
    background: #0f766e;
    color: #fff;
}
.kavo-fin-step--active {
    color: #0f766e;
    font-weight: 600;
}
.kavo-fin-step-line {
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ── Body ── */
.kavo-fin-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
    max-height: 62vh;
}

/* ── Vehicle strip ── */
.kavo-fin-vehicle-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 20px;
    border: 1px solid #f1f5f9;
}
.kavo-fin-vehicle-strip__img {
    width: 56px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    background: #e5e7eb;
    flex-shrink: 0;
}
.kavo-fin-vehicle-strip__info {
    min-width: 0;
    flex: 1;
}
.kavo-fin-vehicle-strip__name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.kavo-fin-vehicle-strip__price {
    font-size: 0.8rem;
    color: #0f766e;
    font-weight: 600;
    margin-top: 2px;
}

/* ── Form grid ── */
.kavo-fin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.kavo-fin-field--full {
    grid-column: 1 / -1;
}

/* ── Field ── */
.kavo-fin-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.kavo-fin-field input {
    width: 100%;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 0.9rem;
    color: #111827;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.kavo-fin-field input:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.kavo-fin-field input.is-invalid {
    border-color: #ef4444;
    box-shadow: none;
}
.kavo-fin-field input::placeholder {
    color: #d1d5db;
}
.kavo-fin-error-msg {
    font-size: 0.7rem;
    color: #ef4444;
    margin-top: 3px;
    display: none;
}
.kavo-fin-error-msg.visible {
    display: block;
}

/* ── CNH checkbox ── */
.kavo-fin-check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}
.kavo-fin-check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1.5px solid #e5e7eb;
    border-radius: 5px;
    accent-color: #0f766e;
    cursor: pointer;
    flex-shrink: 0;
}
.kavo-fin-check-row span {
    font-size: 0.85rem;
    color: #374151;
}

/* ── Installment pills ── */
.kavo-fin-installments-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #374151;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}
.kavo-fin-installments {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.kavo-fin-inst-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.kavo-fin-inst-label {
    padding: 6px 16px;
    border-radius: 50px;
    border: 1.5px solid #e5e7eb;
    font-size: 0.825rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    user-select: none;
    display: inline-block;
}
.kavo-fin-inst-input:checked + .kavo-fin-inst-label {
    border-color: #0f766e;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.07);
}

/* ── Submit button ── */
.kavo-fin-submit-btn {
    width: 100%;
    background: #0f766e;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.kavo-fin-submit-btn:hover:not(:disabled) {
    background: #0b5d56;
}
.kavo-fin-submit-btn:active:not(:disabled) {
    transform: scale(0.99);
}
.kavo-fin-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Loading overlay ── */
.kavo-fin-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.97);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border-radius: 20px;
    z-index: 20;
}
.kavo-fin-loading.visible {
    display: flex;
}
.kavo-fin-loading__spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #e5e7eb;
    border-top-color: #0f766e;
    border-radius: 50%;
    animation: kfin-spin 0.75s linear infinite;
}
@keyframes kfin-spin {
    to { transform: rotate(360deg); }
}
.kavo-fin-loading__title {
    font-size: 0.975rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
}
.kavo-fin-loading__subtitle {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
    max-width: 220px;
    line-height: 1.5;
}
.kavo-fin-loading__dots {
    display: flex;
    gap: 5px;
}
.kavo-fin-loading__dot {
    width: 7px;
    height: 7px;
    background: #0f766e;
    border-radius: 50%;
    animation: kfin-dot 1.2s ease-in-out infinite;
}
.kavo-fin-loading__dot:nth-child(2) { animation-delay: 0.2s; }
.kavo-fin-loading__dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes kfin-dot {
    0%, 80%, 100% { transform: scale(0.65); opacity: 0.45; }
    40% { transform: scale(1); opacity: 1; }
}

/* ── Results: readjust bar ── */
.kavo-fin-readjust {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    padding: 14px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid #f1f5f9;
}
.kavo-fin-readjust-btn {
    background: #0f766e;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}
.kavo-fin-readjust-btn:hover {
    background: #0b5d56;
}

/* ── Bank cards ── */
.kavo-fin-banks-grid {
    display: grid;
    gap: 8px;
}
.kavo-fin-bank-card {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid #f1f5f9;
    background: #fff;
    transition: border-color 0.15s, transform 0.15s;
}
.kavo-fin-bank-card:hover {
    border-color: #e5e7eb;
}
.kavo-fin-bank-card--approved {
    border-color: rgba(16, 185, 129, 0.25);
    background: #f0fdf9;
}
.kavo-fin-bank-card--promising {
    border-color: rgba(245, 158, 11, 0.25);
    background: #fffbeb;
}
.kavo-fin-bank-card__name {
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 3px;
}
.kavo-fin-bank-card__detail {
    font-size: 0.78rem;
    color: #6b7280;
}
.kavo-fin-bank-card__detail strong {
    color: #374151;
    font-weight: 600;
}
.kavo-fin-bank-card__badge {
    font-size: 0.685rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    text-transform: uppercase;
}
.kavo-fin-bank-card__badge--approved {
    background: #d1fae5;
    color: #065f46;
}
.kavo-fin-bank-card__badge--promising {
    background: #fef3c7;
    color: #92400e;
}
.kavo-fin-bank-card__badge--analysis {
    background: #e0f2fe;
    color: #0c4a6e;
}

/* ── Interest CTA ── */
.kavo-fin-interest-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}
.kavo-fin-interest-copy {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 12px;
    line-height: 1.5;
}
.kavo-fin-interest-btn {
    width: 100%;
    background: #0f766e;
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.kavo-fin-interest-btn:hover:not(.kavo-fin-interest-btn--done) {
    background: #0b5d56;
}
.kavo-fin-interest-btn:active:not(.kavo-fin-interest-btn--done) {
    transform: scale(0.99);
}
.kavo-fin-interest-btn--done {
    background: #059669;
    cursor: default;
}
.kavo-fin-back-btn {
    width: 100%;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 10px;
    padding: 6px;
    text-align: center;
    transition: color 0.15s;
}
.kavo-fin-back-btn:hover { color: #374151; }

/* ── Async notice ── */
.kavo-fin-async-notice {
    text-align: center;
    padding: 28px 16px;
}
.kavo-fin-async-notice__icon {
    color: #0f766e;
    margin-bottom: 12px;
}
.kavo-fin-async-notice__title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}
.kavo-fin-async-notice__copy {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

/* ── Disclaimer ── */
.kavo-fin-disclaimer {
    font-size: 0.685rem;
    color: #9ca3af;
    text-align: center;
    margin-top: 14px;
    line-height: 1.55;
}

/* ── Error state ── */
.kavo-fin-error-banner {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.82rem;
    color: #b91c1c;
    margin-bottom: 14px;
    display: none;
}
.kavo-fin-error-banner.visible {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .kavo-financing-dialog {
        max-width: 100%;
        margin: 0;
        align-items: flex-end;
    }
    .kavo-financing-modal {
        border-radius: 20px 20px 0 0;
    }
    .kavo-fin-body {
        padding: 16px;
        max-height: 70vh;
    }
    .kavo-fin-header {
        padding: 16px 16px 14px;
    }
    .kavo-fin-steps {
        padding: 10px 16px;
    }
    .kavo-fin-form-grid {
        grid-template-columns: 1fr;
    }
    .kavo-fin-field--full {
        grid-column: 1;
    }
    .kavo-fin-readjust {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .kavo-fin-readjust-btn {
        width: 100%;
    }
}
