﻿/*********************************************************************************************************************************\
Live updates: how a module shows other users' changes. Both layouts link it after the modules' stylesheets. Colours are the
theme's --portal-live-* and --portal-button-* variables only (portal-theme.css); LiveUpdateStyleTests pins this file.

	* The refresh bar (LiveRefreshBar.vue): a structural change, too many changed items, or a resync while the user edits.
	* The brief highlight (live-highlight.ts) on an item patched in place: the highlight colours fading out over the 2 seconds
	  the class stays; held still, without the fade, when the user prefers reduced motion.
\*********************************************************************************************************************************/
.PortalLiveRefreshBar {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 8px;
	padding: 4px 8px;
	border: 1px solid var(--portal-live-bar-border);
	margin-bottom: 4px;
	background-color: var(--portal-live-bar-background);
	color: var(--portal-live-bar-text);
}

.PortalLiveRefreshBar .PortalLiveRefreshBarText {
	flex: 1 1 auto;
}

.PortalLiveRefreshBar .PortalLiveRefreshButton,
.PortalLiveRefreshBar .PortalLiveRefreshDismiss {
	border: 1px solid var(--portal-live-bar-border);
	padding: 2px 8px;
	background-color: var(--portal-button-background);
	color: var(--portal-button-text);
	cursor: pointer;
}

.PortalLiveRefreshBar .PortalLiveRefreshButton:hover,
.PortalLiveRefreshBar .PortalLiveRefreshDismiss:hover {
	background-color: var(--portal-button-hover-background);
}

.PortalLiveChanged {
	animation: PortalLiveChangedFade 2s ease-out;
}

@keyframes PortalLiveChangedFade {
	from {
		background-color: var(--portal-live-highlight-background);
		outline: 1px solid var(--portal-live-highlight-border);
	}

	to {
		background-color: transparent;
		outline: 1px solid transparent;
	}
}

@media (prefers-reduced-motion: reduce) {
	.PortalLiveChanged {
		animation: none;
		background-color: var(--portal-live-highlight-background);
		outline: 1px solid var(--portal-live-highlight-border);
	}
}
