/* Scanora AI Storefront V2 Custom CSS */

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

body {
    background-color: #0b0f19;
    color: #f3f4f6;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0b0f19;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Grid overlay for hero and sections */
.bg-grid-overlay {
    background-size: 50px 50px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
}

/* Glassmorphism details */
.glass-panel {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.glass-panel-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel-hover:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 12px 40px -12px rgba(59, 130, 246, 0.2);
}

/* Dynamic glow elements */
.glow-spot {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.glow-blue {
    background: radial-gradient(circle, #3b82f6 0%, rgba(59, 130, 246, 0) 70%);
}

.glow-emerald {
    background: radial-gradient(circle, #10b981 0%, rgba(16, 185, 129, 0) 70%);
}

.glow-violet {
    background: radial-gradient(circle, #8b5cf6 0%, rgba(139, 92, 246, 0) 70%);
}

/* Glowing text gradients */
.gradient-text-blue-emerald {
    background: linear-gradient(135deg, #60a5fa 0%, #34d399 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-emerald-cyan {
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-white-slate {
    background: linear-gradient(135deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Active systems pulsating led indicator */
.led-pulse {
    position: relative;
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
}

.led-pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: inherit;
    animation: ledPulseAnim 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ledPulseAnim {
    0% { transform: scale(1); opacity: 0.95; }
    100% { transform: scale(3); opacity: 0; }
}

/* Glowing border highlights */
.border-glow-active {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.border-glow-premium {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}

/* Custom Accordion height auto transition */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-active .accordion-content {
    max-height: 1000px; /* Safe upper limit for content */
}

/* Custom interactive animation delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* Code terminal aesthetic */
.terminal-bar {
    background: #1e293b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-dot-red { background-color: #ef4444; }
.terminal-dot-yellow { background-color: #f59e0b; }
.terminal-dot-green { background-color: #10b981; }

/* Sub-second pulse scan lines */
.scan-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    position: absolute;
    top: -2px;
    animation: scanLineAnim 3s linear infinite;
    z-index: 10;
}

@keyframes scanLineAnim {
    0% { top: 0%; opacity: 0; }
    5% { opacity: 1; }
    95% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Loading spinner utility */
.loading-spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spinnerRotate 0.6s linear infinite;
}

.loading-spinner--sm {
    width: 1rem;
    height: 1rem;
}

.loading-spinner--lg {
    width: 2rem;
    height: 2rem;
}

@keyframes spinnerRotate {
    to { transform: rotate(360deg); }
}

/* Skeleton loading animation for admin dashboard */
.skeleton-pulse {
    position: relative;
    overflow: hidden;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 0.5rem;
}

.skeleton-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.04) 50%,
        transparent 100%
    );
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

@keyframes skeletonShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Focus-visible styles for keyboard accessibility */
*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .scan-line,
    .led-pulse::after,
    .loading-spinner {
        animation: none !important;
    }
}

/* Print styles */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }

    header,
    footer,
    #mobile-menu,
    .glow-spot,
    .scan-line,
    .led-pulse,
    #audit-simulation,
    #audit-results,
    .btn-loader,
    nav {
        display: none !important;
    }

    .glass-panel {
        background: #fff !important;
        backdrop-filter: none !important;
        border: 1px solid #ccc !important;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #555;
    }
}
