/* Directory Audio List — frontend styles */

.rmal-list {
	width: 100%;
	background-color: #2E0B18;
	border: 1px solid rgba(225,162,44,0.5);
	border-radius: 10px;
	overflow: hidden;
}

.rmal-row {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 16px 20px;
	border-bottom: 1px solid rgba(225,162,44,0.35);
	transition: background-color .2s ease;
}

.rmal-row:last-child {
	border-bottom: none;
}

.rmal-row.rmal-clickable {
	cursor: pointer;
}

.rmal-row.rmal-clickable:hover,
.rmal-row.rmal-clickable:focus-visible {
	background-color: rgba(225,162,44,0.06);
	outline: none;
}

.rmal-row.rmal-playing {
	background-color: rgba(225,162,44,0.1);
}

.rmal-row.rmal-locked {
	cursor: default;
}

.rmal-number {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #E1A22C;
	color: #E1A22C;
	font-size: 13px;
	font-weight: 700;
}

.rmal-thumb {
	flex-shrink: 0;
	display: block;
	width: 96px;
	height: 64px;
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid rgba(225,162,44,0.5);
}

.rmal-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.rmal-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1 1 auto;
	min-width: 0;
}

.rmal-title {
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	letter-spacing: .3px;
}

.rmal-subtitle {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	color: #E1A22C;
	text-transform: uppercase;
}

.rmal-meta {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	gap: 16px;
}

