/* ================================================
   Sadre – Simulador de Inversión COMAP
   Paleta: Navy #001C54  |  Verde #285B47  |  Verde claro #F2FCF2
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto+Serif:wght@400;500;600&family=Inter:wght@300;400;500;600&display=swap');

/* ---- Reset / wrapper ---- */
#sadre-sim-wrap *,
#sadre-sim-wrap *::before,
#sadre-sim-wrap *::after {
    box-sizing: border-box;
}

#sadre-sim-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: 'Inter', 'Neue Montreal Regular', sans-serif;
    color: #001C54;
    align-items: start;
}

/* ============================================
   COLUMNA IZQUIERDA
   ============================================ */
.sadre-sim-left {
    display: flex;
    flex-direction: column;
}

/* ---- Cabecera de título ---- */
.sadre-sim-title-block {
    margin-bottom: 36px;
}
.sadre-sim-heading {
    font-family: 'Roboto Serif', Georgia, serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #001C54;
    margin: 0 0 10px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.sadre-sim-subtitle {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* ---- Tabs de pasos ---- */
.sadre-sim-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    margin-bottom: 36px;
    border-bottom: none;
}

.sadre-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid #B5B5B5;
    padding: 14px 0;
    color: #001C54;
    font-size: 1.1rem;
    font-family: 'Roboto Serif', Georgia, serif;
    font-weight: 500;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: border-color .25s, color .25s;
    outline: none;
}

.sadre-tab.active {
    border-bottom: 2px solid #285B47;
    color: #001C54;
}

/* ---- Steps ---- */
.sadre-step {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sadre-step.hidden {
    display: none;
}

/* ---- Campos ---- */
.sadre-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 32px;
    position: relative;
}

.sadre-field label {
    color: #001C54;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.sadre-field input[type="text"],
.sadre-field input[type="email"],
.sadre-field input[type="number"] {
    border: none;
    border-bottom: 1px solid #001C54;
    padding: 10px 2px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #001C54;
    background: transparent;
    outline: none;
    transition: border-color .2s;
}

.sadre-field input:focus {
    border-bottom-color: #285B47;
}

.sadre-field-line {
    height: 0;
}

/* Select personalizado */
.sadre-select-wrap {
    position: relative;
}

.sadre-select-wrap select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    border: none;
    border-bottom: 1px solid #001C54;
    padding: 10px 32px 10px 2px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #001C54;
    background: transparent;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
}

.sadre-select-wrap select:focus {
    border-bottom-color: #285B47;
}

.sadre-select-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 1.2rem;
    color: #001C54;
}

/* Tooltip */
.sadre-tooltip {
    position: relative;
    display: inline-flex;
    cursor: pointer;
}

.sadre-tooltip::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    background: #001C54;
    color: #fff;
    font-size: 0.78rem;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: normal;
    width: 220px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 10;
    font-weight: 400;
}

.sadre-tooltip:hover::after {
    opacity: 1;
}

/* ---- Botones ---- */
.sadre-btn-next,
.sadre-btn-calcular {
    width: 100%;
    padding: 16px 0;
    color: #001C54;
    border: 1px solid #001C54;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .25s, color .25s;
    letter-spacing: 0.01em;
}

.sadre-btn-next:hover,
.sadre-btn-calcular:hover {
    background: #001C54;
    color: #fff;
}

.sadre-btn-next:hover svg path,
.sadre-btn-calcular:hover svg path {
    stroke: #fff;
}

.sadre-btn-calcular {
    background: #001C54;
    color: #fff;
    flex: 1;
}

.sadre-btn-calcular:hover {
    background: #285B47;
    border-color: #285B47;
}

.sadre-btn-back {
    padding: 16px 24px;
    background: transparent;
    border: 1px solid #B5B5B5;
    color: #888;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: border-color .2s, color .2s;
}

.sadre-btn-back:hover {
    border-color: #001C54;
    color: #001C54;
}

