@charset "utf-8";

/**
 * AmbientSoundDemo__Inner
 * - AmbientSoundDemo__Control
 * -- AmbientSoundDemo__Panels
 * --- AmbientSoundDemo__Panel
 * ---- AmbientSoundDemo__PanelInner
 * ----- AmbientSoundDemo__PlayPause
 * ----- AmbientSoundDemo__Skip
 * - AmbientSoundDemo__Scenes
 * -- AmbientSoundDemo__Scene
 * - AmbientSoundDemo__Player
 * -- AmbientSoundDemo__Waveform
 * -- AmbientSoundDemo__Music
 * -- AmbientSoundDemo__MusicPlayPause
 * - AmbientSoundDemo__Caption
 */

body.is-lock {
	overscroll-behavior: none;
}
.AmbientSoundDemo {
	--themecolor: #3e59f2;
	position: relative;
	width: min(100%, 1200px);
	direction: ltr;
}
[lang="ar"] .AmbientSoundDemo {
	direction: rtl;
}
.AmbientSoundDemo__Inner {
	z-index: 0;
	position: relative;
	display: grid;
}
.AmbientSoundDemo__Inner > * {
	grid-column: 1;
}
@media (min-width: 992px) {
	.AmbientSoundDemo {
		margin: 0 auto;
	}
	.AmbientSoundDemo__Control {
		grid-row: 1;
	}
	.AmbientSoundDemo__Scenes,
	.AmbientSoundDemo__Player {
		grid-row: 2;
	}
	.AmbientSoundDemo__Caption {
		grid-row: 3;
	}
}
@media (max-width: 991.98px) {
	.AmbientSoundDemo {
		background: #0000004d;
	}
	.AmbientSoundDemo__Inner {
		grid-template-rows: auto repeat(3, auto);
		height: 100vh;
	}
	.AmbientSoundDemo__Scenes {
		z-index: -1;
		grid-row: 1 / 5;
	}
	.AmbientSoundDemo__Player {
		grid-row: 2;
		align-self: end;
	}
	.AmbientSoundDemo__Control {
		z-index: 2;
		grid-row: 3;
	}
	.AmbientSoundDemo__Caption {
		grid-row: 4;
	}
}

/** Button common */
:where(.AmbientSoundDemo) button {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: fit-content;
	border: 0;
	padding: 0;
	background: none;
}
@media (hover) {
	:where(.AmbientSoundDemo) button {
		cursor: pointer; 
	}
}
@keyframes iconAct {
	from, to { transform: none; }
	25% { transform: scale(.8); }
	50% { transform: scale(1.1); }
	75% { transform: scale(.98); }
}
@keyframes balloonAct {
	from, to { transform: none; }
	25% { transform: scale(.8) rotate(-8deg); }
	50% { transform: scale(1.1) rotate(2deg); }
	75% { transform: scale(.98) rotate(-2deg); }
}

/** Control */
@media (max-width: 991.98px) {
	.AmbientSoundDemo__Control {
		overflow: auto;
		width: 100%;
		padding-bottom: 12px;
	}
	.AmbientSoundDemo__Control {
		align-self: end;
	}
	.AmbientSoundDemo__Control {
		overflow: auto;
		scrollbar-width: thin;
		scrollbar-color: var(--themecolor) #ccc;
	}
	.AmbientSoundDemo__Control::-webkit-scrollbar {
		width: 6px;
		height: 6px;
	}
	.AmbientSoundDemo__Control::-webkit-scrollbar-thumb {
		border-radius: 6px;
		background: var(--themecolor);
	}
	.AmbientSoundDemo__Control::-webkit-scrollbar-track {
		border-radius: 6px;
		background: #ccc;
	}
	.AmbientSoundDemo__Control::-webkit-scrollbar-button {
		display: none;
	}
	.AmbientSoundDemo__Control::-webkit-scrollbar-corner {
		display: none;
	}
}

/** Panels */
.AmbientSoundDemo__Panels {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: .8em;
	margin: 0;
	padding: 0;
	list-style: none;
}
.AmbientSoundDemo__PanelInner {
	display: grid;
	align-content: start;
}
@media (min-width: 992px) {
	.AmbientSoundDemo__PanelInner {
		row-gap: .5em;
	}
}
@media (max-width: 991.98px) {
	.AmbientSoundDemo__Panel:first-child {
		padding-inline-start: 1em;
	}
	.AmbientSoundDemo__Panel:last-child {
		padding-inline-end: 1em;
	}
	.AmbientSoundDemo__Panels {
		height: min(33svh, 230px);
	}
	.AmbientSoundDemo__PanelInner {
		box-sizing: border-box;
		width: 100%;
		min-width: 270px;
		height: 100%;
		padding: 29px 32px;
		border: 1px solid #707070;
		border-radius: 10px;
		background: white;
	}
}

