/* =============================================
   WhatsMyIPOnline - Custom Styles
   Design System: Deep Teal + Warm Slate
   ============================================= */

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Selection color */
::selection {
    background: rgba(15, 118, 110, 0.15);
    color: #0f172a;
}

/* Focus ring */
*:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* Header scroll effect */
#site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark #site-header.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
}

/* IP Card glow effect */
#ip-card {
    transition: box-shadow 0.4s ease;
}
#ip-card:hover {
    box-shadow: 0 0 40px rgba(13, 148, 136, 0.08), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Tool cards stagger animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#tools-grid > a {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
}

#tools-grid > a:nth-child(1) { animation-delay: 0.05s; }
#tools-grid > a:nth-child(2) { animation-delay: 0.1s; }
#tools-grid > a:nth-child(3) { animation-delay: 0.15s; }
#tools-grid > a:nth-child(4) { animation-delay: 0.2s; }
#tools-grid > a:nth-child(5) { animation-delay: 0.25s; }
#tools-grid > a:nth-child(6) { animation-delay: 0.3s; }
#tools-grid > a:nth-child(7) { animation-delay: 0.35s; }
#tools-grid > a:nth-child(8) { animation-delay: 0.4s; }
#tools-grid > a:nth-child(9) { animation-delay: 0.45s; }
#tools-grid > a:nth-child(10) { animation-delay: 0.5s; }
#tools-grid > a:nth-child(11) { animation-delay: 0.55s; }
#tools-grid > a:nth-child(12) { animation-delay: 0.6s; }

/* FAQ accordion animation */
.faq-answer {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Concern cards hover */
#concern-security:hover,
#concern-privacy:hover,
#concern-access:hover {
    transform: translateY(-2px);
}

/* Map popup overrides */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    font-family: "Inter", system-ui, sans-serif !important;
}

.leaflet-popup-content {
    margin: 10px 14px !important;
    font-size: 13px !important;
}

/* Prose styling overrides */
.prose h2 { font-family: "Plus Jakarta Sans", system-ui, sans-serif; }
.prose h3 { font-family: "Plus Jakarta Sans", system-ui, sans-serif; }

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2; /* compatibility */
    overflow: hidden;
}

/* Pulse animation for status dots */
@keyframes gentlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: gentlePulse 2s ease-in-out infinite;
}

/* Mobile touch feedback */
@media (hover: none) {
    .group:active {
        transform: scale(0.98);
        transition: transform 0.1s;
    }
}

/* Print styles */
@media print {
    #site-header, #site-footer, #mobile-menu, #cta-section { display: none !important; }
    body { background: white !important; }
    .bg-surface-900 { background: #f8f9fa !important; color: #111 !important; }
}

/* =============================================
   Leaflet Z-Index Fix: Stay below navigation (z-50)
   ============================================= */
.leaflet-container, 
.leaflet-pane, 
.leaflet-top, 
.leaflet-bottom, 
.leaflet-proxy,
.leaflet-map-pane,
.leaflet-tile-pane,
.leaflet-shadow-pane,
.leaflet-overlay-pane,
.leaflet-marker-pane,
.leaflet-tooltip-pane,
.leaflet-popup-pane {
    z-index: 10 !important;
}

#site-header {
    z-index: 1000 !important;
}
