/**
 * Front-end styles for "ROXOLNOK: Hanganyag lista" (HanganyagListWidget).
 * Deliberately its own file, not folded into archive-filter.css — a
 * list row with an inline player and an expandable details panel is a
 * genuinely different shape from the card grid archive-filter.css
 * styles, not a variant of it.
 */

/*
 * The widget's own root element had no width rule at all — a plain
 * block-level <div> normally fills its containing block automatically,
 * but as a direct child of a flex container (e.g. an Elementor Flexbox
 * Container, which is exactly where this widget typically sits, next to
 * the filter bar) a flex item's default `flex: 0 1 auto` sizes it to
 * its own content instead, so the list visually shrank instead of
 * spanning the row. `min-width: 0` is the standard companion fix so it
 * can still shrink below its content's intrinsic width when the flex
 * container itself is narrower (without it, flex items refuse to
 * shrink past their content size and can overflow their container).
 *
 * `!important` here is deliberate, not a habit — two prior rounds of
 * plain (correctly-specific) width rules still weren't reliably taking
 * effect live, which points at *something* elsewhere (a theme rule, a
 * page-builder default) winning the cascade in a way this stylesheet
 * alone can't out-specify blindly. `!important` settles that regardless
 * of what it is. `HanganyagListWidget`'s own "Szélesség" Style control
 * still wins over even this — it targets the same selector through
 * Elementor's own generated CSS with `!important` too, and Elementor
 * prints that after this stylesheet, so equal-importance ties resolve
 * in the control's favor (last one in source order wins).
 */
.rxcm-hanganyag-list {
	width: 100% !important;
	max-width: 100% !important;
	flex: 1 1 auto;
	min-width: 0;
	box-sizing: border-box;
}

.rxcm-hanganyag-list__items {
	width: 100% !important;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: var(--rxcm-hanganyag-row-gap, 4px);
}

/*
 * `width: 100%` here, rather than relying on the column flex parent's
 * default `align-items: stretch` to size this row — stretch only kicks
 * in when nothing along the chain overrides it, and this row's own
 * width used to only visibly reach 100% once the "Bővebben" details
 * panel (itself `flex: 1 1 100%`) appeared and forced a wrap, i.e. the
 * row was never reliably full-width by default. An explicit width
 * removes that whole class of "only correct once something else forces
 * it" bug regardless of what any ancestor's alignment does. `!important`
 * for the same reason as `.rxcm-hanganyag-list` above.
 */
