/* ==========================================================================
   SIMULAFINANZAS — ESTILOS GLOBALES (INTER / ARIAL SANS + FORMATOS PUBLICITARIOS)
   ========================================================================== */

:root {
    --font-base: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    --color-bg: #F3F4F6;
    --color-card: #FFFFFF;
    --color-text-main: #111827;
    --color-text-muted: #4B5563;
    --color-border: #E5E7EB;
    
    --color-primary: #1D4ED8;
    --color-primary-hover: #1E40AF;
    --color-success: #059669;
    --color-warning: #D97706;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-base);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Tarjetas limpias de bordes sutiles */
.calc-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Inputs estándar cómodos */
.calc-input {
    width: 100%;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    background-color: #FFFFFF;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.calc-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

/* Sliders nativos limpios */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: #E5E7EB;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
    margin: 8px 0;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1D4ED8;
    border: 2px solid #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1D4ED8;
    border: 2px solid #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

/* Tabla de Amortización con Scroll y Lectura Cómoda */
.table-scroll-wrapper {
    max-height: 520px;
    overflow-y: auto;
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.table-scroll-wrapper::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #9CA3AF;
    border-radius: 4px;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
    background: #F3F4F6;
}

/* ==========================================================================
   ESPACIOS PUBLICITARIOS ESTANDARIZADOS DE GOOGLE ADSENSE (ALTO RENDIMIENTO)
   ========================================================================== */
.adsense-placeholder {
    background: #FFFFFF;
    border: 1px dashed #9CA3AF;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 1rem 0;
    position: relative;
    overflow: hidden;
}

.adsense-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    background: #F3F4F6;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

/* Dimensiones estándar oficiales de AdSense */
.ad-leaderboard {
    min-height: 90px;
    width: 100%;
}

.ad-rectangle {
    min-height: 250px;
    width: 100%;
}

.ad-skyscraper {
    min-height: 600px;
    width: 100%;
}

.ad-in-feed {
    min-height: 120px;
    width: 100%;
}

/* ==========================================================================
   PRINT CSS (Impresión limpia y directa de la tabla en PDF)
   ========================================================================== */
@media print {
    @page {
        size: A4 portrait;
        margin: 15mm 10mm;
    }

    body {
        background: #FFFFFF !important;
        color: #000000 !important;
        font-size: 8.5pt !important;
    }

    header, 
    footer, 
    nav, 
    .no-print, 
    .adsense-placeholder, 
    .seo-guide-section, 
    #faq-section,
    .btn-action {
        display: none !important;
    }

    .calc-card {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
    }

    .print-only-header {
        display: block !important;
        border-bottom: 2px solid #111827;
        padding-bottom: 8px;
        margin-bottom: 12px;
    }

    .table-scroll-wrapper {
        max-height: none !important;
        overflow: visible !important;
        border: 1px solid #111827 !important;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    thead {
        display: table-header-group !important;
    }

    tr {
        page-break-inside: avoid !important;
    }

    th, td {
        border: 1px solid #D1D5DB !important;
        padding: 5px 8px !important;
    }

    th {
        background-color: #F3F4F6 !important;
        color: #111827 !important;
        font-weight: 700 !important;
    }

    .print-summary-box {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 8px !important;
        border: 1px solid #D1D5DB;
        padding: 8px 12px;
        border-radius: 4px;
        margin-bottom: 12px;
        background: #F9FAFB;
    }

    .print-disclaimer {
        display: block !important;
        font-size: 7.5pt;
        color: #4B5563;
        margin-top: 14px;
        border-top: 1px solid #E5E7EB;
        padding-top: 6px;
    }
}

.print-only-header,
.print-disclaimer {
    display: none;
}
