/* ResultsAiX Podcasts: the audio player, the episode and show pages, My Podcasts,
   the signup form. The same file in the plugin and the ResultsAiX Theme.

   "Follow my theme": the ResultsAiX Theme's scheme tokens when it is the theme
   (every colour scheme and dark mode carry over), otherwise the colours the
   theme itself publishes: block themes (Twenty Twenty-Five), Astra, Kadence,
   GeneratePress. A player's own accent (--raix-ap-accent) wins when set.
   .raix-ap-scheme-light and -dark fix the colours whatever the theme. */

:where(.raix-ap, .raix-ap-list, .raix-ap-eps, .raix-ap-transcript, .raix-mypods, .raix-pl-signup, .raix-ep-more) {
	--raix-pf-accent: var(--raix-primary, var(--wp--preset--color--accent-1, var(--wp--preset--color--primary, var(--ast-global-color-0, var(--global-palette1, var(--accent, #f59e0b))))));
	--raix-pf-text: var(--raix-text, var(--wp--preset--color--contrast, var(--ast-global-color-3, var(--global-palette4, #1c1917))));
	--raix-pf-card: var(--raix-card, var(--wp--preset--color--base, var(--ast-global-color-5, var(--global-palette9, #fff))));
	--raix-pf-muted: var(--raix-muted, color-mix(in srgb, var(--raix-pf-text) 62%, transparent));
	--raix-pf-border: var(--raix-border, color-mix(in srgb, var(--raix-pf-text) 16%, transparent));
	--raix-pf-soft: var(--raix-primary-light, color-mix(in srgb, var(--raix-pf-accent) 13%, transparent));
}
.raix-ap.raix-ap-scheme-light, .raix-ap-scheme-light, .raix-ap-scheme-light .raix-ap { --raix-pf-accent: #d97706; --raix-pf-text: #1c1917; --raix-pf-card: #ffffff; --raix-pf-muted: #78716c; --raix-pf-border: #e7e5e4; --raix-pf-soft: rgba(217, 119, 6, .12); --raix-ap-on: #fff; }
.raix-ap.raix-ap-scheme-dark, .raix-ap-scheme-dark, .raix-ap-scheme-dark .raix-ap { --raix-pf-accent: #fbbf24; --raix-pf-text: #f5f5f4; --raix-pf-card: #1c1917; --raix-pf-muted: #a8a29e; --raix-pf-border: #44403c; --raix-pf-soft: rgba(251, 191, 36, .14); --raix-ap-on: #1c1917; }

.raix-ap {
	--raix-ap-accent: var(--raix-pf-accent);
	--raix-ap-on: var(--raix-primary-text, #fff);
	--raix-ap-line: var(--raix-pf-border);
	--raix-ap-soft: var(--raix-pf-soft);
	position: relative;
	display: flex;
	gap: 20px;
	align-items: stretch;
	margin: 1.5em 0;
	padding: 18px;
	background: var(--raix-pf-card);
	color: var(--raix-pf-text);
	border: 1px solid var(--raix-ap-line);
	border-radius: var(--raix-radius, 16px);
	box-shadow: var(--raix-shadow-sm, 0 1px 2px rgba(0, 0, 0, .05));
	line-height: 1.4;
}
.raix-ap * { box-sizing: border-box; }
.raix-ap-art { flex: 0 0 148px; }
.raix-ap-art img { display: block; width: 148px; height: 148px; object-fit: cover; border-radius: calc(var(--raix-radius, 16px) - 6px); margin: 0; }
.raix-ap-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.raix-ap-meta { display: flex; flex-direction: column; gap: 2px; }
.raix-ap-sub { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--raix-pf-muted); }
.raix-ap-title { font-size: 1.12rem; font-weight: 800; line-height: 1.3; margin: 0; }
.raix-ap-audio { width: 100%; }
.raix-ap.is-ready .raix-ap-audio { display: none; }

/* The buttons. */
.raix-ap button, .raix-ap a.raix-ap-tool {
	font: inherit;
	cursor: pointer;
	color: inherit;
	background: none;
	border: 0;
	margin: 0;
	padding: 0;
	text-decoration: none;
}
.raix-ap button:focus-visible, .raix-ap a:focus-visible, .raix-ap-seek:focus-visible { outline: 3px solid var(--raix-ap-accent); outline-offset: 2px; }
.raix-ap svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.raix-ap svg text { fill: currentColor; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.raix-ap-controls { display: flex; align-items: center; gap: 14px; }
.raix-ap-play {
	width: 54px; height: 54px; border-radius: 50%;
	display: inline-flex !important; align-items: center; justify-content: center;
	background: var(--raix-ap-accent) !important; color: var(--raix-ap-on) !important;
	box-shadow: 0 6px 16px -6px var(--raix-ap-accent);
	transition: transform .15s ease, box-shadow .15s ease;
}
.raix-ap-play svg { width: 26px; height: 26px; }
.raix-ap-play:hover { transform: scale(1.06); }
.raix-ap-skip { width: 40px; height: 40px; border-radius: 50%; display: inline-flex !important; align-items: center; justify-content: center; color: var(--raix-pf-text) !important; }
.raix-ap-skip svg { width: 28px; height: 28px; }
.raix-ap-skip:hover, .raix-ap-tool:hover, .raix-ap-speed:hover { background: var(--raix-ap-soft) !important; }
.raix-ap-speed { min-width: 46px; height: 32px; padding: 0 10px !important; border-radius: 999px; border: 1px solid var(--raix-ap-line) !important; font-size: .82rem !important; font-weight: 800; font-variant-numeric: tabular-nums; }

/* The bar: the filled part follows the sound. */
.raix-ap-bar { display: flex; align-items: center; gap: 10px; font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--raix-pf-muted); }
.raix-ap-seek {
	flex: 1 1 auto; min-width: 60px; height: 6px; margin: 0; padding: 0;
	-webkit-appearance: none; appearance: none; border-radius: 999px; cursor: pointer;
	background: linear-gradient(to right, var(--raix-ap-accent) var(--raix-ap-pct, 0%), var(--raix-ap-line) var(--raix-ap-pct, 0%));
	accent-color: var(--raix-ap-accent);
}
.raix-ap-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--raix-ap-accent); border: 3px solid var(--raix-pf-card); box-shadow: 0 0 0 1px var(--raix-ap-accent); }
.raix-ap-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--raix-ap-accent); border: 3px solid var(--raix-pf-card); }
.raix-ap-cur, .raix-ap-dur { min-width: 3.4em; }
.raix-ap-dur { text-align: right; }

/* Resume, chapters, share, download. */
.raix-ap-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.raix-ap-tool { display: inline-flex !important; align-items: center; gap: 6px; height: 32px; padding: 0 10px !important; border-radius: 999px; font-size: .82rem !important; font-weight: 600; color: var(--raix-pf-muted) !important; }
.raix-ap-tool svg { width: 18px; height: 18px; }
.raix-ap-tool[hidden], .raix-ap [hidden] { display: none !important; }
.raix-ap-resume { height: 32px; padding: 0 14px !important; border-radius: 999px; background: var(--raix-ap-soft) !important; color: var(--raix-pf-text) !important; font-size: .82rem !important; font-weight: 700; }
.raix-ap-chapters { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--raix-ap-line); max-height: 280px; overflow-y: auto; }
.raix-ap-chapters li { margin: 0; border-bottom: 1px solid var(--raix-ap-line); }
.raix-ap-ch { display: flex !important; width: 100%; gap: 12px; align-items: baseline; padding: 9px 4px !important; text-align: left; font-size: .9rem !important; }
.raix-ap-ch:hover { background: var(--raix-ap-soft) !important; }
.raix-ap-ch-t { flex: 0 0 4.2em; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--raix-ap-accent); }
.raix-ap-chapters li.is-on .raix-ap-ch { font-weight: 800; }
.raix-ap-msg { margin: 0; font-size: .82rem; color: var(--raix-pf-muted); min-height: 0; }
.raix-ap-msg:empty { display: none; }

/* Slim bar: one row. */
.raix-ap--bar { padding: 10px 16px; gap: 12px; }
.raix-ap--bar .raix-ap-main { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.raix-ap--bar .raix-ap-meta { flex: 1 1 180px; min-width: 0; }
.raix-ap--bar .raix-ap-title { font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.raix-ap--bar .raix-ap-controls { order: -1; gap: 6px; }
.raix-ap--bar .raix-ap-play { width: 42px; height: 42px; }
.raix-ap--bar .raix-ap-skip { width: 34px; height: 34px; }
.raix-ap--bar .raix-ap-bar { flex: 3 1 260px; }
.raix-ap--bar .raix-ap-tools { flex: 1 1 100%; }
.raix-ap--bar .raix-ap-tools:not(:has(> :not([hidden]))) { display: none; }

/* Listen button: a pill that opens into the bar. */
.raix-ap--button { display: inline-flex; padding: 0; border: 0; background: none; box-shadow: none; margin: 1em 0; }
.raix-ap--button .raix-ap-main { display: none; }
.raix-ap--button.is-open { display: flex; padding: 10px 16px; border: 1px solid var(--raix-ap-line); background: var(--raix-pf-card); box-shadow: var(--raix-shadow-sm, 0 1px 2px rgba(0, 0, 0, .05)); }
.raix-ap--button.is-open .raix-ap-main { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.raix-ap--button.is-open .raix-ap-bar { flex: 3 1 240px; }
.raix-ap--button:not(.is-ready) .raix-ap-main { display: block; }
.raix-ap-open { display: inline-flex !important; align-items: center; gap: 10px; height: 48px; padding: 0 22px 0 8px !important; border-radius: 999px; background: var(--raix-ap-accent) !important; color: var(--raix-ap-on) !important; font-weight: 800 !important; font-size: 1rem !important; box-shadow: 0 8px 20px -8px var(--raix-ap-accent); }
.raix-ap-open svg { width: 32px; height: 32px; padding: 6px; border-radius: 50%; background: rgba(255, 255, 255, .22); }

/* Locked and empty. */
.raix-ap-locked { align-items: center; background: var(--raix-ap-soft); }
.raix-ap-lock { flex: 0 0 auto; font-size: 34px; line-height: 1; }
.raix-ap-locked .raix-ap-title { margin: 0 0 2px; }
.raix-ap-locktext { margin: 0 0 8px; color: var(--raix-pf-muted); }
.raix-ap-lockbtns { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.raix-ap-empty { color: var(--raix-pf-muted); font-style: italic; }
.raix-ap-empty p { margin: 0; }

/* A show's list. */
.raix-ap-list { margin: 1.5em 0; }
.raix-ap-list > .raix-ap { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.raix-ap-eps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--raix-pf-border); border-top: 0; border-radius: 0 0 var(--raix-radius, 16px) var(--raix-radius, 16px); overflow: hidden; background: var(--raix-pf-card); }
.raix-ap-eps li { margin: 0; border-top: 1px solid var(--raix-pf-border); }
.raix-ap-eps li:first-child { border-top: 0; }
.raix-ap-ep, .raix-ap-eps a { display: flex; width: 100%; gap: 14px; justify-content: space-between; align-items: center; padding: 13px 18px; text-align: left; font: inherit; color: var(--raix-pf-text); background: none; border: 0; cursor: pointer; text-decoration: none; }
.raix-ap-ep:hover, .raix-ap-eps a:hover, .raix-ap-ep.is-on { background: var(--raix-pf-soft); }
.raix-ap-ep.is-on .raix-ap-ep-t { font-weight: 800; }
.raix-ap-ep-t { font-weight: 600; min-width: 0; }
.raix-ap-ep-d { flex: 0 0 auto; font-size: .82rem; color: var(--raix-pf-muted); font-variant-numeric: tabular-nums; }
.raix-ap-eps .is-locked a { color: var(--raix-pf-muted); }

/* The transcript, folded away. */
.raix-ap-transcript { margin: 2em 0; border: 1px solid var(--raix-pf-border); border-radius: var(--raix-radius, 16px); background: var(--raix-pf-card); }
.raix-ap-transcript > summary { cursor: pointer; padding: 14px 18px; font-weight: 800; }
.raix-ap-transcript-body { padding: 0 18px 8px; max-height: 70vh; overflow-y: auto; }
.raix-ap-transcript-body p { margin: 0 0 1em; }
.raix-ap-jump { font: inherit; font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--raix-primary-strong, var(--raix-pf-accent)); background: var(--raix-pf-soft); border: 0; border-radius: 6px; padding: 1px 7px; cursor: pointer; }

/* Follow the show. */
.raix-ap-follow { display: flex; flex-wrap: wrap; gap: 8px; margin: 1em 0; }

/* The show page header and the episode page's "More from" list. */
.raix-show-head { display: flex; gap: 24px; align-items: center; }
.raix-show-cover img { display: block; width: 180px; height: 180px; object-fit: cover; border-radius: var(--raix-radius, 16px); margin: 0; }
.raix-show-about { margin: 8px 0 0; font-size: 1.05rem; color: var(--raix-pf-muted); }
.raix-ep-more .raix-ap-eps { border-top: 1px solid var(--raix-pf-border); border-radius: var(--raix-radius, 16px); }
@media (max-width: 640px) { .raix-show-head { flex-direction: column; align-items: flex-start; } .raix-show-cover img { width: 140px; height: 140px; } }

/* My Podcasts. */
.raix-mypods { margin: 1.5em 0; }
.raix-mypod { display: flex; gap: 18px; padding: 18px; margin: 0 0 16px; border: 1px solid var(--raix-pf-border); border-radius: var(--raix-radius, 16px); background: var(--raix-pf-card); }
.raix-mypod-art img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; display: block; }
.raix-mypod-body { flex: 1 1 auto; min-width: 0; }
.raix-mypod-body h3 { margin: 0 0 4px; }
.raix-mypod-kind { margin: 0 0 10px; color: var(--raix-pf-muted); font-size: .9rem; }
.raix-mypod-link { display: flex; gap: 8px; }
.raix-mypod-link input { flex: 1 1 auto; min-width: 0; font-size: .85rem; padding: 8px 10px; border: 1px solid var(--raix-input, var(--raix-pf-border)); border-radius: 8px; background: var(--raix-bg, transparent); color: inherit; }
.raix-mypod-apps { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .9rem; }
.raix-mypod-apps span { color: var(--raix-pf-muted); }
.raix-mypod-how { margin-top: 8px; font-size: .9rem; }
.raix-mypod-how summary { cursor: pointer; color: var(--raix-pf-muted); }
.raix-mypods-note { padding: 10px 14px; border-radius: 10px; background: #dcfce7; color: #14532d; }
.raix-mypods-reset { font-size: .88rem; color: var(--raix-pf-muted); }
.raix-mypods-sure { font-weight: 700; color: var(--raix-pf-text); }

@media (max-width: 640px) {
	.raix-ap { flex-direction: column; gap: 14px; padding: 14px; }
	.raix-ap-art { flex-basis: auto; }
	.raix-ap-art img { width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: 240px; }
	.raix-ap--card .raix-ap-art { display: flex; justify-content: center; }
	.raix-ap--card .raix-ap-art img { width: 200px; }
	.raix-ap-controls { justify-content: center; }
	.raix-ap--bar, .raix-ap--button.is-open { flex-direction: row; }
	.raix-mypod { flex-direction: column; }
	.raix-mypod-link { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
	.raix-ap-play { transition: none; }
}

/* Under any theme: the episode line, More from, the show's head. */
.raix-ap-epmeta { margin: 0 0 .6em; color: var(--raix-pf-muted); font-size: .95rem; }
.raix-ap-epmeta a { color: inherit; }
.raix-ep-more { margin: 2.5em 0 1em; }
.raix-ep-more-h { font-size: 1.25rem; margin: 0 0 .7em; }
.raix-show-head--any { margin: 0 0 1.4em; }

/* Buttons inside podcast parts, for themes with no .raix-btn of their own (zero weight: a theme's own style wins). */
:where(.raix-ap, .raix-mypods, .raix-pl-signup) :where(.raix-btn) { display: inline-block; padding: .62em 1.2em; border-radius: 999px; border: 1px solid var(--raix-pf-accent); background: var(--raix-pf-accent); color: var(--raix-ap-on, #fff); font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; }
:where(.raix-ap, .raix-mypods, .raix-pl-signup) :where(.raix-btn-ghost) { background: transparent; color: var(--raix-pf-text); border-color: var(--raix-pf-border); }

/* The podcast signup form. */
.raix-pl-signup { position: relative; margin: 1.5em 0; padding: 20px; border: 1px solid var(--raix-pf-border); border-radius: var(--raix-radius, 16px); background: var(--raix-pf-card); color: var(--raix-pf-text); }
.raix-pl-title { margin: 0 0 12px; font-size: 1.15rem; font-weight: 800; }
.raix-pl-fields { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.raix-pl-fields label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; margin: 0; font-size: .85rem; font-weight: 600; }
.raix-pl-fields input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--raix-pf-border); border-radius: 10px; font: inherit; background: transparent; color: inherit; }
.raix-pl-fields .raix-btn { flex: 0 0 auto; }
.raix-pl-fields .raix-pl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.raix-pl-msg { margin: 10px 0 0; font-weight: 600; }
.raix-pl-msg:empty { display: none; }
.raix-pl-msg.is-err { color: #b91c1c; }
.raix-pl-signup.is-done .raix-pl-fields { display: none; }

/* The embed page itself. */
.raix-pod-embed { color: var(--raix-pf-text); }
