/* Godar audio player – every colour and size is a variable the Elementor style tab can override. */
.gpm-audio {
	--gpm-a-bg: #fff;
	--gpm-a-border: rgba(0, 0, 0, .09);
	--gpm-a-accent: #1d1d1f;
	--gpm-a-on-accent: #fff;
	--gpm-a-text: #1d1d1f;
	--gpm-a-muted: #8a8a8e;
	--gpm-a-wave: rgba(0, 0, 0, .14);
	--gpm-a-buffer: rgba(0, 0, 0, .26);
	--gpm-a-radius: 16px;

	position: relative;
	box-sizing: border-box;
	width: 100%;
	margin-inline: auto;
	padding: 20px 22px 14px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: var(--gpm-a-bg);
	color: var(--gpm-a-text);
	border: 1px solid var(--gpm-a-border);
	border-radius: var(--gpm-a-radius);
	box-shadow: 0 6px 28px rgba(0, 0, 0, .05);
	font-family: inherit;
	line-height: 1.5;
	-webkit-tap-highlight-color: transparent;
}
.gpm-audio *, .gpm-audio *::before, .gpm-audio *::after { box-sizing: border-box; }
.gpm-audio__el { display: none; }

/* Head */
.gpm-audio__head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.gpm-audio__cover { width: 56px; height: 56px; flex: 0 0 auto; object-fit: cover; border-radius: calc(var(--gpm-a-radius) * .6); }
.gpm-audio__meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.gpm-audio__label { font-size: 12px; color: var(--gpm-a-muted); letter-spacing: .02em; }
.gpm-audio__title { font-size: 17px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Little equaliser that only moves while playing */
.gpm-audio__eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; opacity: 0; transition: opacity .3s; }
.gpm-audio__eq i { width: 3px; height: 30%; background: var(--gpm-a-accent); border-radius: 2px; }
.gpm-audio.is-playing .gpm-audio__eq { opacity: 1; }
.gpm-audio.is-playing .gpm-audio__eq i { animation: gpm-eq 1s ease-in-out infinite; }
.gpm-audio.is-playing .gpm-audio__eq i:nth-child(2) { animation-delay: -.4s; }
.gpm-audio.is-playing .gpm-audio__eq i:nth-child(3) { animation-delay: -.2s; }
.gpm-audio.is-playing .gpm-audio__eq i:nth-child(4) { animation-delay: -.7s; }
@keyframes gpm-eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }

/* Deck: play button + waveform */
.gpm-audio__deck { display: flex; align-items: center; gap: 16px; }
.gpm-audio__play {
	position: relative;
	flex: 0 0 auto;
	width: 54px;
	height: 54px;
	padding: 0;
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: var(--gpm-a-accent);
	color: var(--gpm-a-on-accent);
	cursor: pointer;
	transition: transform .2s cubic-bezier(.3, .7, .4, 1.4), box-shadow .2s;
	box-shadow: 0 6px 16px rgba(0, 0, 0, .16);
}
.gpm-audio__play:hover { transform: scale(1.06); }
.gpm-audio__play:active { transform: scale(.94); }
.gpm-audio__play .gpm-i { width: 22px; height: 22px; }
.gpm-audio__play .gpm-i-play { margin-inline-start: 3px; }
.gpm-audio .gpm-i-pause, .gpm-audio.is-playing .gpm-i-play { display: none; }
.gpm-audio.is-playing .gpm-i-pause { display: block; }
.gpm-audio__spinner {
	position: absolute;
	inset: -4px;
	border-radius: 50%;
	border: 2px solid transparent;
	border-top-color: var(--gpm-a-accent);
	opacity: 0;
	transition: opacity .2s;
}
.gpm-audio.is-waiting .gpm-audio__spinner { opacity: 1; animation: gpm-spin .8s linear infinite; }
@keyframes gpm-spin { to { transform: rotate(360deg); } }

