.cml-library,
.cml-category-widget {
	--cml-shell-bg: #f5f0e7;
	--cml-text: #171717;
	--cml-modal-surface: #fffaf4;
	--cml-modal-overlay: rgba(9, 9, 9, 0.78);
	background: var(--cml-shell-bg);
	color: var(--cml-text);
	box-sizing: border-box;
}

.cml-library {
	--cml-columns: 3;
	--cml-columns-tablet: 2;
	--cml-columns-mobile: 1;
	--cml-play-color: #ffffff;
	--cml-play-bg: rgba(255, 255, 255, 0.2);
	--cml-play-size: 72px;
	--cml-play-icon-size: 24px;
	padding: 40px 30px;
}

.cml-category-widget {
	padding: 20px 30px;
}

@media (max-width: 767px) {
	.cml-library {
		padding: 24px 15px;
	}
	.cml-category-widget {
		padding: 16px 15px;
	}
	.cml-card__excerpt {
		display: -webkit-box !important;
		-webkit-line-clamp: 2 !important;
		-webkit-box-orient: vertical !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
	}
	.cml-card__excerpt.is-expanded {
		display: block !important;
		-webkit-line-clamp: none !important;
		overflow: visible !important;
	}
	.cml-card__more-btn {
		background: none !important;
		border: none !important;
		padding: 0 !important;
		margin: 6px 0 0 !important;
		color: var(--cml-more-link, #8b7c67) !important;
		font-size: 0.85rem !important;
		font-weight: 600 !important;
		cursor: pointer !important;
		display: inline-block !important;
		text-align: inherit !important;
		transition: opacity 0.2s ease !important;
	}
	.cml-card__more-btn:hover {
		opacity: 0.8 !important;
		text-decoration: underline !important;
	}
}

.cml-library__header {
	margin-bottom: 28px;
}

.cml-library__title {
	margin: 0 0 10px;
}

.cml-library__intro > *:last-child {
	margin-bottom: 0;
}

.cml-library__controls,
.cml-category-widget {
	display: grid;
	gap: 18px;
	margin-bottom: 24px;
}

.cml-filter-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.cml-filter-nav__button {
	padding: 0 0 6px;
	border: 0;
	border-bottom: 2px solid transparent;
	background: transparent;
	color: inherit;
	cursor: pointer;
	text-decoration: none;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.cml-filter-nav .cml-filter-nav__button:hover,
.cml-filter-nav .cml-filter-nav__button:focus,
.cml-filter-nav .cml-filter-nav__button:focus-visible {
	background-color: transparent !important;
	border-bottom-color: currentColor;
	text-decoration: none;
}

.cml-filter-nav__button--favorites {
	display: inline-flex;
	align-items: flex-end;
	justify-content: center;
	line-height: inherit;
	vertical-align: baseline;
}

.cml-search-widget {
	display: block;
	width: 100%;
	max-width: none;
}

.cml-search,
.cml-search--external {
	display: block;
	width: 100%;
}

.cml-search__input {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	border: 1px solid #d3d3d3;
	border-radius: 999px;
	color: inherit;
}

.cml-grid {
	display: grid;
	grid-template-columns: repeat(var(--cml-columns), minmax(0, 1fr));
	gap: 24px;
}

.cml-library--audio {
	--cml-columns: 4;
	--cml-columns-tablet: 3;
	--cml-columns-mobile: 2;
}

.cml-card {
	position: relative;
	border: 1px solid #e3ddd3;
	overflow: hidden;
	transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cml-card--video {
	border: 0;
	background: transparent;
}

.cml-card__surface {
	position: relative;
	transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cml-card__trigger {
	position: absolute;
	inset: 0;
	z-index: 1;
	cursor: pointer;
}

.cml-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: #ddd4c4;
	overflow: hidden;
	transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cml-card--video .cml-card__media {
	aspect-ratio: 16 / 9;
}

.cml-card--audio .cml-card__media {
	aspect-ratio: 1;
}

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

.cml-card__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.38));
	opacity: 0;
	transition: opacity 0.2s ease;
}

.cml-card:hover .cml-card__media::after,
.cml-card:focus-within .cml-card__media::after {
	opacity: 1;
}

.cml-card__favorite,
.cml-card__play {
	position: absolute;
	z-index: 2;
	display: grid;
	place-items: center;
	transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.cml-card__favorite-wrap,
.cml-card__watched-wrap {
	position: absolute;
	top: 14px;
	z-index: 3;
}

.cml-card__favorite-wrap {
	right: 14px;
}

.cml-card__watched-wrap {
	left: 14px;
}

.cml-card__favorite,
.cml-card__watched {
	position: static;
	width: 42px;
	height: 42px;
	padding: 0;
	margin: 0;
	border: 0 !important;
	border-radius: 999px;
	background: rgba(15, 15, 15, 0.62) !important;
	color: #fff !important;
	box-shadow: none;
	cursor: pointer;
	opacity: 0;
	transform: translateY(-4px);
	appearance: none;
	-webkit-appearance: none;
}

.cml-card__watched {
	background: rgba(255, 255, 255, 0.96) !important;
	color: #111 !important;
	opacity: 0;
	pointer-events: none;
}

.cml-card__favorite.is-active,
.cml-card.is-watched .cml-card__watched,
.cml-card.is-favorite .cml-card__favorite,
.cml-card:hover .cml-card__favorite,
.cml-card__favorite:focus-visible {
	opacity: 1;
	transform: translateY(0);
}

.cml-card__watched.is-active {
	opacity: 1;
	transform: translateY(0);
}

.cml-card__favorite.is-active {
	background: rgba(255, 255, 255, 0.96) !important;
	color: #d61f45 !important;
}

.cml-card__favorite span,
.cml-card__watched svg {
	display: block;
	transition: transform 0.2s ease, color 0.2s ease;
}

.cml-card__favorite:hover,
.cml-card__favorite:focus-visible {
	background: rgba(255, 255, 255, 0.96) !important;
	color: #d61f45 !important;
}

.cml-card__favorite:hover span,
.cml-card__favorite:focus-visible span {
	transform: scale(1.08);
	color: #d61f45;
}

.cml-card__favorite.is-active span {
	transform: scale(1.08);
	color: #d61f45;
}

.cml-card__watched {
	display: grid;
	place-items: center;
}

.cml-card__watched svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	stroke-width: 2.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	fill: none;
	transform: scale(1.02);
}

.cml-card__play {
	top: 50%;
	left: 50%;
	width: var(--cml-play-size);
	height: var(--cml-play-size);
	border-radius: 999px;
	background: var(--cml-play-bg);
	backdrop-filter: blur(8px);
	opacity: 1;
	transform: translate(-50%, -50%) scale(0.92);
	pointer-events: none;
	z-index: 3;
}

.cml-card__play-icon {
	display: block;
	margin-left: 4px;
	color: var(--cml-play-color);
	font-size: var(--cml-play-icon-size);
	line-height: 1;
}

.cml-card__play-image {
	display: block;
	width: var(--cml-play-icon-size);
	height: var(--cml-play-icon-size);
	object-fit: contain;
}

.cml-card__body {
	position: relative;
	z-index: 2;
}

.cml-card__placeholder {
	display: grid;
	place-items: center;
	height: 100%;
	font-size: 2rem;
	font-weight: 700;
}

.cml-card__body {
	display: grid;
	gap: 12px;
	padding: 18px;
}

.cml-card__title,
.cml-modal__title {
	margin: 0;
}

.cml-card__excerpt,
.cml-modal__description {
	margin: 0;
}

.cml-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.cml-tag {
	padding: 5px 10px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	font-size: 0.85rem;
}

.cml-card__cta {
	font-weight: 600;
}

.cml-sentinel {
	height: 1px;
}

.cml-library__empty {
	margin: 0;
}

.cml-modal {
	position: fixed;
	inset: 0;
	display: none;
	z-index: 999999;
}

.cml-modal.is-open {
	display: block;
}

.cml-modal__overlay {
	position: absolute;
	inset: 0;
	background: var(--cml-modal-overlay);
}

.cml-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(1120px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	margin: 16px auto;
	padding: 28px 28px 24px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)) ,
		var(--cml-modal-surface);
	overflow: auto;
	border-radius: 0px;
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
	backdrop-filter: blur(8px);
}

