/* PWA App Shell Styles - Moss Kulturkalender */

/* App Shell Container */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #ffffff;
}

/* Header Shell */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.app-header.hidden {
    transform: translateY(-100%);
}

/* Main Content Shell */
.app-main {
    flex: 1;
    padding: 0;
    background: #ffffff;
}

/* PWA-specific navigation */
.pwa-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    z-index: 200;
}

.pwa-nav-items {
    display: flex;
    justify-content: space-around;
    max-width: 480px;
    margin: 0 auto;
}

.pwa-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #a0aec0;
    text-decoration: none;
    font-size: 12px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    min-width: 60px;
}

.pwa-nav-item:hover,
.pwa-nav-item.active {
    color: #4299e1;
    background: rgba(66, 153, 225, 0.1);
}

.pwa-nav-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

/* Installation banner */
.pwa-install-banner {
    position: relative;
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
    padding: 16px;
    text-align: center;
    display: none;
}

.pwa-install-banner.show {
    display: block;
}

.install-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
}

.install-banner-text {
    flex: 1;
}

.install-banner-buttons {
    display: flex;
    gap: 12px;
    margin-left: 16px;
}

.install-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.install-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.install-btn.primary {
    background: rgba(255, 255, 255, 0.9);
    color: #3182ce;
}

.install-btn.primary:hover {
    background: white;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* PWA-specific media queries */
@media (display-mode: standalone) {
    /* Hide address bar compensation */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    /* Show PWA navigation */
    .pwa-nav {
        display: block;
    }
    
    /* Adjust main content for bottom nav */
    .app-main {
        padding-bottom: calc(70px + env(safe-area-inset-bottom));
    }
    
    /* Hide browser-specific elements */
    .browser-only {
        display: none !important;
    }
}

@media (display-mode: minimal-ui) {
    .pwa-nav {
        display: block;
    }
}

/* iOS specific adjustments */
@supports (-webkit-touch-callout: none) {
    .app-header {
        padding-top: env(safe-area-inset-top);
    }
}

/* Android specific adjustments */
@media (display-mode: standalone) and (orientation: portrait) {
    .app-header {
        padding-top: max(env(safe-area-inset-top), 20px);
    }
}

/* Dark mode support for PWA */
@media (prefers-color-scheme: dark) {
    .app-shell {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .app-main {
        background: #1a202c;
    }
    
    .loading-skeleton {
        background: linear-gradient(90deg, #2d3748 25%, #4a5568 50%, #2d3748 75%);
        background-size: 200% 100%;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}