/* Offline Mode Support Styles */

.connection-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 20;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.connection-indicator.online {
    background: #28a745;
    color: white;
}

.connection-indicator.offline {
    background: #dc3545;
    color: white;
    animation: offlinePulse 2s infinite;
}

.connection-indicator.slow-connection {
    background: #ffc107;
    color: #212529;
}

@keyframes offlinePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Offline notification styles */
.offline-notification {
    position: fixed;
    top: 60px;
    right: 10px;
    z-index: 25;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 12px 16px;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

.offline-notification.success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.offline-notification.warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

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

/* Sync progress indicator */
.sync-progress {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 30;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 250px;
}

.sync-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.sync-progress-fill {
    height: 100%;
    background: #007bff;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Offline queue indicator */
.offline-queue-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 20;
    background: #6c757d;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.offline-queue-indicator:hover {
    background: #5a6268;
    transform: scale(1.05);
}

.offline-queue-indicator.has-items {
    background: #ffc107;
    color: #212529;
    animation: queuePulse 2s infinite;
}

@keyframes queuePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}