/**
 * Simulador de Crédito - Estilos
 * 
 * @package Cooperpress
 * @since 1.0.0
 */


/* ====== CONTAINER PRINCIPAL ====== */

#simuladorCreditoSection {
    margin: 2rem 0;
}

.simulador-container {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 18px;
    padding: 30px 24px 32px;
    box-shadow: 0 10px 28px rgba(16, 24, 40, 0.08);
}


/* ====== TÍTULOS ====== */

.simulador-title {
    font-weight: 800 !important;
    font-size: 28px;
    line-height: 1.1;
    text-align: center;
    margin: 6px 0 10px;
    color: #111;
}

.simulador-divider {
    border-top: 2px solid #000;
    opacity: 0.15;
    margin: 4px 0 16px;
}


/* ====== CAMPOS / INPUTS ====== */

.simulador-field {
    margin-bottom: 1rem;
}

.simulador-label {
    font-size: 14px;
    color: #222;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.simulador-input,
.simulador-select {
    width: 100%;
    background: #eff1f2 !important;
    border: 0 !important;
    border-radius: 14px !important;
    padding: 12px 14px !important;
    height: 48px;
    font-size: 16px;
    color: #111;
    transition: all 0.2s ease;
}

.simulador-input:focus,
.simulador-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.18);
    background: #fff !important;
    border: 1px solid #9bdad2 !important;
}

.simulador-input::placeholder {
    color: #7c7f83;
    opacity: 1;
}


/* Select customizado */

.simulador-select {
    padding: 12px 14px !important;
}


/* Campo de valor (R$) */

.simulador-valor-input {
    display: flex;
    align-items: center;
    background: #eff1f2;
    border-radius: 14px;
    overflow: hidden;
    height: 48px;
}

.simulador-valor-prefix {
    padding: 0 0 0 14px;
    font-weight: 600;
    color: #111;
}

.simulador-valor-field {
    flex: 1;
    background: transparent !important;
    border: 0 !important;
    padding: 0 4px !important;
    height: 48px;
    font-size: 16px;
    color: #111;
}

.simulador-valor-field:focus {
    outline: none;
    box-shadow: none !important;
}

.simulador-valor-suffix {
    padding: 0 14px 0 0;
    color: #111;
}


/* Input de parcelas */

.simulador-parcelas-input {
    max-width: 200px;
}


/* Hints e mensagens */

.simulador-field-hint {
    font-size: 12px;
    color: #666;
    display: block;
    margin-top: 4px;
}

.simulador-field-error {
    color: #dc3545;
    font-weight: 600;
}

.simulador-field-hints {
    margin-top: 4px;
}


/* Animação de erro */

.alertParcelasCredito {
    animation: shake 0.1s 3;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-5px);
    }
    75% {
        transform: translateX(5px);
    }
}


/* ====== PRIVACIDADE ====== */

.simulador-privacy {
    margin-top: 1.5rem;
}

.simulador-privacy-alert {
    background: #fff8e6;
    border: 1px solid #ffe8a6;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 1rem;
}

.simulador-privacy-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #3c3c3c;
}

.simulador-privacy-text {
    font-size: 12px;
    margin-bottom: 6px;
    color: #3c3c3c;
    line-height: 1.5;
}

.simulador-privacy-link {
    color: #0b5ed7;
    text-decoration: underline;
}

.simulador-privacy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 1rem;
}

.simulador-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.simulador-checkbox-label {
    font-size: 13px;
    color: #222;
    line-height: 1.4;
    cursor: pointer;
}


/* ====== BOTÕES ====== */

.simulador-btn {
    border: 0;
    border-radius: 14px;
    height: 48px;
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

.simulador-btn-primary {
    background: #ffc107;
    color: #111;
    width: 100%;
}

.simulador-btn-primary:hover {
    background: #ffb300;
    transform: translateY(-1px);
    box-shadow: 0 8px 14px rgba(255, 193, 7, 0.32);
}

.simulador-btn-secondary {
    background: #e0e0e0;
    color: #111;
    flex: 1;
}

.simulador-btn-secondary:hover {
    background: #d0d0d0;
}

.simulador-captcha-area {
    margin: 0 0 12px;
}

.simulador-captcha-area:empty {
    display: none;
}

#googleRecaptchaV2Container {
    display: none;
    width: 100%;
}