/** Player */
.AmbientSoundDemo__Skip,
.AmbientSoundDemo__PlayPause {
	display: grid;
	grid-template-columns: 30px 1fr;
	column-gap: .75rem;
	text-align: start;
}
.AmbientSoundDemo__Icon {
	grid-area: 1 / 1;
}
.AmbientSoundDemo__Icon[aria-hidden="true"] {
	visibility: hidden;
}
.AmbientSoundDemo__PlayPauseLabel {
	grid-area: 1 / 2;
	padding-top: .125em;
	color: #2f353d;
	font: 500 normal 1.125rem / 1.46667 "SST W01 Roman", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.AmbientSoundDemo__Skip:not(.is-active) {
	pointer-events: none;
}
.AmbientSoundDemo__SkipLabel {
	grid-area: 1 / 2;
	padding-top: .25em;
	color: #6b6b7b;
	font: 400 normal .9375rem / 1.46667 "SST W01 Roman", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.AmbientSoundDemo__Skip .AmbientSoundDemo__Icon,
.AmbientSoundDemo__Skip.is-active .-off,
.AmbientSoundDemo__Skip:not(.is-active) .-on {
	visibility: hidden;
}
.AmbientSoundDemo.is-play .AmbientSoundDemo__Skip.is-active .AmbientSoundDemo__Icon[aria-hidden="false"] {
	visibility: visible;
}
@media (max-width: 991.98px) {
	.AmbientSoundDemo__PlayPause {
		min-height: 4em;
	}
	.AmbientSoundDemo__SkipLabel {
		font-size: .75rem;
	}
}
/* motion */
.AmbientSoundDemo__PlayPause.is-anim .AmbientSoundDemo__Icon,
.AmbientSoundDemo__Skip.is-anim .AmbientSoundDemo__Icon {
	animation: iconAct .3s both;
}

/** Scenes */
.AmbientSoundDemo__Scenes {
	pointer-events: none;
	display: grid;
	margin: 0;
}
.AmbientSoundDemo__Scene {
	grid-area: 1 / 1;
	transition: opacity .3s;
}
.AmbientSoundDemo__Scene:not(.is-active) {
	opacity: 0;
}
.AmbientSoundDemo__Scene[data-scene="default"] {
	opacity: 1;
}
.AmbientSoundDemo__Scene img {
	width: 100%;
	height: auto;
	vertical-align: middle;
}
@media (min-width: 992px) {
	.AmbientSoundDemo__Scenes {
		margin-top: 30px;
	}
}
@media (max-width: 991.98px) {
	.AmbientSoundDemo__Scenes {
		height: fit-content;
		max-height: 100vh;
		mask: linear-gradient(to bottom, #000 80%, #0005 92%, #0000);
	}
}

/** Player */
.AmbientSoundDemo__Player {
	z-index: 1;
	display: grid;
	grid-template-columns: 1fr 104px;
	align-items: center;
	position: relative;
}
.AmbientSoundDemo__Player::before {
	content: "";
	z-index: -2;
	position: absolute;
	inset: -24px 0 0;
	background: linear-gradient(to top, #0006 60%, #0003 80%, #0000);
}
@media (min-width: 992px) {
	.AmbientSoundDemo__Player {
		align-self: end;
	}
}
@media (max-width: 991.98px) {
	.AmbientSoundDemo__Player {
		grid-template-columns: 1fr 77px;
	}
	.AmbientSoundDemo__Player::before {
		bottom: -80px;
		background: linear-gradient(to top, #0000, #0006 25%, #0006 75%, #0000);
	}
}
.AmbientSoundDemo__Waveform {
	grid-area: 1 / 1;
	justify-self: end;
	position: relative;
	width: calc(100% - 1em);
	height: 64px;
	margin-bottom: -8px;
}
.AmbientSoundDemo__Waveform .progress {
	--seek: 0;
	--progress: 0;
	display: grid;
}
.AmbientSoundDemo__Waveform canvas {
	grid-area: 1 / 1;
	width: 100%;
	height: auto;
	transform-origin: center;
	transition: transform .3s;
}
.AmbientSoundDemo__Waveform canvas.bar,
.AmbientSoundDemo__Waveform canvas.seek {
	clip-path: inset(0 calc(100% - var(--progress) * 100%) 0 0);
}
.AmbientSoundDemo__Waveform .progress.is-seek canvas.seek {
	clip-path: inset(0 calc(100% - var(--seek) * 100%) 0 0);
}
.AmbientSoundDemo__Waveform canvas:not(.is-active) {
	pointer-events: none;
	transform: scaleY(0);
}
.AmbientSoundDemo:not(.is-play) .AmbientSoundDemo__Waveform canvas[data-sound="ambient"] {
	transform: none;
}

.AmbientSoundDemo__Balloon {
	display: block;
	position: absolute;
	bottom: 100%;
	left: calc(100% * var(--pos));
	padding: .4em .8em;
	color: white;
	font-size: .625rem;
	line-height: 1.25;
	background: var(--themecolor);
	transform-origin: left calc(100% + 1.5em);
}
.AmbientSoundDemo__Balloon::after {
	content: "";
	position: absolute;
	top: calc(100% - 1px);
	left: 0;
	width: .6em;
	height: 1.5em;
	background: inherit;
	clip-path: polygon(0 0, 100% 0, 0 100%);
}
/* motion */
.AmbientSoundDemo__Balloon:not(.is-active) {
	pointer-events: none;
	opacity: 0;
	scale: .75;
	transition: scale .1s, opacity .1s;
}
.AmbientSoundDemo__Balloon.is-anim {
	animation: balloonAct .3s both;
}

.AmbientSoundDemo__Timeline {
	--progress: 0;
	grid-area: 2 / 1;
	justify-self: end;
	width: calc(100% - 1em);
	height: 40px;
}
.AmbientSoundDemo__Timeline .progress {
	position: relative;
	width: calc(100% - 15px);
	height: 100%;
	margin-inline: auto;
}
.AmbientSoundDemo__Timeline .bar,
.AmbientSoundDemo__Timeline .seek,
.AmbientSoundDemo__Timeline .progress::before {
	position: absolute;
	top: calc(50% - .5px);
	left: -7.5px;
	width: calc(100% + 15px);
	height: 1px;
}
.AmbientSoundDemo__Timeline .bar,
.AmbientSoundDemo__Timeline .seek {
	background: linear-gradient(to right, #663dff, #8422ff 28%, #a0f 63%, #c49);
	clip-path: inset(0 calc(100% - var(--progress) * 100%) 0 0);
}
.AmbientSoundDemo__Timeline.is-seek .bar {
	opacity: .6;
}
.AmbientSoundDemo__Timeline .seek {
	opacity: 0;
}
.AmbientSoundDemo__Timeline.is-seek .seek {
	opacity: .4;
	clip-path: inset(0 calc(100% - var(--seek) * 100%) 0 0);
}
.AmbientSoundDemo__Timeline .progress::before {
	content: "";
	background: #707070;
}
.AmbientSoundDemo__Timeline .knob {
	position: absolute;
	top: calc(50% - 7.5px);
	left: calc(var(--progress) * 100% - 7.5px);
	width: 15px;
	height: 15px;
	border-radius: 8px;
	background: white;
}
@media (hover) {
	.AmbientSoundDemo__Timeline .knob {
		cursor: pointer;
	}
}
.AmbientSoundDemo__MusicPlayPause {
	grid-area: 1 / 2 / 3 / 3;
	justify-self: center;
	display: grid;
	justify-items: center;
	align-content: center;
	row-gap: .25em;
	color: white;
	fill: currentcolor;
	font: 400 normal .75rem / 1.16667 "SST W01 Roman", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.AmbientSoundDemo__MusicPlayPauseLabel {
	grid-area: 2 / 1;
}
.AmbientSoundDemo__MusicPlayPause.is-active .-off,
.AmbientSoundDemo__MusicPlayPause:not(.is-active) .-on {
	visibility: hidden;
	
}
/* motion */
.AmbientSoundDemo__MusicPlayPause.is-anim .AmbientSoundDemo__Icon {
	animation: iconAct .3s both;
}

/** Caption */
.AmbientSoundDemo__Caption {
	justify-self: center;
	padding-inline: 1em;
	color: #6b6b7b;
	font: 400 normal .9375rem / 1.5 "SST W01 Roman", "Helvetica Neue", Helvetica, Arial, sans-serif;
	text-align: center;
}
@media (min-width: 992px) {
	.AmbientSoundDemo__Caption {
		margin: 30px 0 0;
	}
}
@media (max-width: 991.98px) {
	.AmbientSoundDemo__Caption {
		margin: 1em 0;
		color: white;
		font-size: .75rem;
	}
}

/** Loader */
.AmbientSoundDemo__Loader {
	display: grid;
	place-items: center;
	z-index: 1;
	position: absolute;
	inset: 0;
	background: white;
}
.AmbientSoundDemo__Loader > svg {
	width: 30px;
	height: auto;
	fill: none;
	stroke: var(--themecolor);
	stroke-width: 8;
	stroke-linecap: round;
	stroke-dasharray: 230 230;
	animation: loader 1.4s infinite cubic-bezier(.4,0,.3,1), loading 1.2s infinite linear;
}
.AmbientSoundDemo__Loader.is-loaded {
	opacity: 0;
	transition: opacity .4s;
	pointer-events: none;
}
@keyframes loader {
	from { stroke-dashoffset: 230; }
	to { stroke-dashoffset: -230; }
}
@keyframes loading {
	from { transform: none; }
	to { transform: rotate(360deg); }
}

/** Utility */
.AmbientSoundDemo__visuallyhidden {
	position: absolute;
	inset: 49%;
	width: 1px;
	height: 1px;
	margin: -1px;
	clip: rect(0,0,0,0);
	visibility: hidden;
}