/*
 * bb-podcast-player.css
 * Sticky mini-player — collapsed + expanded states. Lot 7, redrawn Lot 33 on the
 * season-page maquette (maquettes/saison/ : green bar, peach round play button,
 * cover · meta + title · play · next · position · speed · close).
 * Depends on bb-podcast-tokens.css. Breakpoints 768 / 992 / 1280. z-index 999999 (over Elementor overlays).
 * DOM is built by bb-podcast-player.js.
 *
 * Responsive : the collapsed bar always keeps cover, title, play, next and
 * close. The position range appears from 992px, the speed button from 768px ;
 * below that they live in the expanded panel (tap the title or the chevron).
 */

.bbp-mini {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: var(--bb-mini-z);
  background: var(--bb-green); color: #fff;
  font-family: var(--bb-font-body); font-optical-sizing: none;
  border-top: 1px solid var(--bb-green-line);
  box-shadow: 0 -3px 25px rgba(0, 0, 0, .13);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  transform: translateY(100%);
  transition: transform .34s var(--bb-ease);
}
.bbp-mini.is-visible { transform: translateY(0); }
.bbp-mini[hidden] { display: none; }

/* The bar must never sit on top of the page's last lines or links : while it is
   open the page gets the bar's height as bottom padding (the JS publishes it). */
body.bbp-mini-open { padding-bottom: calc(var(--bbp-mini-h, 76px) + env(safe-area-inset-bottom, 0px)); }

/* thin progress line on the top edge */
.bbp-mini__progress-edge { height: 3px; background: rgba(250, 247, 242, .14); position: relative; }
.bbp-mini__progress-edge > i { position: absolute; inset: 0; width: 0; background: var(--bb-gold); }

.bbp-mini__inner {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; max-width: var(--bb-maxw); margin-inline: auto;
}
@media (min-width: 768px) { .bbp-mini__inner { padding: 12px 25px; gap: 14px; } }
@media (min-width: 992px) { .bbp-mini__inner { gap: 18px; padding-inline: 40px; } }
@media (min-width: 1280px) { .bbp-mini__inner { padding-inline: 60px; } }
@media (min-width: 1731px) { .bbp-mini__inner { padding-inline: 80px; } }

.bbp-mini__cover { width: 40px; height: 40px; border-radius: 3px; flex: none; background: rgba(250, 247, 242, .1); object-fit: cover; }
.bbp-mini__cover:not([src]) { visibility: hidden; }
@media (min-width: 768px) { .bbp-mini__cover { width: 48px; height: 48px; } }

/* title block : meta line (peach caps) over the title, one line each */
.bbp-mini__id {
  min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 1px;
  max-width: 310px;
  background: none; border: 0; padding: 4px 0; margin: 0;
  text-align: left; color: inherit; font: inherit; cursor: pointer;
}
.bbp-mini__s {
  display: block; order: 1; font-size: 10px; font-weight: 600; letter-spacing: .06em; line-height: 1.4; text-transform: uppercase;
  color: var(--bb-gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bbp-mini__t {
  display: block; order: 2; font-family: var(--bb-font-body); font-weight: 500; font-size: 13px; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 768px) { .bbp-mini__t { font-size: 14px; } }

.bbp-mini__main { display: flex; align-items: center; gap: 2px; flex: none; }
@media (min-width: 768px) { .bbp-mini__btn { width: 44px; height: 44px; } .bbp-mini__main { gap: 4px; } }

/* position : range + times — from 992px */
.bbp-mini__mid { display: none; flex: 1; align-items: center; gap: 10px; min-width: 0; }
@media (min-width: 992px) { .bbp-mini__mid { display: flex; } }
.bbp-mini__time { font-size: 11px; font-variant-numeric: tabular-nums; color: rgba(250, 247, 242, .8); flex: none; }

.bbp-mini__range {
  -webkit-appearance: none; appearance: none; flex: 1; min-width: 0; width: 100%; height: 24px; margin: 0; padding: 0;
  background: transparent; cursor: pointer; --bbp-fill: 0%;
}
.bbp-mini__range:disabled { cursor: default; opacity: .5; }
.bbp-mini__range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 99px;
  background: linear-gradient(to right, var(--bb-gold) var(--bbp-fill), rgba(250, 247, 242, .22) var(--bbp-fill));
}
.bbp-mini__range::-moz-range-track { height: 4px; border-radius: 99px; background: rgba(250, 247, 242, .22); }
.bbp-mini__range::-moz-range-progress { height: 4px; border-radius: 99px; background: var(--bb-gold); }
.bbp-mini__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%;
  background: var(--bb-gold); border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.bbp-mini__range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--bb-gold); border: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.bbp-mini__range:focus-visible { outline: 2px solid var(--bb-gold); outline-offset: 3px; border-radius: 4px; }

