/* ==========================================================================
   BSF Media Library Detail Page Demo
   Exact scale, dimensions, and studio black (#181818) + soft pink (#fae3ee) palette
   Matching BSF Auto Sync, BSF Downloader, BSF Notes & BSF Drawer demo
   ========================================================================== */

.public-studio .website-media-library-demo {
  padding: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #181818 !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
  transition: transform 0.28s cubic-bezier(0.2,0.8,0.2,1), border-color 0.28s ease, box-shadow 0.28s ease !important;
}

.public-studio .website-media-library-demo:hover {
  transform: translateY(-4px) !important;
  border-color: #ff72ac !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 114, 172, 0.28) !important;
}

.mld-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.mld-heading small {
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #fae3ee;
  text-transform: uppercase;
}

.public-studio .website-media-library-demo .mld-heading h2 {
  font-size: 18px;
  line-height: 1.4;
  margin: 8px 0 0;
  letter-spacing: -0.4px;
  color: #ffffff !important;
}

.mld-controls {
  display: flex;
  gap: 6px;
}

.mld-controls button {
  background: #251b21 !important;
  border: 1px solid rgba(250, 227, 238, 0.26) !important;
  color: #fae3ee !important;
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease !important;
}

.mld-controls button:hover {
  background: rgba(250, 227, 238, 0.18) !important;
  border-color: #fae3ee !important;
  color: #ffffff !important;
}

.mld-scene {
  display: block;
  width: 100%;
  height: auto;
  overflow: hidden;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  flex: none;
  margin-block: auto;
}

/* SVG Scene Theming */
.mld-window {
  fill: #1c1519;
  stroke: rgba(250, 227, 238, 0.18);
  stroke-width: 1;
}

.mld-window-line {
  stroke: rgba(250, 227, 238, 0.14);
}

.mld-window-title {
  font-size: 8px;
  letter-spacing: 1.6px;
  fill: #9e9e9e;
}

.mld-eyebrow {
  font-size: 7.5px;
  letter-spacing: 1.6px;
  fill: #9e9e9e;
  font-weight: 600;
}

.mld-brand {
  font-size: 20px;
  font-weight: 700;
  fill: #fae3ee;
}

.mld-free-bg {
  fill: #20382e;
  stroke: #385f4b;
  stroke-width: 0.8;
}

.mld-free {
  font-size: 8.5px;
  font-weight: 700;
  fill: #bce4cd;
}

/* Sidebar Styles */
.mld-sidebar-bg {
  fill: #191417;
  stroke: rgba(250, 227, 238, 0.14);
  stroke-width: 1;
}

.mld-search-box {
  fill: #141013;
  stroke: rgba(250, 227, 238, 0.18);
  stroke-width: 0.8;
}

.mld-search-text {
  font-size: 7.5px;
  fill: #8e868c;
}

.mld-section-lbl {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 1.2px;
  fill: #8e868c;
}

.mld-folder-item {
  cursor: pointer;
  transition: all 0.2s ease;
}

.mld-folder-active rect {
  fill: rgba(250, 227, 238, 0.14);
  stroke: rgba(250, 227, 238, 0.4);
  stroke-width: 0.8;
}

.mld-folder-item text {
  font-size: 8px;
  fill: #baaab4;
}

.mld-folder-active text {
  fill: #ffffff;
  font-weight: 700;
}

.mld-folder-badge {
  font-size: 7px;
  fill: #8e868c;
}

.mld-folder-active .mld-folder-badge {
  fill: #fae3ee;
  font-weight: 600;
}

/* Player in Sidebar */
.mld-player-panel {
  fill: #141013;
  stroke: rgba(250, 227, 238, 0.2);
  stroke-width: 0.9;
}

.mld-player-screen {
  fill: #1c151a;
  stroke: rgba(250, 227, 238, 0.22);
  stroke-width: 0.8;
}

/* Grid & Cards */
.mld-grid-bg {
  fill: #1a1518;
  stroke: rgba(250, 227, 238, 0.14);
  stroke-width: 1;
}

.mld-folder-title {
  font-size: 11px;
  font-weight: 700;
  fill: #ffffff;
}

.mld-folder-sub {
  font-size: 7px;
  fill: #8e868c;
}

.mld-card-bg {
  fill: #1e181c;
  stroke: rgba(250, 227, 238, 0.16);
  stroke-width: 1;
  transition: all 0.2s ease;
}

.mld-card-hero-bg {
  fill: #221920;
  stroke: rgba(250, 227, 238, 0.35);
  stroke-width: 1.1;
}

