/* ScrollIndicator Atom - Visual scroll position indicator */

/* ===================================
   BASE SCROLL INDICATOR
   =================================== */

.scroll-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    
    /* Visual styling */
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-secondary);
    border: var(--border-width-1) solid var(--border-default);
    border-radius: var(--border-radius-full);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
    
    /* Size */
    width: var(--space-8);
    height: var(--space-8);
    
    /* Layout */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    
    /* Initial state - hidden */
    opacity: 0;
    visibility: hidden;
    
    /* Interaction */
    cursor: pointer;
    z-index: 1000;
    
    /* Transitions */
    transition: all var(--duration-300) var(--easing-out);
}

/* ===================================
   HOVER STATE
   =================================== */

.scroll-indicator:hover {
    background: var(--bg-surface);
    transform: translateX(-50%) scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* ===================================
   POSITION VARIANTS
   =================================== */

/* Bottom indicator (scroll down) */
.scroll-indicator-bottom {
    bottom: var(--space-6);
}

/* Top indicator (scroll up) */
.scroll-indicator-top {
    top: var(--space-6);
}

/* ===================================
   VISIBILITY STATES
   =================================== */

/* Visible state */
.scroll-indicator.visible {
    opacity: 1;
    visibility: visible;
}

/* Scrolling state (hide while actively scrolling) */
.scroll-indicator.scrolling {
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-200) var(--easing-in);
}

/* ===================================
   ATTENTION ANIMATION
   =================================== */

/* Subtle bounce for bottom indicator */
.scroll-indicator-bottom.visible {
    animation: scroll-indicator-bounce 2s infinite;
}

/* Extra attention state */
.scroll-indicator.attention {
    animation: scroll-indicator-bounce 2s infinite, scroll-indicator-pulse 3s infinite;
}

@keyframes scroll-indicator-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.6;
    }
    40% {
        transform: translateX(-50%) translateY(-3px);
        opacity: 0.9;
    }
    60% {
        transform: translateX(-50%) translateY(-1px);
        opacity: 0.8;
    }
}

@keyframes scroll-indicator-pulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.9;
    }
}

/* ===================================
   SIZE VARIANTS
   =================================== */

.scroll-indicator-sm {
    width: var(--space-6);
    height: var(--space-6);
    font-size: var(--text-xs);
}

.scroll-indicator-lg {
    width: var(--space-10);
    height: var(--space-10);
    font-size: var(--text-lg);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .scroll-indicator {
        width: var(--space-7);
        height: var(--space-7);
        font-size: var(--text-xs);
    }
    
    .scroll-indicator:hover {
        transform: translateX(-50%) scale(1.05);
    }
    
    .scroll-indicator-bottom {
        bottom: var(--space-4);
    }
    
    .scroll-indicator-top {
        top: var(--space-4);
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .scroll-indicator {
        animation: none !important;
    }
    
    .scroll-indicator.visible {
        opacity: 0.8;
    }
}

/* Focus styles for keyboard navigation */
.scroll-indicator:focus-visible {
    outline: var(--border-width-2) solid var(--color-primary);
    outline-offset: var(--space-0_5);
}