.rmal-duration {
	font-size: 13px;
	color: #F5EDE0;
	white-space: nowrap;
	min-width: 40px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.rmal-play {
	position: relative;
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #fff;
	color: #fff;
}

.rmal-icon {
	width: 16px;
	height: 16px;
}

.rmal-icon[hidden] {
	display: none !important;
}

.rmal-icon-lock {
	width: 18px;
	height: 18px;
}

.rmal-row.rmal-playing .rmal-play {
	color: #E1A22C;
	border-color: #E1A22C;
}

.rmal-row.rmal-locked .rmal-play {
	color: rgba(255,255,255,0.3);
	border-color: rgba(255,255,255,0.3);
}

/* Animated up/down bars — visible only while a row is playing */
.rmal-eq {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 3px;
	height: 22px;
}

.rmal-row.rmal-playing .rmal-eq {
	display: inline-flex;
}

.rmal-eq i {
	display: block;
	width: 3px;
	height: 100%;
	border-radius: 2px;
	background-color: #E1A22C;
	transform: scaleY(.25);
	animation: rmal-bounce 0.9s ease-in-out infinite;
}

.rmal-eq i:nth-child(1) { animation-duration: .8s;  animation-delay: -.2s; }
.rmal-eq i:nth-child(2) { animation-duration: 1.1s; animation-delay: -.6s; }
.rmal-eq i:nth-child(3) { animation-duration: .7s;  animation-delay: -.1s; }
.rmal-eq i:nth-child(4) { animation-duration: 1s;   animation-delay: -.8s; }
.rmal-eq i:nth-child(5) { animation-duration: .85s; animation-delay: -.4s; }

@keyframes rmal-bounce {
	0%, 100% { transform: scaleY(.2); }
	50%      { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
	.rmal-eq i { animation: none; transform: scaleY(.6); }
}

/* Loading spinner ring around the play button while buffering */
.rmal-row.rmal-loading .rmal-play::after {
	content: '';
	position: absolute;
	inset: -6px;
	border-radius: 50%;
	border: 2px solid transparent;
	border-top-color: #E1A22C;
	border-right-color: rgba(225,162,44,0.45);
	animation: rmal-spin .8s linear infinite;
	pointer-events: none;
}

@keyframes rmal-spin {
	to { transform: rotate(360deg); }
}

/* Small progress ring under the thumbnail while a row is playing */
.rmal-row.rmal-playing .rmal-thumb {
	box-shadow: 0 0 0 2px #E1A22C;
}


/* Progress bar (shown on the active row, playing or paused) */
.rmal-row {
	flex-wrap: wrap;
}

.rmal-progress {
	display: none;
	align-items: center;
	gap: 10px;
	flex: 0 0 100%;
	margin-top: 4px;
}

.rmal-row.rmal-active .rmal-progress {
	display: flex;
}

.rmal-track {
	position: relative;
	flex: 1 1 auto;
	height: 4px;
	border-radius: 4px;
	background: rgba(255,255,255,0.16);
	cursor: pointer;
}

/* bigger invisible touch area for fingers */
.rmal-track::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: -10px;
	bottom: -10px;
}

.rmal-fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 4px;
	background: linear-gradient(90deg, #E1A22C, #F6CC74);
	transition: width .25s linear;
}

.rmal-ptime {
	display: none;
	flex-shrink: 0;
	font-size: 11px;
	color: #F5EDE0;
	font-variant-numeric: tabular-nums;
	letter-spacing: .3px;
}

.rmal-row {
	-webkit-tap-highlight-color: transparent;
}

/* Playing: soft gold edge + glowing play button */
.rmal-row.rmal-playing {
	box-shadow: inset 3px 0 0 #E1A22C;
}

.rmal-row.rmal-playing .rmal-play {
	box-shadow: 0 0 0 4px rgba(225,162,44,0.18), 0 0 14px rgba(225,162,44,0.45);
}

.rmal-play {
	transition: box-shadow .25s ease, color .2s ease, border-color .2s ease, transform .15s ease;
}

.rmal-row.rmal-clickable:active .rmal-play {
	transform: scale(.92);
}

/* =========================================================
 * MOBILE LAYOUT
 *  [ thumb (+number badge) ] [ title / chapter ] [ play ]
 *  [ ------------- progress + time ------------------- ]
 * !important is used on purpose: Elementor prints its default
 * sizes (thumb 96x64, padding 16/20 ...) for every screen size.
 * =======================================================*/
@media (max-width: 600px) {
	.rmal-list {
		border-radius: 16px;
	}

	.rmal-row {
		display: grid !important;
		grid-template-columns: 76px minmax(0, 1fr) 44px;
		grid-template-rows: auto auto;
		column-gap: 14px;
		row-gap: 0;
		align-items: center;
		padding: 16px 14px !important;
	}

	/* thumbnail */
	.rmal-thumb {
		grid-column: 1;
		grid-row: 1;
		width: 76px !important;
		height: 76px !important;
		border-radius: 14px !important;
		box-shadow: 0 6px 16px rgba(0,0,0,0.4);
	}

	/* number badge sits on the thumbnail's top-left corner */
	.rmal-number {
		grid-column: 1;
		grid-row: 1;
		justify-self: start;
		align-self: start;
		z-index: 2;
		width: 24px !important;
		height: 24px !important;
		margin: -8px 0 0 -8px;
		font-size: 10px !important;
		background-color: #2E0B18;
		box-shadow: 0 2px 6px rgba(0,0,0,0.5);
	}

	/* text */
	.rmal-text {
		grid-column: 2;
		grid-row: 1;
		gap: 6px;
	}
	.rmal-title {
		font-size: 15px;
		line-height: 1.3;
	}
	.rmal-subtitle {
		font-size: 10px;
		letter-spacing: 1.3px;
	}

	/* meta wrapper dissolves so its children join the grid */
	.rmal-meta {
		display: contents;
	}
	.rmal-duration {
		display: none;
	}

	/* play button */
	.rmal-play {
		grid-column: 3;
		grid-row: 1;
		justify-self: end;
		width: 44px !important;
		height: 44px !important;
	}
	.rmal-icon {
		width: 18px;
		height: 18px;
	}
	.rmal-row.rmal-playing .rmal-play {
		background-color: #E1A22C !important;
		color: #2E0B18 !important;
		border-color: #E1A22C !important;
	}

	/* bars: small "now playing" pill at the bottom of the thumbnail */
	.rmal-eq {
		grid-column: 1;
		grid-row: 1;
		justify-self: center;
		align-self: end;
		z-index: 2;
		box-sizing: content-box;
		height: 14px !important;
		margin-bottom: 6px;
		padding: 4px 8px;
		gap: 2px;
		border-radius: 8px;
		background: rgba(30,6,14,0.82);
	}
	.rmal-eq i {
		width: 3px !important;
	}

	/* progress: full width under the whole row */
	.rmal-progress {
		grid-column: 1 / -1;
		grid-row: 2;
		margin-top: 14px;
		gap: 12px;
	}
	.rmal-track {
		height: 5px;
	}
	.rmal-ptime {
		display: block;
		font-size: 11px;
	}
}