.bbp-mini__btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center; padding: 0;
  background: transparent; border: none; color: #fff; cursor: pointer;
  position: relative; font-size: 9px; font-weight: 700;
  transition: background .16s, opacity .16s;
}
.bbp-mini__btn:hover:not(:disabled) { background: rgba(250, 247, 242, .12); }
.bbp-mini__btn:disabled { opacity: .35; cursor: default; }
.bbp-mini__btn svg { width: 18px; height: 18px; }
.bbp-mini__btn--play { background: var(--bb-gold); color: var(--bb-green); }
.bbp-mini__btn--play:hover:not(:disabled) { background: #fff; }
.bbp-mini__btn--play svg { width: 16px; height: 16px; }
.bbp-mini__btn--seek span { position: absolute; bottom: 5px; right: 4px; font-size: 9px; }
.bbp-mini__btn--next svg { width: 18px; height: 18px; }

/* loading : the icon gives way to a spinner (the audio has not started yet) */
.bbp-mini__spin { display: none; position: absolute; inset: 11px; border-radius: 50%; border: 2px solid rgba(4, 66, 41, .25); border-top-color: var(--bb-green); animation: bbp-mini-spin .8s linear infinite; }
.bbp-mini [data-state="loading"] .bbp-mini__spin,
.bbp-mini[data-state="loading"] .bbp-mini__spin { display: block; }
.bbp-mini[data-state="loading"] .bbp-mini__btn--play svg { opacity: 0; }
@keyframes bbp-mini-spin { to { transform: rotate(360deg); } }

/* error : the meta line carries the message — make it readable, not decorative */
.bbp-mini[data-state="error"] .bbp-mini__s { color: #fff; letter-spacing: .02em; text-transform: none; font-weight: 600; white-space: normal; }
.bbp-mini[data-state="error"] .bbp-mini__progress-edge > i { background: #E7A38E; }

.bbp-mini__speed {
  display: none; min-width: 44px; height: 44px; padding: 0 6px; flex: none;
  background: transparent; border: 0; border-radius: 22px; color: #fff; font: 600 12px/1 var(--bb-font-body);
  font-variant-numeric: tabular-nums; cursor: pointer; transition: background .16s;
}
.bbp-mini__speed:hover { background: rgba(250, 247, 242, .12); }
@media (min-width: 768px) { .bbp-mini__speed { display: block; } }

.bbp-mini__close svg { width: 18px; height: 18px; }
/* chevron button only where there is room for it and the position / speed are not in the bar ;
   on phones the title block itself opens the panel, hinted by a small caret. */
.bbp-mini__chevron { display: none; }
@media (min-width: 768px) { .bbp-mini__chevron { display: grid; } }
@media (min-width: 992px) { .bbp-mini__chevron { display: none; } }
.bbp-mini__id { position: relative; padding-right: 14px; }
.bbp-mini__id::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-top: 2px solid rgba(250, 247, 242, .7); border-left: 2px solid rgba(250, 247, 242, .7); transform: rotate(45deg);
}
.bbp-mini.is-expanded .bbp-mini__id::after { margin-top: -8px; transform: rotate(225deg); }
@media (min-width: 768px) { .bbp-mini__id::after { display: none; } .bbp-mini__id { padding-right: 0; } }

/* ---- expanded ---- */
.bbp-mini.is-expanded { border-radius: 18px 18px 0 0; }
.bbp-mini__expand { padding: 4px 14px 18px; max-width: var(--bb-maxw); margin-inline: auto; display: grid; gap: 14px; }
.bbp-mini__expand[hidden] { display: none; }
@media (min-width: 768px) { .bbp-mini__expand { padding-inline: 25px; } }
.bbp-mini.is-expanded .bbp-mini__chevron svg { transform: rotate(180deg); }

.bbp-mini__expand-grid { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; }
.bbp-mini__expand-cover { width: 64px; height: 64px; border-radius: 4px; background: rgba(250, 247, 242, .1); object-fit: cover; }
.bbp-mini__expand-cover:not([src]) { visibility: hidden; }
.bbp-mini__expand-s { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--bb-gold); }
.bbp-mini[data-state="error"] .bbp-mini__expand-s { color: #fff; letter-spacing: .02em; text-transform: none; }
.bbp-mini__expand-t { font-family: var(--bb-font-body); font-weight: 600; font-size: 17px; line-height: 1.25; }

.bbp-mini__times { display: flex; justify-content: space-between; font-size: 12px;
  font-variant-numeric: tabular-nums; color: rgba(250, 247, 242, .8); margin-top: 2px; }

.bbp-mini__expand-controls { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.bbp-mini__expand-controls .bbp-mini__btn--play { width: 52px; height: 52px; }
.bbp-mini__expand-controls .bbp-mini__btn--play svg { width: 20px; height: 20px; }
.bbp-mini__expand-controls .bbp-mini__btn--play .bbp-mini__spin { inset: 14px; }
.bbp-mini__expand-controls .bbp-mini__speed { display: block; }

.bbp-mini__expand-listen { display: flex; gap: 8px; flex-wrap: wrap; }
.bbp-mini__expand-listen:empty { display: none; }
.bbp-mini__expand-listen a {
  font-size: 12px; font-weight: 600; text-decoration: none; color: rgba(250, 247, 242, .85);
  border: 1px solid var(--bb-green-line); border-radius: 999px; padding: 6px 13px;
}
.bbp-mini__expand-listen a:hover { border-color: var(--bb-gold); color: #fff; }

.bbp-mini__audio { display: none; }
/* announced to screen readers only */
.bbp-mini__live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Nudge other fixed-bottom UI above the bar while it is open.
   Editors can target `body.bbp-mini-open` for any site-specific element. */
body.bbp-mini-open .grecaptcha-badge {
  bottom: calc(var(--bbp-mini-h, 76px) + 12px) !important;
  transition: bottom .3s var(--bb-ease);
}

/* focus */
.bbp-mini :focus-visible { outline: 2px solid var(--bb-gold); outline-offset: 2px; border-radius: 6px; }
.bbp-mini__btn--play:focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .bbp-mini { transition: none; }
  .bbp-mini__spin { animation-duration: 2.4s; }
}
