/**
 * PWA Gestures CSS
 * Path: /assets/css/pwa/pwa-gestures.css
 * Features:
 * - Pull-to-Refresh Indicator
 * - Edge Swipe Visual Feedback
 * - Smooth Animations
 * - Reduced Motion Support
 */

/* ============================================================================
PULL-TO-REFRESH INDICATOR
============================================================================ */
.pwa-pull-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(180deg, var(--bg-color, #ffffff) 0%, rgba(255,255,255,0.9) 100%);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.pwa-pull-indicator.refreshing {
    pointer-events: auto;
}

/* Spinner */
.pwa-pull-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--st-stone-200, #e0e0e0);
    border-top-color: var(--st-brand-700, #be0038);
    border-radius: 50%;
    animation: pwaSpinnerRotate 1s linear infinite;
    margin-bottom: 10px;
}

.pwa-pull-indicator.refreshing .pwa-pull-spinner {
    border-top-color: var(--st-brand-700, #be0038);
    animation-duration: 0.8s;
}

@keyframes pwaSpinnerRotate {
    to {
        transform: rotate(360deg);
    }
}

/* Text */
.pwa-pull-text {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 14px;
    color: var(--st-stone-600, #666);
    font-weight: 500;
}

.pwa-pull-indicator.refreshing .pwa-pull-text {
    color: var(--st-brand-700, #be0038);
}

/* ============================================================================
EDGE SWIPE ZONE (Visual Feedback)
============================================================================ */
.pwa-edge-zone {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 300px;
    background: linear-gradient(90deg, 
        rgba(190, 0, 56, 0.08) 0%, 
        rgba(190, 0, 56, 0.03) 50%, 
        transparent 100%
    );
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.pwa-edge-zone-left {
    left: 0;
    background: linear-gradient(90deg, 
        rgba(190, 0, 56, 0.12) 0%, 
        rgba(190, 0, 56, 0.04) 70%, 
        transparent 100%
    );
}

.pwa-edge-zone.active {
    opacity: 1;
}

/* ============================================================================
REDUCED MOTION SUPPORT
============================================================================ */
@media (prefers-reduced-motion: reduce) {
    .pwa-pull-spinner {
        animation: none;
    }
    
    .pwa-pull-indicator,
    .pwa-edge-zone {
        transition: none;
    }
}

/* ============================================================================
MOBILE RESPONSIVE
============================================================================ */
@media (max-width: 767px) {
    .pwa-pull-indicator {
        padding: 15px;
    }
    
    .pwa-pull-spinner {
        width: 28px;
        height: 28px;
    }
    
    .pwa-pull-text {
        font-size: 13px;
    }
}