/* ============================================
   AUTOFIN - Formulario Completo de Crédito (Wizard)
   Colores Dukal: fondo #0b0b0b, accent #00A9DE, letras blancas
   ============================================ */

/* Fondo oscuro para la página completa */
body.page-template-default {
    background-color: #0b0b0b !important;
}
body.page-template-default #wrapper,
body.page-template-default #main,
body.page-template-default .site-content,
body.page-template-default .page-wrapper,
body.page-template-default main {
    background-color: #0b0b0b !important;
}
body.page-template-default header,
body.page-template-default .site-header,
body.page-template-default #header,
body.page-template-default .header-main {
    background-color: #000000 !important;
}
body.page-template-default footer,
body.page-template-default .site-footer {
    background-color: #000000 !important;
    color: #ffffff !important;
}

.credito-wizard {
    width: 100%;
    max-width: 700px;
    margin: 40px auto;
    padding: 40px 35px;
    background: #1a1a1a;
    border-radius: 16px;
    border: 1px solid #2a2a2a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    font-family: 'Montserrat', sans-serif, Arial;
    box-sizing: border-box;
}

/* === Progress bar === */
.credito-wizard__progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.credito-wizard__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.credito-wizard__step--active {
    opacity: 1;
}

.credito-wizard__step--done {
    opacity: 0.8;
}

.credito-wizard__step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #333;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.credito-wizard__step--active .credito-wizard__step-number {
    background: #00A9DE;
    color: #fff;
}

.credito-wizard__step--done .credito-wizard__step-number {
    background: #2ecc71;
    color: #fff;
}

.credito-wizard__step-label {
    font-size: 11px;
    color: #999;
    text-align: center;
}

.credito-wizard__step--active .credito-wizard__step-label {
    color: #fff;
}

/* === Panels === */
.credito-wizard__panel {
    display: none;
}

.credito-wizard__panel--active {
    display: block;
}

.credito-wizard__title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 25px;
}

/* === Form fields === */
.credito-wizard__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.credito-wizard__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.credito-wizard__field label {
    font-size: 12px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credito-wizard__field input,
.credito-wizard__field select {
    padding: 12px 14px;
    font-size: 14px;
    background: #0b0b0b;
    color: #ffffff;
    border: 1px solid #333;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

.credito-wizard__field input:focus,
.credito-wizard__field select:focus {
    border-color: #00A9DE;
}

.credito-wizard__field input::placeholder {
    color: #555;
}

.credito-wizard__field select {
    cursor: pointer;
}

.credito-wizard__field select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === Cuota box === */
.credito-wizard__cuota {
    background: rgba(0, 169, 222, 0.1);
    border: 1px solid #00A9DE;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.credito-wizard__cuota p {
    color: #999;
    font-size: 13px;
    margin: 0 0 5px;
}

.credito-wizard__cuota-valor {
    font-size: 28px;
    font-weight: 700;
    color: #00A9DE;
}

.credito-wizard__cuota-cae {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* === Actions === */
.credito-wizard__actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 25px;
}

.credito-wizard__btn {
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.credito-wizard__btn--next,
.credito-wizard__btn--submit {
    background: #00A9DE;
    color: #fff;
    margin-left: auto;
}

.credito-wizard__btn--next:hover,
.credito-wizard__btn--submit:hover {
    background: #0090bd;
}

.credito-wizard__btn--back {
    background: transparent;
    color: #999;
    border: 1px solid #333;
}

.credito-wizard__btn--back:hover {
    border-color: #00A9DE;
    color: #00A9DE;
}

.credito-wizard__btn--secondary {
    background: transparent;
    color: #00A9DE;
    border: 2px solid #00A9DE;
    margin-top: 20px;
}

.credito-wizard__btn--secondary:hover {
    background: #00A9DE;
    color: #fff;
}

/* === Resumen === */
.credito-wizard__resumen {
    background: #0b0b0b;
    border-radius: 10px;
    padding: 20px;
}

.credito-wizard__resumen-section {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #222;
}

.credito-wizard__resumen-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.credito-wizard__resumen-section h4 {
    color: #00A9DE;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 10px;
}

.credito-wizard__resumen-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.credito-wizard__resumen-label {
    color: #666;
    font-size: 13px;
}

.credito-wizard__resumen-value {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

/* === Loading === */
.credito-wizard__loading {
    text-align: center;
    padding: 50px 0;
}

.credito-wizard__loading p {
    color: #999;
    font-size: 14px;
    margin-top: 16px;
}

.credito-wizard__spinner {
    width: 45px;
    height: 45px;
    border: 4px solid #333;
    border-top-color: #00A9DE;
    border-radius: 50%;
    animation: cw-spin 0.7s linear infinite;
    margin: 0 auto;
}

@keyframes cw-spin {
    to { transform: rotate(360deg); }
}

/* === Resultado === */
.credito-wizard__resultado {
    text-align: center;
    padding: 30px 0;
}

.credito-wizard__resultado-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.credito-wizard__resultado--aprobado .credito-wizard__resultado-icon {
    background: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}
.credito-wizard__resultado--dudoso .credito-wizard__resultado-icon {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
}
.credito-wizard__resultado--rechazado .credito-wizard__resultado-icon {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
}

.credito-wizard__resultado-titulo {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
}
.credito-wizard__resultado--aprobado .credito-wizard__resultado-titulo { color: #2ecc71; }
.credito-wizard__resultado--dudoso .credito-wizard__resultado-titulo { color: #f1c40f; }
.credito-wizard__resultado--rechazado .credito-wizard__resultado-titulo { color: #e74c3c; }

.credito-wizard__resultado-mensaje {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* === Error === */
.credito-wizard__error {
    margin-top: 12px;
    padding: 10px 16px;
    background: rgba(255, 50, 50, 0.1);
    border: 1px solid #ff4444;
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 13px;
}

/* === Responsive === */
@media (max-width: 768px) {
    .credito-wizard {
        margin: 20px 15px;
        padding: 25px 20px;
    }

    .credito-wizard__row {
        grid-template-columns: 1fr;
    }

    .credito-wizard__progress {
        gap: 5px;
    }

    .credito-wizard__step-label {
        font-size: 9px;
    }

    .credito-wizard__actions {
        flex-direction: column;
    }

    .credito-wizard__btn--next,
    .credito-wizard__btn--submit {
        margin-left: 0;
    }
}


/* === Searchable Dropdown === */
.cw-dropdown-wrap {
    position: relative;
    width: 100%;
}

.cw-dropdown-wrap input {
    width: 100%;
    box-sizing: border-box;
}

.cw-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: #111;
    border: 1px solid #333;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 100;
}

.cw-dropdown__item {
    padding: 10px 14px;
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
    transition: background 0.2s;
}

.cw-dropdown__item:hover {
    background: #00A9DE;
    color: #fff;
}

/* Scrollbar dark */
.cw-dropdown::-webkit-scrollbar {
    width: 6px;
}
.cw-dropdown::-webkit-scrollbar-track {
    background: #1a1a1a;
}
.cw-dropdown::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}