.mld-card-title {
  font-size: 7.5px;
  fill: #baaab4;
  font-weight: 500;
}

.mld-card-time {
  font-size: 7px;
  fill: #8e868c;
}

.mld-action-card {
  fill: #241a21;
  stroke: rgba(250, 227, 238, 0.22);
  stroke-width: 1;
}

.mld-action-text {
  font-size: 8px;
  fill: #fae3ee;
}

/* Status Indicator */
.mld-status-bg {
  fill: #1c161a;
  stroke: rgba(250, 227, 238, 0.14);
  stroke-width: 1;
}

.mld-status {
  font-size: 8px;
  fill: #fae3ee;
}

/* Timeline */
.mld-timeline {
  fill: #161214;
  stroke: rgba(250, 227, 238, 0.12);
  stroke-width: 1;
}

.mld-sequence {
  font-size: 8px;
  fill: #9e9e9e;
}

.mld-track-label {
  font-size: 8px;
  fill: #8e8e8e;
}

/* Steps list below */
.mld-steps {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(250, 227, 238, 0.12);
  padding-top: 12px;
}

.mld-steps li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #9e9e9e !important;
}

.mld-steps b {
  color: #fae3ee !important;
  font-size: 10px;
}

/* Animated Cursor & Keyframes */
.mld-cursor {
  pointer-events: none;
}

