/* CalculatorsHive - Main CSS */
/* Extends Tailwind with custom styles */

/* Base */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseGlow { 0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.3); } 50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); } }

.animate-fade-in { animation: fadeIn 0.3s ease-in-out; }
.animate-slide-up { animation: slideUp 0.4s ease-out; }

/* Hero gradient */
.hero-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
}

/* Calculator Card Hover */
.calc-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.calc-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.12);
}

/* Input Number Hide Arrows */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* Prose Content */
.prose-content h3 { font-size: 1rem; font-weight: 700; color: #1e293b; margin-bottom: 0.5rem; }
.prose-content p { font-size: 0.875rem; color: #475569; line-height: 1.7; margin-bottom: 0.75rem; }
.prose-content ul { list-style: disc; padding-left: 1.25rem; }
.prose-content li { font-size: 0.875rem; color: #475569; margin-bottom: 0.25rem; }

/* Result animation */
#result-area:not(.hidden) { animation: slideUp 0.4s ease-out; }

/* Category badges */
.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Ad placeholder */
.ad-placeholder {
    background: repeating-linear-gradient(
        45deg,
        #f8fafc,
        #f8fafc 10px,
        #f1f5f9 10px,
        #f1f5f9 20px
    );
}

/* Mobile Sticky Bottom (for CTA on mobile) */
@media (max-width: 768px) {
    .mobile-sticky-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 50;
        background: white;
        border-top: 1px solid #e2e8f0;
        padding: 12px 16px;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    }
}

/* Print styles */
@media print {
    header, footer, .ad-slot, #mobile-menu-btn { display: none !important; }
    body { background: white; }
    .no-print { display: none !important; }
}

/* Scientific Calculator buttons active state */
button:active { transform: scale(0.96); }

/* Search result highlight */
#search-results a:first-child { border-radius: 12px 12px 0 0; }
#search-results a:last-child { border-radius: 0 0 12px 12px; }

/* Lazy load images */
img[loading="lazy"] {
    background: #f1f5f9;
}

/* Skip link */
.sr-only:not(:focus):not(:active) {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}
