/* PWA Installation UI Styles */

/* Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.3);
    z-index: 1000;
    max-width: 400px;
    width: calc(100% - 40px);
    animation: slideUp 0.3s ease-out;
}

.install-banner-content {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
}

.install-banner-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.install-banner-text {
    flex: 1;
    min-width: 0;
}

.install-banner-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.install-banner-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
}

.install-banner-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.install-banner-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.install-banner-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.install-banner-close:hover {
    opacity: 1;
}

/* Sidebar Install Button */
.pwa-install-item .sidebar-link {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white !important;
    margin: 8px 0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.pwa-install-item .sidebar-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.pwa-install-item .sidebar-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

/* Mobile Install Modal */
.pwa-mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.mobile-modal-content {
    background: #1a1a1a;
    border-radius: 20px;
    max-width: 400px;
    width: calc(100% - 40px);
    animation: slideIn 0.3s ease-out;
}

.mobile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #333;
}

.mobile-modal-header h3 {
    color: #ff6b35;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-modal-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-modal-close:hover {
    background: #333;
    color: white;
}

.mobile-modal-body {
    padding: 24px;
    color: white;
    text-align: center;
}

.mobile-install-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.mobile-modal-body p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #e0e0e0;
}

/* Toast Notifications */
.pwa-toast {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1500;
}

.pwa-toast.show {
    transform: translateX(0);
}

.pwa-toast-success {
    border-color: #28a745;
}

.pwa-toast-info {
    border-color: #17a2b8;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-text {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.4;
}

.toast-btn {
    background: #ff6b35;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toast-btn:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 100%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .pwa-install-banner {
        bottom: 20px;
        left: 20px;
        right: 20px;
        transform: none;
        max-width: none;
        width: auto;
    }
    
    .install-banner-content {
        padding: 12px 16px;
        gap: 12px;
    }
    
    .install-banner-title {
        font-size: 0.875rem;
    }
    
    .install-banner-subtitle {
        font-size: 0.75rem;
    }
    
    .pwa-toast {
        top: 20px;
        right: 20px;
        left: 20px;
        min-width: auto;
        max-width: none;
    }
    
    .mobile-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .mobile-modal-content {
        background: #1a1a1a;
        border: 1px solid #333;
    }
    
    .pwa-toast {
        background: #1a1a1a;
        border-color: #333;
    }
}

/* PWA detection - hide install prompts when running as installed app */
@media (display-mode: standalone) {
    .pwa-install-banner,
    .pwa-install-item {
        display: none !important;
    }
}