/* PWA Install Button Styles */
.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    border-radius: 25px;
    padding: 10px 20px;
    box-shadow: 0 4px 12px rgba(0, 200, 150, 0.3);
    background: linear-gradient(135deg, #00c896, #00b080);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    display: none;
}

.pwa-install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 200, 150, 0.4);
    background: linear-gradient(135deg, #00b080, #009973);
}

.pwa-install-btn:active {
    transform: translateY(0);
}

/* PWA Update Notification */
.pwa-update-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 300px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* PWA Status Indicators */
.pwa-status {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.pwa-status.online {
    background-color: #10b981;
}

.pwa-status.offline {
    background-color: #ef4444;
}

/* PWA Loading Screen */
.pwa-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.pwa-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* PWA Splash Screen */
.pwa-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: fadeOut 0.5s ease 2s forwards;
}

.pwa-splash-logo {
    width: 80px;
    height: 80px;
    background: var(--accent-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

.pwa-splash-title {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.pwa-splash-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* PWA App-like Styles */
.pwa-app {
    min-height: 100vh;
    background: var(--bg-primary);
}

.pwa-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.pwa-content {
    padding: 20px;
    min-height: calc(100vh - 120px);
}

.pwa-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 15px 0;
    text-align: center;
    color: var(--text-secondary);
}

/* PWA Navigation */
.pwa-nav {
    display: flex;
    justify-content: space-around;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.pwa-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s ease;
}

.pwa-nav-item.active {
    color: var(--accent-color);
}

.pwa-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

/* Responsive PWA Styles */
@media (max-width: 768px) {
    .pwa-install-btn {
        bottom: 80px;
        right: 15px;
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .pwa-update-notification {
        right: 15px;
        left: 15px;
        max-width: none;
    }
    
    .pwa-content {
        padding: 15px;
        padding-bottom: 80px;
    }
}

/* PWA Theme Support */
[data-theme="light"] .pwa-install-btn {
    background: linear-gradient(135deg, #00c896, #00b080);
    color: white;
}

[data-theme="dark"] .pwa-install-btn {
    background: linear-gradient(135deg, #00c896, #00b080);
    color: white;
}