.rxcm-hanganyag-row {
	position: relative;
	width: 100% !important;
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 1rem;
	padding: 1rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.rxcm-hanganyag-row--featured {
	background-color: #fdeaea;
	border-radius: 6px;
}

.rxcm-hanganyag-row__badge {
	position: absolute;
	top: 0;
	left: 0;
	background: #c41e1e;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 0.25rem 0.6rem;
	border-radius: 6px 0 6px 0;
}

.rxcm-hanganyag-row__thumb-link {
	flex: 0 0 auto;
	display: block;
}

.rxcm-hanganyag-row__thumb {
	display: block;
	width: 96px;
	height: 96px;
	object-fit: cover;
	border-radius: 4px;
}

.rxcm-hanganyag-row__thumb--placeholder {
	object-fit: contain;
	background-color: #fdeaea;
	padding: 8px;
}

.rxcm-hanganyag-row__main {
	flex: 1 1 260px;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.rxcm-hanganyag-row__title {
	margin: 0;
	font-size: 1.05rem;
	line-height: 1.3;
}

.rxcm-hanganyag-row__title a {
	color: inherit;
	text-decoration: none;
}

.rxcm-hanganyag-row__performer {
	margin: 0;
	font-size: 0.9rem;
	opacity: 0.8;
}

.rxcm-hanganyag-row__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.9rem;
	font-size: 0.8rem;
	opacity: 0.75;
}

.rxcm-hanganyag-row__meta-item--album {
	color: var(--rxcm-hanganyag-album-color, #c41e1e);
	font-weight: 600;
	text-decoration: none;
	opacity: 1;
}

.rxcm-hanganyag-row__description {
	margin: 0;
	font-size: 0.85rem;
	opacity: 0.75;
}

.rxcm-hanganyag-row__player {
	margin-top: 0.25rem;
	width: 100%;
	max-width: var(--rxcm-hanganyag-player-max-width, 100%);
}

.rxcm-hanganyag-row__player .rxcm-audio-native {
	width: 100%;
	height: 32px;
}

.rxcm-hanganyag-row__player .rxcm-embed-card {
	max-width: 100%;
}

/*
 * "ROXOLNOK: Hanganyag lejátszó (Single)" widget's own root — explicit
 * width from the start (not relying on stretch inheritance), learning
 * from `.rxcm-hanganyag-list`/`.rxcm-hanganyag-row` needing the same
 * fix after the fact above.
 */
.rxcm-hanganyag-single-player {
	width: 100%;
	box-sizing: border-box;
}

/*
 * Stylized waveform player (WaveformPlayerRenderer / uploaded_audio only).
 * Two stacked full-width bar layers sit behind a play button: a muted
 * "base" layer and a red "played" layer clipped via `clip-path: inset()`
 * — both layers render the exact same bar geometry, so clipping the top
 * layer's visible width never causes the bars to reflow/misalign, it
 * only ever reveals more or less of an otherwise identical layer.
 */
.rxcm-waveform-player {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	width: 100%;
	max-width: var(--rxcm-hanganyag-player-max-width, 100%);
}

.rxcm-waveform-player__toggle {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #c41e1e;
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.rxcm-waveform-player__icon {
	display: block;
	width: 0;
	height: 0;
}

.rxcm-waveform-player__icon--play {
	margin-left: 2px;
	border-style: solid;
	border-width: 6px 0 6px 10px;
	border-color: transparent transparent transparent currentColor;
}

.rxcm-waveform-player__icon--pause {
	display: none;
	width: 10px;
	height: 12px;
	border-left: 3px solid currentColor;
	border-right: 3px solid currentColor;
}

.rxcm-waveform-player__toggle[aria-pressed="true"] .rxcm-waveform-player__icon--play {
	display: none;
}

.rxcm-waveform-player__toggle[aria-pressed="true"] .rxcm-waveform-player__icon--pause {
	display: block;
}

.rxcm-waveform-player__track {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	height: 32px;
	cursor: pointer;
}

.rxcm-waveform-player__bars {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: flex-end;
	gap: 2px;
}

.rxcm-waveform-player__bars--base .rxcm-waveform-player__bar {
	background-color: rgba(0, 0, 0, 0.18);
}

.rxcm-waveform-player__bars--played {
	clip-path: inset(0 100% 0 0);
}

.rxcm-waveform-player__bars--played .rxcm-waveform-player__bar {
	background-color: #c41e1e;
}

.rxcm-waveform-player__bar {
	flex: 1 1 0;
	min-width: 2px;
	height: calc(var(--h, 0.5) * 100%);
	border-radius: 1px;
}

.rxcm-waveform-player__time {
	flex: 0 0 auto;
	font-size: 0.75rem;
	font-variant-numeric: tabular-nums;
	opacity: 0.7;
	white-space: nowrap;
}

.rxcm-waveform-player__time-sep {
	margin: 0 0.15em;
}

.rxcm-waveform-player__volume {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 0.3rem;
}

.rxcm-waveform-player__volume-icon {
	width: 14px;
	height: 14px;
	opacity: 0.6;
	background-repeat: no-repeat;
	background-position: center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='3 9 8 9 13 4 13 20 8 15 3 15 3 9'%3E%3C/polygon%3E%3Cpath d='M16 8a5 5 0 0 1 0 8'%3E%3C/path%3E%3C/svg%3E");
}

.rxcm-waveform-player__volume-input {
	width: 60px;
}

.rxcm-waveform-player__audio {
	display: none;
}

@media (max-width: 480px) {
	.rxcm-waveform-player__volume {
		display: none;
	}
}

.rxcm-hanganyag-row__toggle {
	flex: 0 0 auto;
	align-self: flex-start;
	background: none;
	color: inherit;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	padding: 0.4rem 0.8rem;
	font-size: 0.8rem;
	line-height: 1;
	cursor: pointer;
}

/*
 * `:focus` included alongside `:hover`, not just `:hover` — clicking a
 * <button> gives it the browser's focus, which then persists (visibly,
 * via whatever a theme's own global `button:focus` style does) until
 * something else takes focus or the page reloads. Without an explicit
 * override here, a theme's own focus color (reported as a jarring pink
 * on this site) bleeds through and looks stuck/broken after every
 * click. `!important` + `color`/`border-color` reset for the same
 * reason `.rxcm-hanganyag-list`'s width rules needed it: a plain-
 * specificity rule alone wasn't reliably beating theme/page-builder
 * defaults elsewhere in this widget either.
 */
.rxcm-hanganyag-row__toggle:hover,
.rxcm-hanganyag-row__toggle:focus {
	background: rgba(0, 0, 0, 0.04) !important;
	color: inherit !important;
	border-color: rgba(0, 0, 0, 0.15) !important;
	outline: none;
}

.rxcm-hanganyag-row__details {
	flex: 1 1 100%;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.6rem 1.5rem;
	margin-top: 0.25rem;
	padding-top: 0.75rem;
	border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

/*
 * `display: grid` above always wins over the browser's own
 * `[hidden] { display: none }` default (author CSS beats the UA
 * stylesheet regardless of selector complexity), so without this rule
 * the panel stays visible even while `hidden` is set and the "Bővebben"
 * toggle button appears to do nothing — this restores the hide.
 */
.rxcm-hanganyag-row__details[hidden] {
	display: none;
}

.rxcm-hanganyag-row__detail {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.rxcm-hanganyag-row__detail-label {
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	opacity: 0.6;
}

.rxcm-hanganyag-row__detail-value {
	font-size: 0.85rem;
}

.rxcm-hanganyag-row__detail-value p {
	margin: 0 0 0.5em;
}

.rxcm-hanganyag-row__detail-list {
	margin: 0;
	padding-left: 1.1rem;
}

.rxcm-hanganyag-alphabet-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin: 0 0 1.75rem;
}

.rxcm-hanganyag-alphabet-filter__tab {
	min-width: 2.2em;
	padding: 0.35em 0.6em;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	background: #fff;
	font-size: 0.85rem;
	line-height: 1;
	text-align: center;
	cursor: pointer;
}

.rxcm-hanganyag-alphabet-filter__tab:hover {
	background: rgba(0, 0, 0, 0.04);
}

.rxcm-hanganyag-alphabet-filter__tab.is-active {
	background: #c41e1e;
	border-color: #c41e1e;
	color: #fff;
}

.rxcm-hanganyag-album-filter {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin: 0 0 1.75rem;
}

.rxcm-hanganyag-album-filter__label {
	font-size: 0.85rem;
	font-weight: 700;
}

.rxcm-hanganyag-album-filter__select {
	padding: 0.5em 0.7em;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	background: #fff;
	font-size: 0.9rem;
}

.rxcm-hanganyag-sort {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1.75rem;
}

.rxcm-hanganyag-sort__label {
	font-size: 0.85rem;
	font-weight: 700;
	white-space: nowrap;
}

.rxcm-hanganyag-sort__select {
	padding: 0.5em 0.7em;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	background: #fff;
	font-size: 0.9rem;
}

.rxcm-hanganyag-list__pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin: 1.5rem 0 0;
}

/* Same `display` vs. `[hidden]` fix as `.rxcm-hanganyag-row__details` above. */
.rxcm-hanganyag-list__pager[hidden] {
	display: none;
}

.rxcm-hanganyag-list__pager button {
	padding: 0.5em 1.1em;
	border: 1px solid rgba(0, 0, 0, 0.15);
	background: #fff;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/*
 * A sensible default so the pager doesn't look broken/unstyled on hover
 * before an admin touches the widget's own "Lapozó" Style controls
 * (`pager_button_*_hover`) — those, being later `{{WRAPPER}}`-scoped
 * Elementor-generated rules, still win over this plain default.
 */
.rxcm-hanganyag-list__pager button:hover:not(:disabled) {
	background: #c41e1e;
	border-color: #c41e1e;
	color: #fff;
}

.rxcm-hanganyag-list__pager button:disabled {
	opacity: 0.4;
	cursor: default;
}

.rxcm-hanganyag-list.is-loading .rxcm-hanganyag-list__items {
	opacity: 0.5;
}

.rxcm-hanganyag-list__empty {
	opacity: 0.75;
	padding: 1.5rem 0;
	text-align: center;
}

@media (max-width: 480px) {
	.rxcm-hanganyag-row {
		flex-direction: column;
	}

	.rxcm-hanganyag-row__toggle {
		align-self: stretch;
		text-align: center;
	}
}
