/* ==========================================================================
   BSF Downloader Detail Page Demo
   Exact scale, dimensions, and soft whitish-pink (#fae3ee) palette
   Matching BSF Auto Sync demo
   ========================================================================== */

.public-studio .website-downloader-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-downloader-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;
}

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

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

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

.dld-controls {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
  padding-top: 3px;
}

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

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

.dld-controls button:disabled {
  opacity: 0.5;
  cursor: default;
}

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

.dld-window {
  fill: #1c1519;
  stroke: rgba(250, 227, 238, 0.18);
  stroke-width: 1;
}

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

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

.dld-eyebrow {
  font-size: 7px;
  letter-spacing: 1.5px;
  fill: #9e9e9e;
}

.dld-brand {
  font-size: 24px;
  font-weight: 700;
  fill: #fae3ee;
  letter-spacing: -0.7px;
}

.dld-pro-bg {
  fill: #20382e;
}

.dld-pro {
  font-size: 9px;
  fill: #bce4cd;
  font-weight: 600;
}

.dld-card {
  fill: #221a1f;
  stroke: rgba(250, 227, 238, 0.15);
  stroke-width: 1;
}

.dld-url-text {
  font-size: 11px;
  fill: #eaeaea;
  font-family: monospace, sans-serif;
}

.dld-btn-check {
  fill: #2e1d27;
  stroke: rgba(250, 227, 238, 0.35);
  stroke-width: 1;
  transition: all 0.2s ease;
}

.dld-btn-check-text {
  font-size: 11px;
  font-weight: 700;
  fill: #fae3ee;
}

.dld-video-title {
  font-size: 13.5px;
  font-weight: 700;
  fill: #ffffff;
}

.dld-video-specs {
  font-size: 10px;
  fill: #b8a6af;
}

.dld-drag-button {
  fill: #281d24;
  stroke: rgba(250, 227, 238, 0.45);
  stroke-width: 1.2;
}

.dld-drag-title {
  font-size: 12.5px;
  font-weight: 700;
  fill: #fae3ee;
}

.dld-drag-sub {
  font-size: 9px;
  fill: #a0939a;
}

.dld-status-bg {
  fill: #1c1519;
  stroke: rgba(250, 227, 238, 0.12);
}

.dld-status {
  font-size: 10px;
  fill: #d4d4d4;
}

.dld-timeline {
  fill: #161214;
  stroke: rgba(250, 227, 238, 0.12);
}

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

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

.dld-click,
.dld-click-drag {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
}

.dld-cursor {
  fill: #fff6fa;
  stroke: #3a202d;
  stroke-width: 1.4;
  filter: drop-shadow(1px 2px 2px rgba(0, 0, 0, 0.6));
}

.public-studio .website-downloader-demo .dld-steps {
  list-style: none;
  padding: 0;
  margin: 15px 0 0;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-shrink: 0;
}

.public-studio .website-downloader-demo .dld-steps li {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 10px;
  line-height: 1.4;
  color: #9e9e9e;
}

.dld-steps b {
  font-size: 8px;
  color: #fae3ee;
}

/* ==========================================================================
   14-Second Animation Timeline
   ========================================================================== */

.dld-play .dld-cursor {
  animation: dld-cursor-anim 14s linear infinite both;
}

.dld-play .dld-click {
  animation: dld-click-anim 14s linear infinite both;
}

.dld-play .dld-click-drag {
  animation: dld-click-drag-anim 14s linear infinite both;
}

.dld-play .dld-btn-check {
  animation: dld-btn-check-anim 14s linear infinite both;
}

.dld-play .dld-badge-downloading {
  animation: dld-badge-dl-anim 14s linear infinite both;
}

.dld-play .dld-badge-ready {
  animation: dld-badge-rd-anim 14s linear infinite both;
}

.dld-play .dld-progress-bar {
  animation: dld-prog-anim 14s linear infinite both;
  transform-origin: 28px center;
}

.dld-play .dld-st-1 {
  animation: dld-step1-anim 14s linear infinite both;
}

.dld-play .dld-st-2 {
  animation: dld-step2-anim 14s linear infinite both;
}

.dld-play .dld-st-3 {
  animation: dld-step3-anim 14s linear infinite both;
}

.dld-play .dld-st-4 {
  animation: dld-step4-anim 14s linear infinite both;
}

.dld-play .dld-status-init {
  animation: dld-stat-init 14s linear infinite both;
}

.dld-play .dld-status-downloading {
  animation: dld-stat-dl 14s linear infinite both;
}

.dld-play .dld-status-ready {
  animation: dld-stat-rd 14s linear infinite both;
}

.dld-play .dld-drag-button {
  animation: dld-btn-drag-anim 14s linear infinite both;
}

.dld-play .dld-drag-ghost {
  animation: dld-ghost-anim 14s linear infinite both;
}

.dld-play .dld-dropped-video,
.dld-play .dld-dropped-audio {
  animation: dld-dropped-anim 14s linear infinite both;
}

[data-downloader-demo][data-running="false"] .dld-animated {
  animation-play-state: paused;
}

