.playlist-container {
	display: flex;
	flex: 1;
	min-width: 0;
	flex-direction: column;
	.save-dialog {
		max-width: 300px;
		.save-buttons {
			display: flex;
			gap: 0.5rem;
			justify-content: end;
		}
	}

	& > .draggable-list {
		flex: 1;
		overflow-y: auto;
		padding: 0.5rem;
		display: flex;
		flex-direction: column;
		gap: 0.25rem;
		contain: strict;
		content-visibility: auto;

		& > .playlist-item {
			padding: 0.5rem;
			background-color: var(--color-c);
			display: flex;
			align-items: center;
			gap: 1.5rem;
			border-width: 0;
			border-color: var(--color-d);

			div {
				display: flex;
				align-items: center;
			}

			span {
				flex-grow: 1;
				text-overflow: ellipsis;
				overflow: hidden;
			}

			&.active {
				background-color: var(--color-c-highlight);
				font-weight: bold;
			}

			&:not(.drop-target-top-border):not(.drop-target-bottom-border):hover {
				background-color: var(--color-c-highlight);
			}
			&.drop-target-top-border,
			&.drop-target-bottom-border {
				border-style: solid;
			}

			&.drop-target-top-border {
				border-top-width: 2px;
			}

			&.drop-target-bottom-border {
				border-bottom-width: 2px;
			}
		}
	}
}

.playlist-header {
	display: flex;
	gap: 1.5rem;
	align-items: center;
	padding: 0.5rem;
	font-weight: bold;
	border-bottom: 1px solid var(--color-c);
	flex-wrap: wrap;

	& > .playlist-header-title {
		display: inherit;
		gap: inherit;
		margin-right: auto;
		min-width: 0;
		& > span {
			text-wrap: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
		}
	}

	& > .button-container {
		display: flex;
		gap: inherit;
		flex-direction: row;
		& > button {
			background: none;
			padding: 0;
			&:hover {
				background: none;
			}
		}
	}
}

.playlist-drag-btn {
	cursor: grab;
	height: 100%;
}

.drop-area-end {
	flex-grow: 1;
	min-height: 2rem;
}

.video-stage {
	position: relative;
	flex: 0 1 auto;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: min(45%, 60vh);
	min-height: 140px;
	border-top: 1px solid var(--color-c);
	background: #000;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;

	& > .video-element {
		display: block;
		width: 100%;
		height: 100%;
		object-fit: contain;
		background: #000;
	}

	& > .video-theater-close {
		position: absolute;
		top: 0.75rem;
		right: 0.75rem;
		z-index: 3;
		padding: 0;
		background: rgba(0, 0, 0, 0.6);
		&:hover {
			background: rgba(0, 0, 0, 0.85);
		}
	}

	&.theater {
		position: fixed;
		inset: 0;
		width: auto;
		height: auto;
		max-height: none;
		aspect-ratio: auto;
		padding: 1rem 1rem 8rem;
		background: rgba(0, 0, 0, 0.96);
		z-index: 30;

		& > .video-element {
			max-width: 100%;
			max-height: 100%;
		}
	}
}