.gpm-audio__track { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gpm-audio__wave {
	position: relative;
	height: 52px;
	cursor: pointer;
	touch-action: none;
	outline: none;
	border-radius: 6px;
}
.gpm-audio__wave:focus-visible { box-shadow: 0 0 0 2px var(--gpm-a-accent); }
.gpm-audio__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.gpm-audio__hover {
	position: absolute;
	top: -2px;
	bottom: -2px;
	left: 0;
	width: 1px;
	background: var(--gpm-a-accent);
	opacity: 0;
	pointer-events: none;
	transition: opacity .15s;
}
.gpm-audio__hover-time {
	position: absolute;
	bottom: calc(100% + 4px);
	left: 50%;
	transform: translateX(-50%);
	padding: 2px 7px;
	font-size: 11px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	color: var(--gpm-a-on-accent);
	background: var(--gpm-a-accent);
	border-radius: 6px;
}
.gpm-audio__wave:hover .gpm-audio__hover, .gpm-audio__wave.is-dragging .gpm-audio__hover { opacity: 1; }

.gpm-audio__times { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--gpm-a-muted); font-variant-numeric: tabular-nums; }
.gpm-audio__resume { font-size: 11px; color: var(--gpm-a-text); background: var(--gpm-a-wave); padding: 1px 8px; border-radius: 99px; cursor: pointer; border: 0; font-family: inherit; }

/* Tools row */
.gpm-audio__tools { display: flex; align-items: center; gap: 4px; padding-top: 10px; border-top: 1px solid var(--gpm-a-border); }
.gpm-audio__spacer { flex: 1 1 auto; }
.gpm-audio__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	margin: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--gpm-a-text);
	font: 600 13px/1 inherit;
	font-family: inherit;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.gpm-audio__btn:hover, .gpm-audio__btn:focus-visible { background: var(--gpm-a-wave); color: var(--gpm-a-text); outline: none; }
.gpm-audio__btn .gpm-i { width: 22px; height: 22px; }
.gpm-audio__speed { min-width: 48px; }

.gpm-audio__vol { display: inline-flex; align-items: center; gap: 4px; }
.gpm-audio .gpm-i-muted, .gpm-audio.is-muted .gpm-i-vol { display: none; }
.gpm-audio.is-muted .gpm-i-muted { display: block; }
.gpm-audio__range {
	-webkit-appearance: none;
	appearance: none;
	width: 84px;
	height: 4px;
	margin: 0;
	border-radius: 4px;
	background: linear-gradient(to right, var(--gpm-a-accent) var(--gpm-vol, 100%), var(--gpm-a-wave) var(--gpm-vol, 100%));
	cursor: pointer;
}
.gpm-audio__range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--gpm-a-accent); border: 0; }
.gpm-audio__range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--gpm-a-accent); border: 0; }

/* Touch devices cannot change media volume from script (iOS), so only the mute button stays. */
@media (hover: none) { .gpm-audio__range { display: none; } }

@media (max-width: 600px) {
	.gpm-audio { padding: 16px 14px 10px; gap: 12px; }
	.gpm-audio__deck { gap: 12px; }
	.gpm-audio__play { width: 46px; height: 46px; }
	.gpm-audio__wave { height: 44px; }
	.gpm-audio__title { font-size: 15px; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
	.gpm-audio *, .gpm-audio { animation: none !important; transition: none !important; }
}

/* Shield from theme resets (Hello Elementor colours every button on hover and focus). */
.gpm-audio [hidden] { display: none !important; }
.gpm-audio button { font-family: inherit; text-transform: none; letter-spacing: normal; line-height: 1; min-height: 0; }
.gpm-audio .gpm-audio__play,
.gpm-audio .gpm-audio__play:hover,
.gpm-audio .gpm-audio__play:focus { background: var(--gpm-a-accent); color: var(--gpm-a-on-accent); border: 0; padding: 0; }
.gpm-audio .gpm-audio__play:focus-visible { outline: 2px solid var(--gpm-a-accent); outline-offset: 3px; }
.gpm-audio .gpm-audio__btn,
.gpm-audio .gpm-audio__btn:focus { background: transparent; color: var(--gpm-a-text); border: 0; }
.gpm-audio .gpm-audio__btn:hover,
.gpm-audio .gpm-audio__btn:focus-visible { background: var(--gpm-a-wave); color: var(--gpm-a-text); }
.gpm-audio .gpm-audio__resume,
.gpm-audio .gpm-audio__resume:hover,
.gpm-audio .gpm-audio__resume:focus { background: var(--gpm-a-wave); color: var(--gpm-a-text); border: 0; padding: 1px 8px; border-radius: 99px; }
.gpm-audio .gpm-audio__range { padding: 0; border: 0; box-shadow: none; }

.gpm-placeholder { padding: 18px; border: 1px dashed #b5b5b5; border-radius: 10px; color: #777; font-size: 13px; text-align: center; }
