/* Sync Indicator Styles */
#sync-indicator-container {
    position: fixed;
    top: 60px;
    right: 16px;
    z-index: 900;
}

.sync-indicator {
    position: relative;
}

.sync-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--mobile-surface);
    border: 1px solid var(--mobile-border);
    border-radius: 24px;
    color: var(--mobile-text-primary);
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.sync-button:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sync-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

/* Status colors */
.sync-indicator.idle .sync-icon {
    color: var(--mobile-text-secondary);
}

.sync-indicator.syncing .sync-icon {
    color: var(--mobile-primary);
}

.sync-indicator.success .sync-icon {
    color: #10B981;
}

.sync-indicator.error .sync-icon {
    color: #EF4444;
}

.sync-indicator.conflict .sync-icon {
    color: #F59E0B;
}

/* Rotating animation */
.sync-indicator.syncing .sync-icon,
.rotating {
    animation: rotate 1s linear infinite;
}

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

/* Dropdown */
.sync-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background-color: var(--mobile-surface);
    border: 1px solid var(--mobile-border);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.sync-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sync-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--mobile-border);
}

.sync-dropdown-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--mobile-text-primary);
}

.sync-dropdown-content {
    padding: 16px;
}

.sync-status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}

.sync-status-item:not(:last-child) {
    border-bottom: 1px solid var(--mobile-border);
}

.sync-status-item i {
    font-size: 20px;
    color: var(--mobile-text-secondary);
}

.sync-status-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sync-status-label {
    font-size: 14px;
    color: var(--mobile-text-secondary);
}

.sync-status-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--mobile-text-primary);
}

.sync-dropdown-actions {
    padding: 16px;
    border-top: 1px solid var(--mobile-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sync-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--mobile-border);
    background-color: transparent;
    color: var(--mobile-text-primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sync-action-btn:hover {
    background-color: var(--mobile-background);
}

.sync-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sync-action-btn i {
    font-size: 18px;
}

/* Notifications */
.sync-notification {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--mobile-surface);
    color: var(--mobile-text-primary);
    padding: 12px 24px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
}

.sync-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.sync-notification i {
    font-size: 20px;
}

.sync-notification.success {
    background-color: #10B981;
    color: white;
}

.sync-notification.error {
    background-color: #EF4444;
    color: white;
}

.sync-notification.warning {
    background-color: #F59E0B;
    color: white;
}

.sync-notification.info {
    background-color: var(--mobile-primary);
    color: white;
}

/* Dark theme adjustments */
[data-theme="dark"] .sync-button {
    background-color: var(--mobile-surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .sync-dropdown {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Mobile adjustments */
@media (max-width: 400px) {
    #sync-indicator-container {
        right: 8px;
    }
    
    .sync-dropdown {
        width: calc(100vw - 32px);
        right: -8px;
    }
}