/* Background Sync Styles */

.periodic-sync-prompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}

.periodic-sync-prompt-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.periodic-sync-prompt-content h3 {
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.periodic-sync-prompt-content p {
    margin-bottom: 25px;
    color: #666;
    line-height: 1.5;
}

.periodic-sync-prompt-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.periodic-sync-prompt-buttons .btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 80px;
}

.periodic-sync-prompt-buttons .btn-primary {
    background: #007bff;
    border: 1px solid #007bff;
    color: white;
}

.periodic-sync-prompt-buttons .btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

.periodic-sync-prompt-buttons .btn-secondary {
    background: #6c757d;
    border: 1px solid #6c757d;
    color: white;
}

.periodic-sync-prompt-buttons .btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
    transform: translateY(-1px);
}

/* Background sync status indicator */
.background-sync-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    z-index: 1000;
    display: none;
    animation: slideInRight 0.3s ease-out;
}

.background-sync-status.active {
    display: block;
}

.background-sync-status.offline {
    background: rgba(220, 53, 69, 0.9);
}

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

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

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

/* Mobile responsive */
@media (max-width: 480px) {
    .periodic-sync-prompt-content {
        margin: 20px;
        padding: 25px 20px;
    }
    
    .periodic-sync-prompt-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .periodic-sync-prompt-buttons .btn {
        width: 100%;
    }
    
    .background-sync-status {
        bottom: 10px;
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .periodic-sync-prompt-content {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .periodic-sync-prompt-content h3 {
        color: #f7fafc;
    }
    
    .periodic-sync-prompt-content p {
        color: #cbd5e0;
    }
}

/* Loading indicator for background sync */
.background-sync-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 