/* 
 * NExovant PWA Native Experience Styles
 * Production-grade performance, lightweight, optimized.
 */

:root {
    --pwa-primary: #002f24;
    --pwa-emerald: #10b981;
    --skeleton-bg: #f2f2f2;
    --skeleton-shimmer: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0) 100%);
}

/* 1. NATIVE FEEL IMPROVEMENTS */
body {
    overscroll-behavior-y: none;
    /* Disable pull-to-refresh bounce */
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    /* Prevent accidental text selection on UI elements */
}

input,
textarea {
    user-select: auto;
    /* Re-enable selection for inputs */
}

/* Hide scrollbars on mobile for cleaner app look */
@media (max-width: 768px) {
    ::-webkit-scrollbar {
        display: none;
    }

    body {
        scrollbar-width: none;
    }
}

/* 2. SKELETON LOADER SYSTEM */
.skeleton {
    position: relative;
    overflow: hidden;
    background-color: var(--skeleton-bg);
    border-radius: 8px;
    min-height: 1em;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--skeleton-shimmer);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Special Skeletons */
.skeleton-circle {
    border-radius: 50%;
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-card {
    height: 200px;
    width: 100%;
    margin-bottom: 16px;
}

/* 3. SMART INSTALL MODAL (Bottom Sheet) */
#pwa-install-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: white;
    padding: 24px;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}

#pwa-install-modal.show {
    transform: translateY(0);
}

.install-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.install-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.btn-pwa-install {
    background: var(--pwa-primary);
    color: white;
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-weight: 800;
    margin-top: 16px;
    text-align: center;
}

.btn-pwa-later {
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    padding: 12px;
    width: 100%;
    text-align: center;
    margin-top: 8px;
}

/* 4. PERFORMANCE & MOTION */
.page-transition {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}