.cml-modal__close {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 999px;
	background: rgba(17, 17, 17, 0.72);
	color: #fff;
	cursor: pointer;
	transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.cml-modal__close:hover {
	transform: scale(1.06);
	background: rgba(17, 17, 17, 0.9);
	border-color: rgba(255, 255, 255, 0.35);
}

.cml-modal__close svg {
	display: block;
	width: 18px;
	height: 18px;
	stroke: currentColor;
	stroke-width: 2.25;
	stroke-linecap: round;
	fill: none;
}

.cml-modal__content {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
	gap: 28px;
	padding-top: 30px;
}

.cml-modal--video .cml-modal__content {
	display: block;
	position: relative;
	padding-top: 0;
}

.cml-modal__stack {
	display: grid;
	gap: 18px;
	padding-top: 30px;
}

.cml-modal--video .cml-modal__stack {
	padding-top: 0;
}

.cml-modal--video .cml-modal__close {
	top: 20px;
	right: 20px;
	background: rgba(8, 8, 8, 0.54);
	backdrop-filter: blur(10px);
}

.cml-modal__player video,
.cml-modal__player audio,
.cml-modal__practice audio {
	width: 100%;
}

.cml-modal__player video {
	max-height: calc(100vh - 140px);
	background: #000;
	border-radius: 18px;
}

.cml-modal__meta,
.cml-modal__practice {
	display: grid;
	gap: 16px;
}

.cml-modal__practice {
	padding: 18px 20px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 20px;
	background: rgba(255, 255, 255, 0.55);
}

.cml-video-share {
	display: grid;
	gap: 2rem;
	padding: 0;
	background: transparent;
	border-radius: 0;
	max-width: 100%;
	width: 100%;
}

.cml-video-share .cmw-composer-card {
	margin: 0 0 1.5rem 0 !important;
	width: 100% !important;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

.cml-video-share .cmw-composer-field {
	display: block !important;
	padding: 0 !important;
	border: 1px solid #dcd8d0 !important;
	background: #ffffff !important;
	border-radius: 8px !important;
}

.cml-video-share .cmw-composer-field:focus-within {
	border-color: #a89f91 !important;
	box-shadow: 0 0 0 1px #a89f91 !important;
}

.cml-video-share .cmw-composer-input {
	display: block !important;
	width: 100% !important;
	min-height: 100px !important;
	padding: 14px 16px !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #1a1a1a !important;
	resize: vertical !important;
}

.cml-video-share .cmw-composer-tools {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	margin-top: 14px !important;
}

.cml-video-share__feedback {
	color: rgba(23, 23, 23, 0.72);
	font-size: 0.95rem;
}

.cml-video-thread {
	display: grid !important;
	gap: 2rem !important;
	width: 100% !important;
	max-width: 100% !important;
}

.cml-video-thread__loading,
.cml-video-thread__empty {
	padding: 18px 20px;
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.7);
	color: rgba(23, 23, 23, 0.72);
}

.cml-video-thread .cmw-shell {
	padding: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	max-width: 100% !important;
	width: 100% !important;
	margin: 0 !important;
}

.cml-video-thread .cmw-feed {
	gap: 2rem;
	margin-top: 0;
}

.cml-video-thread .cmw-comment-list {
	gap: 1.25rem !important;
}

.cml-video-thread .cmw-post-card {
	background: #ffffff;
	padding: 24px !important;
	border-radius: 12px !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

.cml-video-thread .cmw-comment-body {
	background: #f9f8f6 !important;
	border: 1px solid #eeebe5 !important;
	color: #1a1a1a !important;
	padding: 16px 20px !important;
	border-radius: 12px !important;
}

.cml-video-thread .cmw-comment-input,
.cml-video-thread .cmw-comment-edit-input {
	background-color: #ffffff !important;
	background: #ffffff !important;
	border: 1px solid #dcd8d0 !important;
	color: #1a1a1a !important;
	border-radius: 8px !important;
	padding: 12px 16px 12px 3rem !important;
}

.cml-video-thread .cmw-composer-input {
	background-color: #ffffff !important;
	background: #ffffff !important;
	border: 1px solid #dcd8d0 !important;
	color: #1a1a1a !important;
	border-radius: 8px !important;
	padding: 12px 16px !important;
}

.cml-video-thread .cmw-comment-input:focus,
.cml-video-thread .cmw-comment-edit-input:focus,
.cml-video-thread .cmw-composer-input:focus {
	border-color: #a89f91 !important;
	box-shadow: 0 0 0 1px #a89f91 !important;
}

.cml-video-thread .cmw-activity-label,
.cml-video-thread .cmw-video-reference {
	display: none !important;
}

.cml-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.cml-modal__actions a {
	display: inline-flex;
	padding: 10px 14px;
	border-radius: 999px;
	background: #111;
	color: #fff;
	text-decoration: none;
}

body.cml-modal-open {
	overflow: hidden;
}

@media (max-width: 1024px) {
	.cml-grid {
		grid-template-columns: repeat(var(--cml-columns-tablet), minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.cml-grid {
		grid-template-columns: repeat(var(--cml-columns-mobile), minmax(0, 1fr));
	}

	.cml-modal__content {
		grid-template-columns: 1fr;
	}
}



/* ==========================================================================
   Inline Audio Player Styles (Album Cover Transition)
   ========================================================================== */

/* Completely hide the heart overlay on all audio covers to avoid a crammed layout */
.cml-card--audio .cml-card__favorite-wrap {
	display: none !important;
}

/* Cover-only layout styles (hide borders and body text cleanly when both are disabled) */
.cml-card--cover-only:not(.is-playing) {
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}
.cml-card--cover-only:not(.is-playing) .cml-card__body {
	display: none !important;
}

/* Container padding adjustment to prevent playing card shadow/scale from overflowing grid borders */
.cml-library--playing-audio .cml-grid {
	padding: 12px;
	transition: padding 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Styling when audio library is in play state: other cards blur out and scale down slightly */
.cml-library--playing-audio .cml-card:not(.is-playing) {
	opacity: 0.35;
	filter: blur(3px);
	pointer-events: none;
	transform: scale(0.92); /* Shrink surrounding items slightly more to create space */
	transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active playing card styling - remains in its original grid cell, centers, and scales up */
.cml-card.is-playing {
	grid-column: auto !important; /* Keep in its original cell to prevent shifting */
	width: 280px !important; /* Allow the card to be exactly 280px wide */
	max-width: calc(100vw - 32px) !important; /* Limit by viewport width on small devices */
	border-radius: 24px;
	border-color: rgba(0, 0, 0, 0.08) !important;
	background: var(--cml-modal-surface, #fffaf4);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12) !important;
	position: relative;
	overflow: hidden; /* Prevent inner controls and elements from overflowing card boundaries */
	z-index: 10; /* Elevated above other cards */
	transform: scale(1.04); /* Soft scale pop-out */
	transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dynamic column justify alignments to prevent overflow of left/right grid container boundaries */
/* Desktop: 4 columns */
.cml-grid .cml-card.is-playing:nth-child(4n+1) {
	justify-self: start !important;
}
.cml-grid .cml-card.is-playing:nth-child(4n+2),
.cml-grid .cml-card.is-playing:nth-child(4n+3) {
	justify-self: center !important;
}
.cml-grid .cml-card.is-playing:nth-child(4n) {
	justify-self: end !important;
}

/* Tablet: 3 columns */
@media (max-width: 1024px) {
	.cml-grid .cml-card.is-playing:nth-child(3n+1) {
		justify-self: start !important;
	}
	.cml-grid .cml-card.is-playing:nth-child(3n+2) {
		justify-self: center !important;
	}
	.cml-grid .cml-card.is-playing:nth-child(3n) {
		justify-self: end !important;
	}
}

/* Mobile: 2 columns */
@media (max-width: 767px) {
	.cml-grid .cml-card.is-playing:nth-child(2n+1) {
		justify-self: start !important;
	}
	.cml-grid .cml-card.is-playing:nth-child(2n) {
		justify-self: end !important;
	}
}

/* Vertical card layout */
.cml-card.is-playing .cml-card__surface {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	padding: 16px;
	gap: 16px;
}

/* Centered cover image framed in iPod style */
.cml-card.is-playing .cml-card__media {
	width: calc(100% - 32px);
	max-width: 150px; /* Compact cover */
	margin: 8px auto 0 auto;
	flex-shrink: 0;
	border-radius: 12px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	aspect-ratio: 1;
	overflow: hidden;
	position: relative;
	border: 1px solid rgba(0, 0, 0, 0.05);
}

.cml-card.is-playing .cml-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Disable overlays and indicators on playing cover */
.cml-card.is-playing .cml-card__media::after {
	display: none !important;
}
.cml-card.is-playing .cml-card__favorite-wrap,
.cml-card.is-playing .cml-card__watched-wrap {
	display: none !important;
}

/* Hide play overlays and tags/CTA in playing layout */
.cml-card.is-playing .cml-card__play,
.cml-card.is-playing .cml-card__trigger,
.cml-card.is-playing .cml-card__tags,
.cml-card.is-playing .cml-card__cta {
	display: none !important;
}

/* Vertical body container */
.cml-card.is-playing .cml-card__body {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	padding: 0;
	gap: 20px;
	position: static !important;
}

/* Hide original PHP metadata row while playing, as we inject our own unified one */
.cml-card.is-playing .cml-card__body > .cml-card__meta-group {
	display: none !important;
}

/* Dynamic Metadata & Favorite Row */
.cml-player-meta-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 12px;
	padding: 0 4px;
}

.cml-player-meta-row .cml-card__meta-group {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	min-width: 0;
	text-align: left;
}

.cml-player-meta-row .cml-card__title {
	font-size: 1.05rem;
	font-weight: 700;
	margin: 0;
	line-height: 1.3;
	color: var(--cml-text, #171717);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cml-player-meta-row .cml-card__excerpt {
	font-size: 0.85rem;
	opacity: 0.7;
	margin: 4px 0 0;
	line-height: 1.3;
	color: var(--cml-text, #171717);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Custom iPod Player controls styles */
.cml-custom-player {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	gap: 20px;
	margin-right: 0 !important;
}

.cml-player-btn {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	color: var(--cml-text, #171717);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
	outline: none;
}

.cml-player-btn:hover {
	transform: scale(1.08);
}

.cml-player-btn--play {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--cml-text, #171717);
	color: var(--cml-modal-surface, #fffaf4);
	box-shadow: 0 4px 12px rgba(23, 23, 23, 0.15);
	flex-shrink: 0;
	order: 2;
}

.cml-player-btn--play:hover {
	transform: scale(1.06);
	background: #d61f45;
	box-shadow: 0 6px 16px rgba(214, 31, 69, 0.3);
	color: #fff;
}

.cml-player-btn--play svg {
	width: 24px;
	height: 24px;
	fill: currentColor;
}

.cml-player-icon--play {
	transform: translateX(1.5px);
}

.cml-player-btn--favorite {
	width: 36px;
	height: 36px;
	color: var(--cml-text, #171717);
	opacity: 0.4;
	flex-shrink: 0;
	padding: 0;
}

.cml-player-btn--favorite:hover,
.cml-player-btn--favorite.is-active {
	opacity: 1;
	color: #d61f45;
	transform: scale(1.1);
}

.cml-player-btn--favorite svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	transition: transform 0.2s ease;
}

/* Absolute positioned close button at the top-right of the card */
.cml-player-btn--close {
	position: absolute;
	right: 12px;
	top: 12px;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
	color: var(--cml-text, #171717);
	flex-shrink: 0;
	z-index: 10;
	border: none;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.cml-player-btn--close:hover {
	background: rgba(214, 31, 69, 0.1);
	color: #d61f45;
	transform: scale(1.1);
}

.cml-player-btn--close svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* Scrubber bar styling */
.cml-player-scrubber-container {
	display: flex;
	align-items: center;
	width: 100%;
	gap: 10px;
	order: 1;
}

.cml-player-time {
	font-size: 0.75rem;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
	color: var(--cml-text, #171717);
	opacity: 0.6;
	min-width: 32px;
	text-align: center;
}

.cml-player-scrubber-track {
	height: 6px;
	background: rgba(0, 0, 0, 0.08);
	border-radius: 3px;
	position: relative;
	flex-grow: 1;
	cursor: pointer;
	transition: all 0.15s ease;
}

.cml-player-scrubber-track:hover {
	height: 8px;
	background: rgba(0, 0, 0, 0.12);
}

.cml-player-scrubber-progress {
	height: 100%;
	background: #d61f45;
	border-radius: 3px;
	width: 0%;
	position: absolute;
	left: 0;
	top: 0;
}

.cml-player-scrubber-handle {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #d61f45;
	position: absolute;
	top: 50%;
	left: 0%;
	transform: translate(-50%, -50%) scale(0);
	transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
	pointer-events: none;
}

.cml-player-scrubber-track:hover .cml-player-scrubber-handle {
	transform: translate(-50%, -50%) scale(1);
}

/* Volume controls styling */
.cml-player-volume-container {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	max-width: 200px;
	margin-top: 4px;
	order: 3;
}

.cml-player-btn--volume svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.cml-player-volume-slider {
	flex-grow: 1;
	height: 4px;
	background: rgba(0, 0, 0, 0.08);
	border-radius: 2px;
	position: relative;
	cursor: pointer;
}

.cml-player-volume-progress {
	height: 100%;
	background: var(--cml-text, #171717);
	border-radius: 2px;
	width: 80%;
}

/* Premium AJAX Loading Transitions */
.cml-library .cml-grid {
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cml-library.is-loading .cml-grid {
	opacity: 0.25;
	filter: blur(4px);
	pointer-events: none;
}

/* ==========================================================================
   Clara Unified Media Library Overhaul Styles
   ========================================================================== */

/* Main wrapper */
.cml-unified-library {
	display: flex;
	flex-direction: column;
	width: 100%;
	box-sizing: border-box;
}

/* Banner Header */
.cml-library-banner {
	position: relative;
	width: calc(100% + 60px);
	margin-top: -40px;
	margin-left: -30px;
	margin-right: -30px;
	margin-bottom: 40px;
	min-height: 80px;
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	padding: 40px 20px;
	overflow: hidden;
}

@media (max-width: 767px) {
	.cml-library-banner {
		width: calc(100% + 30px);
		margin-top: -24px;
		margin-left: -15px;
		margin-right: -15px;
	}
}

.cml-library-banner__overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	background-color: transparent;
}

.cml-library-banner__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
	color: #ffffff;
}

.cml-library-banner__title {
	margin: 0 0 10px;
	font-size: clamp(2rem, 5vw, 3.5rem);
	font-weight: 700;
	line-height: 1.2;
}

.cml-library-banner__subtitle {
	margin: 0;
	font-size: clamp(1rem, 2vw, 1.25rem);
	line-height: 1.5;
	opacity: 0.9;
}

/* Navigation Tabs */
.cml-tabs-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin-bottom: 40px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	padding-bottom: 16px;
}

.cml-tab-btn {
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	padding: 10px 20px;
	color: #555555;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s ease;
}

.cml-tab-btn:hover {
	color: #111111;
	border-bottom-color: rgba(0, 0, 0, 0.3);
}

.cml-tab-btn.is-active {
	color: #111111;
	border-bottom-color: #111111;
}

/* Tab Panes */
.cml-tab-pane {
	display: none;
	width: 100%;
}

.cml-tab-pane.is-active {
	display: block;
	animation: cmlFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cmlFadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* All Overview Section Groupings */
.cml-all-section {
	margin-bottom: 48px;
	padding-bottom: 32px;
	border-bottom: 1px solid #e3ddd3;
}

.cml-all-section:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

.cml-all-section__title {
	font-size: 1.75rem;
	font-weight: 700;
	margin: 0 0 24px;
}

.cml-all-section--foundations .cml-all-section__title {
	text-transform: lowercase; /* "her devotion foundations" lowercase styling */
}

/* Favourites toggle navigation */
.cml-fav-container {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.cml-fav-toggle {
	display: flex;
	justify-content: center;
	gap: 24px;
	margin-bottom: 32px;
}

.cml-fav-toggle-btn {
	background: transparent;
	border: 0;
	border-bottom: 2px solid transparent;
	padding: 8px 16px;
	color: #666666;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s ease;
}

.cml-fav-toggle-btn:hover {
	color: #111111;
}

.cml-fav-toggle-btn.is-active {
	color: #111111;
	border-bottom-color: #111111;
}

.cml-fav-pane {
	display: none;
	width: 100%;
}

.cml-fav-pane.is-active {
	display: block;
	animation: cmlFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Prevent layout flashing by hiding libraries by default, except in the editor or when active */
.cml-library {
	display: none;
}

.cml-library.cml-tab--active {
	display: block;
}

.elementor-editor-active .cml-library {
	display: block !important;
}

/* Hide inactive library tabs */
.cml-library.cml-tab--hidden {
	display: none !important;
}

/* Trigger smooth fade-in / slide-up animation when a library tab becomes active */
.cml-library.cml-tab--active:not(.cml-tab--hidden) {
	animation: cmlFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Load More Button styling */
.cml-load-more-wrapper {
	display: flex;
	justify-content: center;
	margin-top: 32px;
	width: 100%;
}

.cml-btn--load-more {
	background: var(--cml-btn-bg, #ffffff);
	border: 1px solid var(--cml-btn-border, #d3d3d3);
	color: var(--cml-btn-text, inherit);
	padding: 12px 32px;
	border-radius: 99px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s ease;
}

.cml-btn--load-more:hover {
	background: var(--cml-btn-hover-bg, #1d1d1d);
	color: var(--cml-btn-hover-text, #ffffff);
	border-color: var(--cml-btn-hover-bg, #1d1d1d);
}

/* Search active layout overrides */
body.cml-search-active .cml-library:not(.cml-search-results-container),
body.cml-search-active .cml-filter-nav:not(.cml-search-results__switcher),
body.cml-search-active .cml-switcher,
body.cml-search-active .cml-category-widget {
	display: none !important;
}

.cml-search-results-container {
	display: none;
	margin-top: 32px;
	width: 100%;
	background: transparent;
	padding: 0;
}

body.cml-search-active .cml-search-results-container {
	display: block;
}

.cml-search-results__title {
	margin-bottom: 24px;
	font-size: 1.8rem;
}

.cml-search-results__loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 40px 0;
	font-size: 1.1rem;
	color: #777;
}

.cml-search-results__spinner {
	width: 24px;
	height: 24px;
	border: 3px solid rgba(0,0,0,0.1);
	border-radius: 50%;
	border-top-color: currentColor;
	animation: cml-spin 1s ease-in-out infinite;
}

.cml-search-results__no-results {
	padding: 40px 0;
	font-size: 1.2rem;
	color: #5a5a5a;
	text-align: center;
}

.cml-search-results__switcher {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	padding-bottom: 16px;
	margin-bottom: 32px;
}

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

/* Header alignment variables */
:root {
	--cml-align-left-left: 0 !important;
	--cml-align-right-left: auto !important;
	--cml-align-left-center: auto !important;
	--cml-align-right-center: auto !important;
	--cml-align-left-right: auto !important;
	--cml-align-right-right: 0 !important;
}

/* Transition for hover styles of the banner */
.cml-library-banner {
	transition: opacity 0.3s ease, border-color 0.3s ease, border-radius 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease, -webkit-filter 0.3s ease !important;
}

/* Hide padding-top if library has no header */
.cml-library--no-header {
	padding-top: 0 !important;
}

/* Custom CSS IDs fade-in animation on tab change */
#all-header.cml-tab--active:not(.cml-tab--hidden),
#video-header.cml-tab--active:not(.cml-tab--hidden),
#audio-header.cml-tab--active:not(.cml-tab--hidden),
#favourites-header.cml-tab--active:not(.cml-tab--hidden),
#favorites-header.cml-tab--active:not(.cml-tab--hidden) {
	animation: cmlFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Card alignment variables mapping */
:root {
	--cml-justify-left: flex-start !important;
	--cml-justify-center: center !important;
	--cml-justify-right: flex-end !important;
	--cml-justify-: flex-start; /* Fallback */
}