/* Keyframes */
@keyframes dld-cursor-anim {
  0%, 3% {
    transform: translate(450px, 480px);
    opacity: 0;
  }
  6% {
    transform: translate(448px, 118px);
    opacity: 1;
  }
  8% {
    transform: translate(448px, 118px) scale(0.88);
    opacity: 1;
  }
  11% {
    transform: translate(448px, 118px) scale(1);
    opacity: 1;
  }
  16%, 60% {
    transform: translate(420px, 220px);
    opacity: 0.8;
  }
  64% {
    transform: translate(260px, 351px);
    opacity: 1;
  }
  66% {
    transform: translate(260px, 351px) scale(0.9);
    opacity: 1;
  }
  /* Dragging down to timeline */
  72% {
    transform: translate(240px, 410px) scale(0.92);
    opacity: 1;
  }
  78% {
    transform: translate(206px, 468px) scale(0.92);
    opacity: 1;
  }
  80% {
    transform: translate(206px, 468px) scale(1);
    opacity: 1;
  }
  85%, 94% {
    transform: translate(460px, 500px);
    opacity: 1;
  }
  98%, 100% {
    transform: translate(460px, 500px);
    opacity: 0;
  }
}

@keyframes dld-click-anim {
  0%, 7%, 12%, 100% {
    opacity: 0;
    transform: scale(0.5);
  }
  8% {
    opacity: 1;
    transform: scale(0.6);
  }
  11% {
    opacity: 0;
    transform: scale(1.8);
  }
}

@keyframes dld-click-drag-anim {
  0%, 65%, 70%, 100% {
    opacity: 0;
    transform: scale(0.5);
  }
  66% {
    opacity: 1;
    transform: scale(0.6);
  }
  69% {
    opacity: 0;
    transform: scale(1.8);
  }
}

@keyframes dld-btn-check-anim {
  0%, 7%, 13%, 100% {
    fill: #2e1d27;
  }
  8%, 10% {
    fill: #442636;
  }
}

@keyframes dld-badge-dl-anim {
  0%, 14%, 63%, 100% {
    opacity: 0;
  }
  15%, 62% {
    opacity: 1;
  }
}

@keyframes dld-badge-rd-anim {
  0%, 62%, 98%, 100% {
    opacity: 0;
  }
  63%, 97% {
    opacity: 1;
  }
}

@keyframes dld-prog-anim {
  0%, 14%, 98%, 100% {
    transform: scaleX(0);
    opacity: 0;
  }
  15% {
    transform: scaleX(0.02);
    opacity: 1;
  }
  30% {
    transform: scaleX(0.24);
    opacity: 1;
  }
  44% {
    transform: scaleX(0.58);
    opacity: 1;
  }
  56% {
    transform: scaleX(0.88);
    opacity: 1;
  }
  62%, 96% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes dld-step1-anim {
  0%, 14%, 32%, 100% { opacity: 0; }
  15%, 31% { opacity: 1; }
}

@keyframes dld-step2-anim {
  0%, 31%, 46%, 100% { opacity: 0; }
  32%, 45% { opacity: 1; }
}

@keyframes dld-step3-anim {
  0%, 45%, 60%, 100% { opacity: 0; }
  46%, 59% { opacity: 1; }
}

@keyframes dld-step4-anim {
  0%, 59%, 98%, 100% { opacity: 0; }
  60%, 97% { opacity: 1; }
}

@keyframes dld-stat-init {
  0%, 14%, 100% { opacity: 1; }
  15%, 98% { opacity: 0; }
}

@keyframes dld-stat-dl {
  0%, 14%, 62%, 100% { opacity: 0; }
  15%, 61% { opacity: 1; }
}

@keyframes dld-stat-rd {
  0%, 61%, 98%, 100% { opacity: 0; }
  62%, 97% { opacity: 1; }
}

@keyframes dld-btn-drag-anim {
  0%, 65%, 82%, 100% {
    fill: #281d24;
    border-color: rgba(250, 227, 238, 0.45);
  }
  66%, 80% {
    fill: #3a2432;
    border-color: #fae3ee;
  }
}

@keyframes dld-ghost-anim {
  0%, 66%, 80%, 100% {
    opacity: 0;
    transform: translate(260px, 351px);
  }
  67% {
    opacity: 0.9;
    transform: translate(260px, 351px);
  }
  72% {
    opacity: 0.9;
    transform: translate(240px, 410px);
  }
  79% {
    opacity: 0.9;
    transform: translate(206px, 468px);
  }
}

@keyframes dld-dropped-anim {
  0%, 79%, 98%, 100% {
    opacity: 0;
    transform: translateY(-4px);
  }
  80%, 97% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@media (prefers-reduced-motion: reduce) {
  [data-downloader-demo] .dld-animated {
    animation: none !important;
  }
  .dld-cursor,
  .dld-click,
  .dld-click-drag,
  .dld-drag-ghost,
  .dld-badge-downloading,
  .dld-st-1,
  .dld-st-2,
  .dld-st-3,
  .dld-status-init,
  .dld-status-downloading {
    opacity: 0 !important;
  }
  .dld-badge-ready,
  .dld-st-4,
  .dld-status-ready,
  .dld-dropped-video,
  .dld-dropped-audio {
    opacity: 1 !important;
  }
  .dld-progress-bar {
    transform: scaleX(1) !important;
    opacity: 1 !important;
  }
}

