/**
 * Hurrdat Sports — Persistent Audio Player styles
 * -----------------------------------------------
 * Fixed footer bar. All brand-tunable values live in the :root block so you
 * can match Hurrdat Sports colors without touching the rest of the file.
 * Want it pinned to the TOP instead of the bottom? See the note on `.hsap`.
 */

:root {
	--hsap-bg:        #14171c; /* bar background        */
	--hsap-fg:        #ffffff; /* primary text          */
	--hsap-muted:     #9aa3ad; /* secondary text        */
	--hsap-accent:    #ec6861; /* play button / live dot — Hurrdat Sports brand */
	--hsap-accent-fg: #ffffff; /* text/icon on accent   */
	--hsap-track:     #3a414b; /* seek bar track        */
	--hsap-height:    72px;
	--hsap-z:         99990;   /* below modal/overlays, above page chrome */
}

.hsap[role="region"] {
  position: fixed;
}

.hsap {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0; /* TOP BAR: change to `top: 0;` and adjust your header offset. */
	z-index: var(--hsap-z);
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: var(--hsap-height);
	padding: 8px 14px;
	box-sizing: border-box;
	background: var(--hsap-bg);
	color: var(--hsap-fg);
	font-family: inherit;
	box-shadow: 0 -2px 14px rgba( 0, 0, 0, 0.35 );
	transform: translateY( 0 );
	animation: hsap-slide-up 0.28s ease;
	max-width: 100%;
	overflow: hidden;
}

@keyframes hsap-slide-up {
	from { transform: translateY( 100% ); }
	to   { transform: translateY( 0 ); }
}

/* Play / pause */
.hsap__play {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--hsap-accent);
	color: var(--hsap-accent-fg);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: transform 0.12s ease, filter 0.12s ease;
}
.hsap__play:hover  { filter: brightness( 1.08 ); }
.hsap__play:active { transform: scale( 0.94 ); }
.hsap__play svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

/* Icon state: show play by default, swap to pause while playing.
   (SVG elements don't reflect the `hidden` JS property, so we toggle a
   class on the bar instead — this is what actually flips the icon.) */
.hsap__icon-pause { display: none; }
.hsap.is-playing .hsap__icon-play  { display: none; }
.hsap.is-playing .hsap__icon-pause { display: block; }

/* Artwork */
.hsap__art {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	object-fit: cover;
	background: #20242b;
}

/* Meta (status + brand + episode) */
.hsap__meta {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}
.hsap__status {
	font-size: 11px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--hsap-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hsap.is-live .hsap__status {
	color: var(--hsap-accent);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.hsap.is-live .hsap__status::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--hsap-accent);
	animation: hsap-pulse 1.4s ease-in-out infinite;
}
@keyframes hsap-pulse {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.3; }
}
.hsap__title {
	font-size: 14px;
	font-weight: 600;
	color: var(--hsap-fg);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.hsap__ep {
	font-size: 12.5px;
	color: var(--hsap-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Seek (on-demand only) */
.hsap__seek {
	flex: 1 1 320px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: 420px;
}
.hsap__range {
	width: 100%;
	height: 4px;
	-webkit-appearance: none;
	appearance: none;
	background: var(--hsap-track);
	border-radius: 999px;
	cursor: pointer;
}
.hsap__range::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--hsap-accent);
	cursor: pointer;
}
.hsap__range::-moz-range-thumb {
	width: 14px;
	height: 14px;
	border: 0;
	border-radius: 50%;
	background: var(--hsap-accent);
	cursor: pointer;
}
.hsap__time {
	font-size: 11px;
	color: var(--hsap-muted);
	font-variant-numeric: tabular-nums;
}

/* YouTube fallback link */
.hsap__yt {
	flex: 0 0 auto;
	font-size: 12px;
	font-weight: 600;
	color: var(--hsap-fg);
	text-decoration: underline;
	text-underline-offset: 2px;
	white-space: nowrap;
}
.hsap__yt:hover { color: var(--hsap-accent); }

/* Close */
.hsap__close {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	color: var(--hsap-muted);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	border-radius: 6px;
}
.hsap__close:hover { color: var(--hsap-fg); }

/* Keyboard focus — visible on every control */
.hsap :focus-visible {
	outline: 2px solid var(--hsap-accent);
	outline-offset: 2px;
}

/* The `hidden` attribute must always win. Divi's global svg reset can override
   it, which makes both the play and pause icons show at once — this restores
   the intended behavior. */
.hsap [hidden] {
	display: none !important;
}

/* Mobile: hide the inline seek bar (lock-screen + tap play/pause cover it) */
@media ( max-width: 640px ) {
	.hsap__seek { display: none; }
	.hsap__title { font-size: 13px; }
}

/* Respect reduced-motion preferences */
@media ( prefers-reduced-motion: reduce ) {
	.hsap { animation: none; }
	.hsap.is-live .hsap__status::before { animation: none; }
}
