/* SPDX-License-Identifier: AGPL-3.0-or-later */ .container { position: relative; width: 100%; height: 1.25rem; display: flex; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; } .track { position: absolute; left: 0; right: 0; top: 50%; height: 0.25rem; background-color: var(--background-modifier-accent); border-radius: var(--radius-full); overflow: hidden; transform: translateY(-50%); transition: height 120ms ease; } .buffered { position: absolute; left: 0; top: 0; height: 100%; background-color: var(--background-modifier-accent-focus); border-radius: var(--radius-full); will-change: width; } .fill { position: absolute; left: 0; top: 0; height: 100%; background-color: var(--brand-primary-light); border-radius: var(--radius-full); will-change: width; } .thumb { position: absolute; top: 50%; width: 0.75rem; height: 0.75rem; background-color: var(--brand-primary-light); border-radius: 50%; transform: translate(-50%, -50%) scale(0.86); opacity: 0; transition: opacity 150ms ease, transform 150ms ease; box-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.3); pointer-events: none; will-change: left; } .container:not(.isDragging) .buffered { transition: width 150ms ease; } .container:not(.isDragging) .fill { transition: width 100ms linear; } .container:hover .thumb, .container:focus-within .thumb, .isDragging .thumb { opacity: 1; transform: translate(-50%, -50%) scale(1); } .container:hover .track, .container:focus-within .track, .isDragging .track { height: 0.375rem; } .compact:hover .thumb, .compact:focus-within .thumb, .compact.isDragging .thumb { transform: translate(-50%, -50%); } .tooltipAnchor { position: absolute; top: 50%; width: 0; height: 0; transform: translate(-50%, -50%); pointer-events: none; } .tooltipPreviewContent { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; font-family: var(--font-mono); font-size: 0.75rem; white-space: nowrap; } .tooltipThumbnail { width: var(--media-progress-tooltip-thumbnail-width, 9rem); max-width: min(var(--media-progress-tooltip-thumbnail-width, 9rem), calc(100vw - 2rem)); overflow: hidden; background-color: #000; border-radius: var(--radius-sm, 0.25rem); } .tooltipTime { line-height: 1rem; } .compact { height: 0.75rem; } .compact .track { height: 0.1875rem; } :global(.theme-light) .fill, :global(.theme-light) .thumb { background-color: var(--brand-primary); } .compact .thumb { width: 0.625rem; height: 0.625rem; transform: translate(-50%, -50%); } .compact:hover .track, .compact:focus-within .track, .compact.isDragging .track { height: 0.3125rem; } @media (hover: none) { .thumb { opacity: 1; } }