/* PWA Installer Styles */

#pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    z-index: 9999;
    animation: slideIn 0.3s ease-out;
    max-width: 400px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

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

.pwa-banner-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.pwa-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pwa-banner-text strong {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.pwa-banner-text span {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-install-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.pwa-dismiss-button {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.pwa-dismiss-button:hover {
    color: #666;
}

/* Manual Install Instructions Modal */
#pwa-instructions-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pwa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.pwa-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

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

.pwa-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.pwa-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
}

.pwa-modal-close:hover {
    color: #666;
}

.pwa-modal-body {
    padding: 24px;
}

.pwa-manual-instructions h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pwa-manual-instructions ol {
    margin: 0;
    padding-left: 20px;
}

.pwa-manual-instructions li {
    margin-bottom: 12px;
    line-height: 1.5;
    color: #555;
}

.pwa-manual-instructions .share-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #007AFF;
    color: white;
    border-radius: 3px;
    text-align: center;
    line-height: 16px;
    font-size: 10px;
    margin: 0 4px;
}

.pwa-modal-footer {
    padding: 16px 24px 24px;
    text-align: right;
}

.pwa-modal-close-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pwa-modal-close-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 480px) {
    #pwa-install-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .pwa-banner-content {
        padding: 12px;
        gap: 10px;
    }
    
    .pwa-banner-icon {
        width: 36px;
        height: 36px;
    }
    
    .pwa-banner-text strong {
        font-size: 13px;
    }
    
    .pwa-banner-text span {
        font-size: 11px;
    }
    
    .pwa-install-button {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .pwa-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .pwa-modal-header,
    .pwa-modal-body,
    .pwa-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #pwa-install-banner {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .pwa-banner-text strong {
        color: #fff;
    }
    
    .pwa-banner-text span {
        color: #ccc;
    }
    
    .pwa-dismiss-button {
        color: #999;
    }
    
    .pwa-dismiss-button:hover {
        color: #ccc;
    }
    
    .pwa-modal-content {
        background: #1a1a1a;
    }
    
    .pwa-modal-header {
        border-bottom-color: #333;
    }
    
    .pwa-modal-header h2 {
        color: #fff;
    }
    
    .pwa-modal-close {
        color: #999;
    }
    
    .pwa-modal-close:hover {
        color: #ccc;
    }
    
    .pwa-manual-instructions h3 {
        color: #fff;
    }
    
    .pwa-manual-instructions li {
        color: #ccc;
    }
}
