/* Generated by src/build.js (rtlcss) from css/components/audio-page.css — LTR version, do not edit: edit css/components/audio-page.css and rebuild */
/* ==========================================================================
   audio-page.css — audio series page: the series player (blue now-playing
   panel + track list) inside the details card, under the languages
   (.mp-media, material-page.css), and the mini player pinned to the bottom.
   Page head, details card, translations and related cards come from
   material-page.css; shared player pieces from media-player.css.
   ========================================================================== */

/* Player: now-playing panel, then the track list */
.apl {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --------------------------------------------------------------------------
   Now playing: blue panel (same blue + ornament as the services band)
   -------------------------------------------------------------------------- */
.apl__now {
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 32px 40px 28px;
  border-radius: 24px;
  background:
    radial-gradient(60% 90% at 50% 0%, rgba(255, 255, 255, .12) 0%, rgba(255, 255, 255, 0) 70%),
    var(--color-blue-500);
  box-shadow: 0 30px 60px -40px rgba(26, 43, 69, .8);
}

.apl__orn {
  position: absolute;
  z-index: -1;
  top: -100px;
  right: -110px;
  width: 440px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: .08;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 30%, transparent 100%);
}

.apl__head {
  display: flex;
  align-items: center;
  gap: 20px;
}

.apl__art {
  position: relative;
  flex: none;
  width: 104px;
  height: 104px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--color-blue-700);
  box-shadow: 0 18px 30px -18px rgba(10, 20, 35, .8), 0 0 0 1px rgba(255, 255, 255, .14);
}

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

.apl__meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.apl__eyebrow {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, .78);
}

.apl__title {
  margin: 0;
  font-family: 'Almarai', 'Cairo', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--color-white);
}

.apl__by {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-cream-400);
}