.mld-play[data-running="true"] .mld-cursor-anim {
  animation: mld-cursor-loop 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-click-folder {
  animation: mld-click-pulse-folder 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-click-card {
  animation: mld-click-pulse-card 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-card1-active {
  animation: mld-card1-glow 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-playhead-sweep {
  animation: mld-sweep-anim 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-player-sweep {
  animation: mld-player-sweep-anim 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-drag-ghost {
  animation: mld-drag-ghost-anim 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-dropped-clip {
  animation: mld-dropped-clip-anim 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-act-init {
  animation: mld-act-init-anim 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-act-success {
  animation: mld-act-success-anim 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-st-init {
  animation: mld-st-init-anim 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-st-playing {
  animation: mld-st-playing-anim 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-st-dragging {
  animation: mld-st-dragging-anim 14s linear infinite both;
}

.mld-play[data-running="true"] .mld-st-dropped {
  animation: mld-st-dropped-anim 14s linear infinite both;
}

/* ==========================================================================
   Keyframe Details (14s Loop Cycle)
   0.0s - 1.2s : Move to folder in sidebar and click
   1.2s - 2.8s : Move to Card 1 in grid
   2.8s - 4.8s : Hover Card 1, Player plays waveform, playhead sweeps
   4.8s - 5.2s : Click down on Card 1
   5.2s - 7.5s : Drag Card 1 down to Premiere timeline track A1
   7.5s - 12.5s: Drop clip, track A1 active with waveform, success banner
   12.5s - 14.0s: Reset loop smoothly
   ========================================================================== */

@keyframes mld-cursor-loop {
  0% {
    transform: translate(320px, 320px);
    opacity: 0;
  }
  3% {
    opacity: 1;
  }
  /* Move to Cinematic SFX folder in sidebar */
  10% {
    transform: translate(80px, 144px);
  }
  /* Click folder */
  12% {
    transform: translate(80px, 144px) scale(0.92);
  }
  14% {
    transform: translate(80px, 185px) scale(1);
  }
  /* Move to Card 1 in grid */
  23% {
    transform: translate(250px, 160px);
  }
  /* Hover & listen */
  33% {
    transform: translate(255px, 162px);
  }
  /* Click & hold Card 1 */
  35% {
    transform: translate(255px, 162px) scale(0.9);
  }
  37% {
    transform: translate(255px, 162px) scale(0.92);
  }
  /* Dragging down towards timeline track A1 (x=210, y=508) */
  45% {
    transform: translate(232px, 335px) scale(0.92);
  }
  53% {
    transform: translate(210px, 508px) scale(0.92);
  }
  /* Release drop */
  55% {
    transform: translate(210px, 508px) scale(1);
  }
  /* Move aside peacefully */
  60%, 88% {
    transform: translate(280px, 470px);
    opacity: 1;
  }
  94% {
    transform: translate(320px, 350px);
    opacity: 0;
  }
  100% {
    transform: translate(320px, 320px);
    opacity: 0;
  }
}

@keyframes mld-click-pulse-folder {
  0%, 10% {
    opacity: 0;
    transform: scale(0.4);
  }
  12% {
    opacity: 0.85;
    transform: scale(1.1);
  }
  16% {
    opacity: 0;
    transform: scale(1.6);
  }
  100% {
    opacity: 0;
  }
}

@keyframes mld-click-pulse-card {
  0%, 34% {
    opacity: 0;
    transform: scale(0.4);
  }
  36% {
    opacity: 0.9;
    transform: scale(1.15);
  }
  40% {
    opacity: 0;
    transform: scale(1.7);
  }
  100% {
    opacity: 0;
  }
}

@keyframes mld-card1-glow {
  0%, 20% {
    stroke: rgba(250, 227, 238, 0.16);
    fill: #1e181c;
  }
  23%, 36% {
    stroke: #ff72ac;
    fill: #281c24;
    filter: drop-shadow(0 0 8px rgba(255, 114, 172, 0.4));
  }
  37%, 100% {
    stroke: rgba(250, 227, 238, 0.2);
    fill: #1e181c;
  }
}

@keyframes mld-sweep-anim {
  0%, 22% {
    transform: translateX(0);
    opacity: 0;
  }
  24% {
    opacity: 1;
  }
  36% {
    transform: translateX(110px);
    opacity: 1;
  }
  37%, 100% {
    opacity: 0;
    transform: translateX(110px);
  }
}

@keyframes mld-player-sweep-anim {
  0%, 22% {
    transform: translateX(0);
    opacity: 0;
  }
  24% {
    opacity: 1;
  }
  36% {
    transform: translateX(100px);
    opacity: 1;
  }
  37%, 100% {
    opacity: 0;
    transform: translateX(100px);
  }
}

@keyframes mld-drag-ghost-anim {
  0%, 36% {
    opacity: 0;
    transform: translate(255px, 162px) scale(0.9);
  }
  37% {
    opacity: 0.95;
    transform: translate(255px, 162px) scale(1);
  }
  45% {
    opacity: 0.95;
    transform: translate(232px, 335px) scale(1) rotate(1.5deg);
  }
  53% {
    opacity: 0.95;
    transform: translate(210px, 508px) scale(1) rotate(0deg);
  }
  54%, 100% {
    opacity: 0;
    transform: translate(210px, 508px) scale(0.9);
  }
}

@keyframes mld-dropped-clip-anim {
  0%, 53% {
    opacity: 0;
    transform: translateY(6px);
  }
  55% {
    opacity: 1;
    transform: translateY(0);
  }
  88% {
    opacity: 1;
    transform: translateY(0);
  }
  94%, 100% {
    opacity: 0;
    transform: translateY(4px);
  }
}

@keyframes mld-act-init-anim {
  0%, 53% {
    opacity: 1;
  }
  54%, 88% {
    opacity: 0;
  }
  92%, 100% {
    opacity: 1;
  }
}

@keyframes mld-act-success-anim {
  0%, 53% {
    opacity: 0;
    transform: translateY(2px);
  }
  54%, 88% {
    opacity: 1;
    transform: translateY(0);
  }
  92%, 100% {
    opacity: 0;
  }
}

@keyframes mld-st-init-anim {
  0%, 20% {
    opacity: 1;
  }
  21%, 91% {
    opacity: 0;
  }
  92%, 100% {
    opacity: 1;
  }
}

@keyframes mld-st-playing-anim {
  0%, 20% {
    opacity: 0;
  }
  21%, 35% {
    opacity: 1;
  }
  36%, 100% {
    opacity: 0;
  }
}

@keyframes mld-st-dragging-anim {
  0%, 35% {
    opacity: 0;
  }
  36%, 53% {
    opacity: 1;
  }
  54%, 100% {
    opacity: 0;
  }
}

@keyframes mld-st-dropped-anim {
  0%, 53% {
    opacity: 0;
    transform: translateY(2px);
  }
  54%, 88% {
    opacity: 1;
    transform: translateY(0);
  }
  92%, 100% {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .public-studio .website-media-library-demo {
    max-width: 620px;
    width: 100%;
    justify-self: center;
  }
}

@media (max-width: 420px) {
  .public-studio .website-media-library-demo {
    padding: 14px;
  }
  .mld-heading {
    flex-direction: column;
    gap: 8px;
  }
  .mld-heading .mld-controls {
    align-self: flex-end;
  }
  .public-studio .website-media-library-demo .mld-heading h2 {
    font-size: 16px;
  }
  .public-studio .website-media-library-demo .mld-steps li {
    font-size: 9px;
    gap: 3px;
  }
  .mld-steps {
    gap: 5px;
  }
}

