/*
 * Mortgage Calculator 2026 - Production Utility Styles
 * Optimized for CLS (Cumulative Layout Shift) and AdSense
 */

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

:root {
    --primary: 215 100% 50%;
    --primary-dark: 215 100% 40%;
    --primary-glow: rgba(22, 119, 255, 0.3);
    
    --financial-bg: 210 20% 98%;
    --financial-card: 0 0% 100%;
    --financial-text: 215 25% 20%;
    
    --dark-bg: 222 47% 11%;
    --dark-card: 217 33% 17%;
    --dark-border: 217 33% 25%;
}

body {
    font-family: 'Outfit', 'Inter', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

/* Glassmorphism Effects */
.glass-card {
    backdrop-filter: blur(16px) saturate(180%);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.dark .glass-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* AdSense CLS Optimization (Critical for Google SEO) */
.ad-placeholder {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(
        45deg,
        rgba(0,0,0,0.02),
        rgba(0,0,0,0.02) 10px,
        rgba(0,0,0,0.04) 10px,
        rgba(0,0,0,0.04) 20px
    );
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.dark .ad-placeholder {
    background: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.01),
        rgba(255,255,255,0.01) 10px,
        rgba(255,255,255,0.02) 10px,
        rgba(255,255,255,0.02) 20px
    );
}

/* Specific Height for Top/Middle Ad Units */
#ad-top { min-height: 90px; }
#ad-middle { min-height: 280px; }
#ad-sidebar { min-height: 300px; }

/* Input Interaction */
.input-focus:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(22, 119, 255, 0.15);
}

/* Custom Scrollbar for Detail Table */
#table_container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#table_container::-webkit-scrollbar-track {
    background: transparent;
}

#table_container::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.dark #table_container::-webkit-scrollbar-thumb {
    background: #334155;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

/* Tooltip & Help */
.help-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    background: #cbd5e1;
    color: white;
    font-size: 10px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: help;
    margin-left: 4px;
}
