/**
 * Imaan360 - Utility Classes, Skeleton Loaders & Accessibility Overrides
 * Source of Truth: mockups/DESIGN_PROPOSAL.md (Option A "Sacred Noor")
 */

/* ==========================================================================
   SKELETON LOADERS
   ========================================================================== */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.05) 25%, 
        rgba(255, 255, 255, 0.12) 37%, 
        rgba(255, 255, 255, 0.05) 63%
    );
    background-size: 400% 100%;
    animation: skeletonShimmer 1.4s ease infinite;
    border-radius: var(--radius-sm);
    color: transparent !important;
    pointer-events: none;
    user-select: none;
}

[data-theme="light"] .skeleton {
    background: linear-gradient(90deg, 
        rgba(0, 0, 0, 0.04) 25%, 
        rgba(0, 0, 0, 0.09) 37%, 
        rgba(0, 0, 0, 0.04) 63%
    );
}

@keyframes skeletonShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.skeleton-text {
    height: 1.2em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-circle {
    border-radius: 50%;
}

/* ==========================================================================
   VISUALLY HIDDEN (SCREEN READER ONLY)
   ========================================================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   PREFERS-REDUCED-MOTION OVERRIDES (ACCESSIBILITY CRITICAL)
   ========================================================================== */
@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;
    }

    .ticker-track {
        animation: none !important;
        transform: none !important;
    }

    #bgCanvas {
        display: block !important;
        background: radial-gradient(circle at 50% 20%, rgba(212, 175, 55, 0.14) 0%, rgba(31, 122, 99, 0.18) 45%, transparent 75%) !important;
    }

    .skeleton {
        animation: none !important;
        background: rgba(255, 255, 255, 0.08);
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .site-header,
    .bottom-nav-bar,
    .floating-action-group,
    #bgCanvas,
    .ticker-bar,
    .slider-controls,
    .slider-footer {
        display: none !important;
    }

    .glass-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        background: transparent !important;
    }
}
