/* finish17 media-spacing increment
   Scope: video-card text spacing, mini-player controls, 320px podcast dock.
   Intentionally does not alter media lifecycle, sorting, focus, touch, or motion.
*/

/* Keep video-card text away from the thumbnail/card edge without changing the player. */
.fmc-video-body {
  padding:12px 16px 16px;
}

.fmc-video-meta {
  min-width: 0;
  gap:12px;
  align-items: center;
}

.fmc-video-meta > * {
  min-width: 0;
}

.fmc-video-fallback {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Mini-player: preserve the light, text-first treatment while giving every
   control a stable touch target and keeping the caption from crowding it. */
.fmc-video-card[data-mini] .fmc-player-bar {
  display: flex;
  align-items: center;
  gap:4px;
  padding:4px 8px;
}

.fmc-player-caption {
  flex: 1 1 auto;
  min-width: 0;
  padding-left: .2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fmc-player-bar button {
  flex: 0 0 auto;
  min-height: 40px;
  min-width: 40px;
  padding:4px 8px;
  border: 0;
  background: transparent;
  white-space: nowrap;
}

/* At 320px, give the dock a full-width title row and a separate control row.
   This keeps the status line readable without changing playback behavior. */
@media (max-width: 560px) {
  .fmc-podcast-dock {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:"title title title" "time time time" "play restart close";
    gap:4px 4px;
    padding:8px 8px;
  }

  .fmc-podcast-dock-title {
    grid-area: title;
    min-width: 0;
    line-height: 1.25;
    white-space: normal;
    overflow: hidden;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .fmc-podcast-dock-time {
    grid-area: time;
    min-width: 0;
    align-self: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .fmc-podcast-dock-toggle {
    grid-area: play;
    justify-self: start;
  }

  .fmc-podcast-dock-restart {
    grid-area: restart;
  }

  .fmc-podcast-dock-close {
    grid-area: close;
  }

  .fmc-podcast-dock button {
    grid-row: auto;
    min-width: 44px;
    min-height: 44px;
    padding:4px 8px;
  }

  body:has(.fmc-podcast-dock:not([hidden])) {
    padding-bottom: 6.5rem;
  }
}
