.waveform {
    padding: 0 0.25rem;
    user-select: none;
}

.waveform-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap-reverse;
    gap: 0.75rem;
    padding: 0.1rem 0.25rem;
    margin-bottom: 2px;
    border: 0.5px solid var(--border-color);
    border-radius: 0.5rem;
}

.waveform-media-controls,
.waveform-view-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.waveform-filename {
    font-size: 0.75rem;
}

.waveform-control {
    width: 24px;
    height: 24px;
    padding: 4px;
    border: none;
    border-radius: 0.25rem;
    background-color: transparent;
    color: var(--control-color);
    cursor: pointer;
}

.waveform-control:hover {
    background-color: var(--hover-color);
}

.waveform-control:active {
    background-color: var(--active-color);
}

.waveform-control > svg {
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 7.5rem;
    stroke-linecap: square;
}

.waveform-control > svg.pause {
    stroke-width: 11.5rem;
}

.waveform-scroll {
    overflow-x: scroll;
    overflow-y: hidden;
    width: 100%;
    position: relative;
}

.waveform-wrapper {
    position: relative;
    overflow: visible;
}

.waveform-wrapper canvas {
    position: absolute;
    image-rendering: pixelated;
}

.waveform-canvases {
    min-height: 80px;
}

.waveform-canvases > div {
    position: relative;
}

.waveform-progress {
    position: absolute;
    top: 0;
    height: 100%;
    overflow: hidden;
}

.waveform-progress > div {
    position: relative;
}

.waveform-cursor {
    position: absolute;
    top: 0;
    height: 80px;
    background-color: var(--cursor-color);
    width: 0.5px;
}

.waveform-info {
    display: flex;
    gap: 1.25rem;
    font-size: 0.675rem;
    padding: 0.15rem 0;
}

.waveform-regions-container {
    position: relative;
    height: 78px;
    margin-top: 2px;
    border: 0.5px solid var(--region-border-color);
    outline: 0.5px solid var(--outline-color);
}

.waveform-drag-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
}

.waveform-region {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 0.5px solid var(--region-border-color);
}

.waveform-region-content {
    padding-right: 5%;
    padding-left: 5%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.7rem;
    color: var(--region-text-color);
}

.waveform-marker {
    cursor: ew-resize;
    z-index: 5;
    border-right: 0;
    width: 0;
}

.waveform-marker > div {
    position: absolute;
    height: 100%;
    width: 8px;
    left: -4.5px;
}

.waveform-channel {
    height: 25%;
    top: 0%;
}

.waveform-channel-0 {
    background-color: transparent;
}

.waveform-channel-0.background {
    background-color: var(--channel-0);
}

.waveform-channel-1 {
    background-color: var(--channel-1);
    top: 25%;
}

.waveform-channel-2 {
    background-color: var(--channel-2);
    top: 50%;
}

.waveform-channel-3 {
    background-color: var(--channel-3);
    top: 75%;
}

.waveform-channel-4 {
    background-color: var(--channel-4);
    height: 100%;
    pointer-events: none;
    border-left: 0;
}

.waveform-timeline {
    height: 12px;
    overflow: hidden;
    font-size: 9px;
    white-space: nowrap;
    position: relative;
    margin-top: 2px;
}

.waveform-timeline-notch {
    height: 50%;
    bottom: 0;
    overflow: visible;
    border-left: 1px solid currentColor;
    opacity: 0.5;
    position: absolute;
}