#googleRecaptchaV2Container>div {
    margin: 0 auto;
}

.simulador-btn-detalhar {
    background: #e0e0e0;
    border: 0;
    color: #111;
    border-radius: 14px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.3s ease;
}

.simulador-btn-detalhar:hover {
    background: #d0d0d0;
}


/* ====== LOADER ====== */

.simulador-loader {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.simulador-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #ffc107;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

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

.simulador-loader-text {
    margin: 0;
    color: #666;
    font-size: 14px;
}


/* ====== RESULTADO ====== */

.simulador-result {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.04);
    padding: 16px 14px;
    margin-top: 1.5rem;
}

.simulador-result-title {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
    color: #111;
}

.simulador-result-table {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.simulador-result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
}

.simulador-result-row:last-child {
    border-bottom: none;
}

.simulador-result-row.bg-white {
    background: #f7f7f7;
}

.simulador-result-label {
    color: #555;
}

.simulador-result-value {
    font-weight: 600;
    color: #111;
    text-align: right;
}


/* CET */

.simulador-result-cet {
    margin-top: 1rem;
}

.simulador-result-cet-title {
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 10px;
}


/* Detalhamento */

.simulador-detalhamento {
    margin-top: 1rem;
}

.simulador-detalhamento-table {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.simulador-detalhamento-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid #e9ecef;
    font-size: 12px;
}

.simulador-detalhamento-row:last-child {
    border-bottom: none;
}

.simulador-detalhamento-row.bold {
    font-weight: 700;
}

.simulador-detalhamento-row.indent .simulador-detalhamento-label {
    padding-left: 1rem;
}

.simulador-detalhamento-label {
    color: #555;
    flex: 1;
}

.simulador-detalhamento-value {
    font-weight: 600;
    color: #111;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.simulador-detalhamento-percent {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}


/* ====== INFORMAÇÕES ADICIONAIS ====== */

.simulador-info {
    margin-top: 1rem;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.simulador-info-text {
    font-size: 11px;
    color: #555;
    margin: 0;
    line-height: 1.6;
}


/* ====== AÇÕES ====== */

.simulador-actions {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
    align-items: stretch;
}


/* ====== MODALS ====== */

.simulador-modal-header {
    background: #ffc107;
    border-radius: 0;
}

.simulador-modal-table td,
.simulador-modal-table th {
    font-size: 14px;
}

.simulador-contact-box {
    background: #ffc107;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.simulador-contact-box p {
    margin: 0.5rem 0;
}


/* ====== RESPONSIVO ====== */

@media (max-width: 480px) {
    .simulador-container {
        padding: 22px 16px;
    }
    .simulador-title {
        font-size: 24px;
    }
    .simulador-input,
    .simulador-select {
        font-size: 15px;
        height: 46px;
    }
    .simulador-parcelas-input {
        max-width: 100%;
    }
    .simulador-actions {
        flex-direction: column;
    }
    .simulador-actions .simulador-btn {
        width: 100%;
    }
    .simulador-btn-secondary {
        width: 100%;
    }
}


/* ====== UTILITÁRIOS ====== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


/* Etapas do simulador */

.simulador-etapa {
    transition: opacity 0.3s ease;
}


/* Dados preenchidos (resumo) */

.simulador-dados-preenchidos {
    background: linear-gradient(180deg, #fffdf6 0%, #fff8e6 100%);
    border: 1px solid #ffe8a6;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 16px;
    margin-top: 10px;
}

.simulador-dados-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.simulador-dado-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.simulador-dado-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8b6f2c;
    font-weight: 700;
}

.simulador-dado-value {
    font-size: 14px;
    color: #222;
    font-weight: 700;
}

.simulador-btn-edit {
    border: 1px solid #f1cf64;
    background: #fff;
    color: #222;
    border-radius: 10px;
    min-height: 38px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.simulador-dado-value {
    overflow-wrap: anywhere;
}

.simulador-btn-edit:hover {
    background: #fff8df;
    border-color: #e8c24c;
}

@media (max-width: 640px) {
    .simulador-dados-grid {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .simulador-btn-edit {
        width: 100%;
    }
}


/* Loading state no botão */

.simulador-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}