/* ============================================================================
   ADUAPORTIX CALCULATOR - Math Console, Simulation & Result Cards
   Parte de la Fase 6 de Refactorización.
   ============================================================================ */

/* ⚙️ Pasos matemáticos interactivos (Simulador) */
@keyframes adx-fade-in-out {
    0% { opacity: 0; transform: translateY(15px); filter: blur(4px); }
    15% { opacity: 1; transform: translateY(0); filter: blur(0); }
    85% { opacity: 1; transform: translateY(0); filter: blur(0); }
    100% { opacity: 0; transform: translateY(-15px); filter: blur(4px); }
}

.adx-step-animate {
    animation: adx-fade-in-out 0.8s forwards cubic-bezier(0.4, 0, 0.2, 1);
}

/* 🏦 Consola de cálculo matemático premium */
.adx-math-console {
    background: rgba(15, 23, 42, 0.8);
    border: 1px dashed rgba(16, 185, 129, 0.3);
    border-radius: 20px;
    padding: 2.2rem 1.5rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', Courier, monospace;
    color: var(--ix-green);
    box-shadow: inset 0 0 20px rgba(16, 185, 129, 0.05);
    text-align: center;
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(8px);
}

.adx-console-tag {
    color: var(--ix-accent-cyan);
    font-weight: 800;
    font-size: 0.72rem;
    margin-right: 6px;
}

.adx-math-pulse-dot {
    width: 8px; height: 8px;
    background-color: var(--ix-green);
    border-radius: 50%;
    display: inline-block;
    margin-left: 6px;
    animation: adx-dot-blink 1s infinite alternate;
}

@keyframes adx-dot-blink {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}

.adx-math-progress-bar {
    width: 100%;
    max-width: 240px;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 18px;
    overflow: hidden;
    position: relative;
}

.adx-math-progress-fill {
    height: 100%;
    background: var(--ix-green);
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px var(--ix-green-glow);
}

/* 🚀 Botón Premium de Cálculo */
.adx-btn-calculate {
    width: 100%;
    max-width: 480px;
    background: linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #7c3aed 100%);
    color: #fff;
    border: none;
    padding: 1.1rem 2rem;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
    letter-spacing: 1px;
    margin: 0 auto;
    display: block;
    animation: adx-btn-glow 2s infinite alternate;
}

@keyframes adx-btn-glow {
    from { box-shadow: 0 8px 15px rgba(99, 102, 241, 0.3); transform: scale(1); }
    to { box-shadow: 0 12px 30px rgba(124, 58, 237, 0.5); transform: scale(1.03); }
}

.adx-btn-calculate:hover {
    filter: brightness(1.1);
    transform: translateY(-2px) scale(1.04);
}

/* Estilos de Bloques de Resultados */
.adx-result-block {
    text-align: center;
    margin-bottom: 2.2rem;
    animation: adx-fade-in-slide 0.6s ease-out forwards;
}

/* 🏆 Tarjeta de Prioridad (Total + Gastos) */
.adx-priority-card {
    background: rgba(16, 185, 129, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: 28px;
    padding: 2.5rem 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    animation: adx-fade-in-slide 0.6s ease-out forwards;
}

.adx-result-usd-priority {
    font-size: clamp(3.2rem, 10vw, 4.8rem);
    font-weight: 950;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -3px;
}

.adx-result-mxn-priority {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ix-text-2);
    margin-top: 0.5rem;
}

/* Bloque Mini (Solo Impuestos) */
.adx-result-block-mini {
    text-align: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.adx-result-block-mini span:first-child {
    color: #ffffff !important;
    opacity: 0.8;
}

.adx-result-usd-mini {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff !important;
}

.adx-result-mxn-mini {
    font-size: 0.7rem;
    color: #ffffff !important;
}

.adx-honorarios-simple {
    text-align: center;
    margin-top: 1.5rem;
    padding: 0 1rem;
    animation: adx-fade-in-slide 0.8s ease-out forwards;
}

.adx-result-usd-range {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--ix-green);
    text-shadow: 0 0 20px var(--ix-green-glow);
}

/* ==================== REFINAMIENTO DE COLORES (TEMA OSCURO) ==================== */
.adx-priority-card span:first-child {
    color: #10b981 !important;
}

#calcEstimatedRangeBox span:first-child,
.adx-result-usd-range {
    color: #38bdf8 !important;
}

@keyframes adx-fade-in-slide {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== AVISO AÑOS ECONÓMICOS ==================== */
.adx-eco-notice {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 1.2rem;
    padding: 10px 16px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(52, 211, 153, 0.15);
    border-radius: var(--ix-r-md);
    font-size: 0.8rem;
    color: #6ee7b7;
    font-weight: 500;
    line-height: 1.6;
    max-width: 580px;
    margin-inline: auto;
}

.adx-eco-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

@media (max-width: 860px) {
    .aduaportix-scope #resultsGrid {
        grid-template-columns: 1fr !important;
    }
}