/**
 * Offline Sync Status Indicator Styles
 */

/* Connection Status Badge (Top-Left) */
#connection-status-badge {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    font-size: 16px;
}

#connection-status-badge:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Pulse animation for offline status */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Pending count badge */
#pending-count-left {
    border: 2px solid white;
    font-size: 12px;
    font-weight: bold;
}

/* Hover effect for sync trigger */
#connection-status-badge:hover {
    cursor: pointer;
}

/* Sync Notification */
.sync-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9998;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.sync-notification.show {
    transform: translateX(0);
}

.sync-notification-content {
    background: #28a745;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-weight: 600;
    min-width: 300px;
}

.sync-notification-content i {
    margin-right: 10px;
    font-size: 18px;
}

/* Sync Settings Panel */
.sync-settings-panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.sync-status-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
}

.sync-status-box h5 {
    margin: 0 0 10px 0;
    color: #495057;
}

.sync-status-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.sync-status-item:last-child {
    border-bottom: none;
}

.sync-status-label {
    color: #6c757d;
    font-weight: 500;
}

.sync-status-value {
    color: #495057;
    font-weight: 600;
}

/* Sync Button */
.btn-sync {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-sync:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.btn-sync.syncing {
    background: #17a2b8;
}

.btn-sync.syncing:after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Connection Status in Sidebar/Header */
.sidebar .connection-indicator,
.header .connection-indicator {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.sidebar .connection-indicator.online,
.header .connection-indicator.online {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.sidebar .connection-indicator.offline,
.header .connection-indicator.offline {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    animation: pulse 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    #connection-status {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .sync-notification {
        top: 60px;
        right: 10px;
    }
    
    .sync-notification-content {
        min-width: 250px;
        padding: 12px 15px;
    }
}