.apl__opts {
  flex: none;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* timeline + transport */
.apl__now .mpl__ctrl {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.apl__seek {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.apl__seek .mpl__t {
  min-width: 44px;
  color: rgba(255, 255, 255, .9);
}

.apl__seek .mpl__t:last-child {
  text-align: right; /* inside the left-to-right controls (both page directions) */
}

.apl__btns {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

/* main play button: gold, like the play mark on the video covers */
.mpl__play {
  position: relative;
  flex: none;
  width: 72px;
  height: 72px;
  margin: 0 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--mpl-gold);
  color: var(--mpl-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 0 8px rgba(255, 255, 255, .12), 0 16px 30px -14px rgba(10, 20, 35, .7);
  transition: background .2s ease;
}

.mpl__play:hover {
  background: var(--mpl-gold-hover);
}

.mpl__play .mpl__i-play {
  margin-left: 4px; /* optical centre of the triangle (it always points right) */
}

.mpl__play .mpl__spin {
  position: absolute;
  inset: -6px;
  border-color: rgba(255, 255, 255, .2);
  border-top-color: var(--color-white);
}

.apl__now .mpl__err {
  align-self: center;
}

/* --------------------------------------------------------------------------
   Equalizer bars (artwork + the playing row); they move only while playing
   -------------------------------------------------------------------------- */
.apl__eq {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.apl__eq i {
  display: block;
  width: 4px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: bottom;
  transform: scaleY(.35);
  animation: apl-eq 1s ease-in-out infinite;
  animation-play-state: paused;
}

.apl__eq i:nth-child(2) { animation-delay: -.45s; }
.apl__eq i:nth-child(3) { animation-delay: -.2s; }
.apl__eq i:nth-child(4) { animation-delay: -.7s; }

@keyframes apl-eq {
  0%, 100% { transform: scaleY(.3); }
  50%      { transform: scaleY(1); }
}

.apl__art .apl__eq {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 7px;
  border-radius: 10px;
  background: rgba(26, 43, 69, .72);
  color: var(--color-white);
  opacity: 0;
  transition: opacity .25s ease;
}

.apl.is-playing .apl__art .apl__eq {
  opacity: 1;
}

.apl.is-playing .apl__eq i {
  animation-play-state: running;
}

/* --------------------------------------------------------------------------
   Track list
   -------------------------------------------------------------------------- */
.apl__listhd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px 12px;
  border-bottom: 1px solid var(--mp-line-soft);
  margin-bottom: 8px;
}

.apl__listttl {
  font-size: 17px;
  font-weight: 800;
  color: var(--mp-navy);
}

.apl__listsum {
  font-size: 14px;
  font-weight: 700;
  color: var(--mp-muted);
}

.apl__tracks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.apl__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline-end: 8px;
  border-radius: 20px;
  transition: background .2s ease;
}

.apl__item:hover {
  background: var(--color-mist-100);
}

.apl__item:has(.apl__track[aria-current="true"]) {
  background: var(--color-blue-50);
}

.apl__track {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: var(--mp-navy);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.apl__track:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 117, 150, .35);
}

.apl__n {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-blue-50);
  color: var(--mp-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  transition: background .2s ease, color .2s ease;
}

.apl__track[aria-current="true"] .apl__n {
  background: var(--mp-blue);
  color: var(--color-white);
}

.apl__eq--sm {
  display: none;
  height: 14px;
  gap: 2px;
}

.apl__eq--sm i {
  width: 3px;
}

.apl.is-playing .apl__track[aria-current="true"] .apl__num {
  display: none;
}

.apl.is-playing .apl__track[aria-current="true"] .apl__eq--sm {
  display: flex;
}

.apl__txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.apl__ttl {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apl__track[aria-current="true"] .apl__ttl {
  color: var(--mp-blue);
}

.apl__sub {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-slate-500) /* at least 4.9:1, also on the highlighted row */;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apl__dur {
  flex: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-slate-500);
  font-variant-numeric: tabular-nums;
}

/* per-track download (same round button as the details tools) */
.apl__dl {
  flex: none;
  width: 42px;
  height: 42px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 1px solid var(--mp-line);
  background: var(--color-white);
  color: var(--mp-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.apl__dl svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.apl__dl:hover {
  background: var(--hover-fill);
  border-color: var(--hover-fill);
  color: var(--color-white);
}

.apl__dl:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(59, 117, 150, .25);
}

/* --------------------------------------------------------------------------
   Mini player (fixed, bottom centre)
   -------------------------------------------------------------------------- */
.apm {
  --p: 0%;
  position: fixed;
  z-index: 90;
  right: 0;
  left: 0;
  bottom: 16px;
  width: min(560px, calc(100vw - 24px));
  margin: 0 auto;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 24px;
  background: var(--color-blue-500);
  color: var(--color-white);
  box-shadow: 0 24px 48px -18px rgba(15, 26, 44, .65), 0 0 0 1px rgba(255, 255, 255, .08);
  animation: apm-up .35s cubic-bezier(.22, .61, .36, 1);
}

.apm[hidden] {
  display: none;
}

.apm.is-closing {
  animation: apm-down .25s cubic-bezier(.4, 0, 1, 1) forwards;
}

@keyframes apm-up {
  from { opacity: 0; transform: translateY(24px); }
}

@keyframes apm-down {
  to { opacity: 0; transform: translateY(24px); }
}

/* while the series is active, the footer ends with room for the pinned bar */
body.has-mini .ft__bottom {
  padding-bottom: 122px;
}

/* progress line along the top edge (left-to-right like the timeline) */
.apm__bar {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, .2);
}

.apm__fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0; /* playback progress runs left-to-right in both page directions */
  width: var(--p);
  background: var(--color-white);
}

.apm__in {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 9px 10px;
}

.apm__art {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
}

.apm__txt {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.apm__ttl {
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apm__sub {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .8);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.apm__btn {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

.apm__btn svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.apm__btn:disabled {
  opacity: .35;
  cursor: default;
}

@media (hover: hover) {
  .apm__btn:not(:disabled):not(.apm__btn--play):hover {
    background: var(--hover-cream);
    border-color: var(--hover-cream-border);
    color: var(--hover-cream-ink);
  }
}

.apm__btn--play {
  width: 46px;
  height: 46px;
  background: var(--color-gold-500);
  color: var(--color-navy-700);
}

.apm__btn--play:hover {
  background: var(--color-gold-300);
}

.apm__btn--play .mpl__i-play {
  margin-left: 3px;
}

.apm .mpl__i-pause {
  display: none;
}

.apm.is-playing .mpl__i-play {
  display: none;
}

.apm.is-playing .mpl__i-pause {
  display: block;
}

.apm__btn:focus-visible,
.apm__txt:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .85);
  border-radius: 12px;
}

.apm__btn:focus-visible {
  border-radius: 50%;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .apl__now {
    padding: 28px 24px 24px;
  }

  .apl__title {
    font-size: 24px;
  }
}

@media (max-width: 640px) {
  .apl__now {
    gap: 20px;
    padding: 22px 16px 20px;
    border-radius: 20px;
  }

  .apl__head {
    flex-wrap: wrap;
    gap: 14px;
  }

  .apl__art {
    width: 76px;
    height: 76px;
    border-radius: 18px;
  }

  .apl__meta {
    flex-basis: calc(100% - 90px);
  }

  .apl__title {
    font-size: 20px;
  }

  .apl__by {
    font-size: 14px;
  }

  /* speed / volume move under the title row, to the far side */
  .apl__opts {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-end; /* the row is dir="ltr": far side from the artwork (left in RTL, right in LTR) */
    margin-top: -6px;
  }

  .apl__btns {
    gap: 4px;
  }

  .mpl__play {
    width: 64px;
    height: 64px;
    margin: 0 4px;
  }

  .apl__listhd {
    padding: 6px 8px 10px;
  }

  .apl__item {
    padding-inline-end: 6px;
  }

  .apl__track {
    gap: 10px;
    padding: 10px 8px;
  }

  .apl__n {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }

  /* phones: the track title wraps to two lines instead of being cut off */
  .apl__ttl {
    font-size: 15px;
    line-height: 1.45;
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .apl__dl {
    width: 38px;
    height: 38px;
  }

  .apm {
    bottom: 10px;
    width: calc(100vw - 20px);
    border-radius: 20px;
  }
}

@media (max-width: 400px) {
  .apl__dur {
    font-size: 12.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apl__eq i {
    animation: none;
    transform: scaleY(.7);
  }

  .apm,
  .apm.is-closing {
    animation-duration: .01s;
  }
}