.sadre-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.sadre-btn-row .sadre-btn-next,
.sadre-btn-row .sadre-btn-calcular {
    flex: 1;
}

/* Paso 3 */
.sadre-step3-msg {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 28px;
    line-height: 1.6;
    border-left: 3px solid #285B47;
    padding-left: 14px;
}

.sadre-legal {
    font-size: 0.75rem;
    color: #999;
    margin-top: 14px;
    line-height: 1.5;
}

/* ============================================
   COLUMNA DERECHA – Resultados
   ============================================ */
.sadre-sim-right {
    position: sticky;
    top: 80px;
}

.sadre-results-panel {
    background: #F2FCF2;
    padding: 36px 32px;
    border-radius: 4px;
}

/* Donut + exoneración */
.sadre-result-exoneracion {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 8px;
}

.sadre-donut-wrap {
    flex-shrink: 0;
    width: 110px;
    height: 110px;
}

.sadre-donut {
    width: 100%;
    height: 100%;
}

.sadre-donut-progress {
    transition: stroke-dashoffset .8s cubic-bezier(.4,0,.2,1);
}

.sadre-exo-text {
    flex: 1;
}

.sadre-result-label {
    color: #535861;
    font-size: 0.85rem;
    margin: 0 0 4px;
    line-height: 1.4;
}

.sadre-result-pct {
    font-size: 3.2rem;
    color: #285B47;
    margin: 0;
    font-weight: 700;
    line-height: 1;
    transition: color .4s;
}

.sadre-result-pct.dimmed { color: #A1A1A1; }

/* Dividers */
.sadre-divider {
    height: 2px;
    background: #285B47;
    margin: 24px 0;
    opacity: 0.25;
}

.sadre-result-row {}

.sadre-result-val {
    font-size: 2.4rem;
    color: #285B47;
    margin: 0;
    font-weight: 700;
    line-height: 1.1;
    transition: color .4s;
}

.sadre-result-val.dimmed { color: #A1A1A1; font-size: 2rem; }

.sadre-result-plazo {
    font-size: 1.8rem;
    color: #285B47;
    margin: 0;
    font-weight: 600;
    line-height: 1.2;
    transition: color .4s;
}

.sadre-result-plazo.dimmed { color: #A1A1A1; }

/* CTA dentro del panel */
.sadre-result-cta {
    text-align: center;
    margin-top: 4px;
}

.sadre-cta-text {
    font-size: 0.9rem;
    color: #001C54;
    margin: 0 0 12px;
    font-weight: 500;
}

.sadre-cta-btn {
    display: inline-block;
    background: #001C54;
    color: #fff !important;
    padding: 13px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    transition: background .25s;
    border-radius: 2px;
    letter-spacing: 0.01em;
}

.sadre-cta-btn:hover {
    background: #285B47;
    color: #fff !important;
}

.sadre-disclaimer {
    font-size: 0.7rem;
    color: #999;
    margin: 20px 0 0;
    line-height: 1.5;
}

/* ============================================
   Error states
   ============================================ */
.sadre-field.error input,
.sadre-field.error select {
    border-bottom-color: #c0392b;
}
.sadre-error-msg {
    font-size: 0.78rem;
    color: #c0392b;
    margin-top: 4px;
    display: none;
}
.sadre-field.error .sadre-error-msg {
    display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    #sadre-sim-wrap {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sadre-sim-right {
        position: static;
        order: -1;             /* Panel de resultado arriba en móvil */
    }

    .sadre-result-pct  { font-size: 2.4rem; }
    .sadre-result-val  { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .sadre-sim-heading { font-size: 1.6rem; }
    .sadre-tab         { font-size: 0.95rem; }
    .sadre-btn-row     { flex-direction: column; }
    .sadre-result-exoneracion { flex-direction: column; align-items: flex-start; }
    .sadre-donut-wrap  { width: 90px; height: 90px; }
}
