/* PWA Styles */

/* Hide scrollbar in standalone mode for cleaner look */
@media all and (display-mode: standalone) {
    body::-webkit-scrollbar {
        width: 4px;
    }
    
    body::-webkit-scrollbar-track {
        background: transparent;
    }
    
    body::-webkit-scrollbar-thumb {
        background: rgba(86, 122, 84, 0.3);
        border-radius: 4px;
    }
    
    body::-webkit-scrollbar-thumb:hover {
        background: rgba(86, 122, 84, 0.5);
    }
}

/* PWA Safe Area adjustments for notch devices */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    header, footer {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}

/* Splash screen styles */
.pwa-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #567A54 0%, #3d5840 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pwa-splash.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Install button animation */
.install-btn-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* PWA specific improvements */
@media all and (display-mode: standalone) {
    /* Remove tap highlight on iOS */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Improve touch targets */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent text selection on long press */
    body {
        user-select: none;
        -webkit-user-select: none;
    }
    
    /* Allow text selection in inputs and content areas */
    input, textarea, [contenteditable], .selectable {
        user-select: text;
        -webkit-user-select: text;
    }
}

