/* ==========================================================================
   BSF Drawer Detail Page Demo
   Exact scale, dimensions, and studio black (#181818) + soft pink (#fae3ee) palette
   Showcasing:
   1. Tambah folder (klik + Tambah Folder, dialog input)
   2. Terbentuk folder baru secara dinamis di Drawer (Slot 1 pop-in + counter bertambah)
   3. Buka folder langsung di Windows File Explorer & jalankan file
   No Premiere timeline sequence!
   ========================================================================== */

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

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

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

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

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

.drw-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;
}

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

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

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

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

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

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

.drw-brand {
  font-size: 22px;
  font-weight: 700;
  fill: #fae3ee;
  letter-spacing: -0.6px;
}

.drw-free-bg {
  fill: #20382e;
}

.drw-free {
  font-size: 9px;
  fill: #bce4cd;
  font-weight: 600;
}

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

.drw-search-placeholder {
  font-size: 9.5px;
  fill: #8e8088;
}

/* Drawer Tiles */
.drw-tile {
  transition: transform 0.2s ease;
}

.drw-tile-new-bg {
  fill: #2d1c29;
  stroke: #ff72ac;
  stroke-width: 1.4;
  filter: drop-shadow(0 0 10px rgba(255, 114, 172, 0.35));
}

.drw-tile-file {
  fill: #261621;
  stroke: rgba(255, 114, 172, 0.3);
  stroke-width: 1.2;
}

.drw-tile-title {
  font-size: 11.5px;
  font-weight: 700;
  fill: #ffffff;
}

.drw-tile-sub {
  font-size: 8px;
  fill: #a2929b;
}

.drw-tile-add {
  fill: #1a1419;
  stroke: rgba(250, 227, 238, 0.25);
  stroke-dasharray: 4 3;
  stroke-width: 1.2;
}

.drw-tile-add-text {
  font-size: 9px;
  font-weight: 600;
  fill: #fae3ee;
}

/* Status Bar */
.drw-status-bar-bg {
  fill: #1c1519;
  stroke: rgba(250, 227, 238, 0.14);
}

.drw-status-text {
  font-size: 9.5px;
  fill: #d4d4d4;
}

.drw-status-dot {
  fill: #fae3ee;
}

/* Click Ripples */
.drw-click-tile-6,
.drw-click-tile-new {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
}

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

/* Steps footer */
.public-studio .website-drawer-demo .drw-steps {
  list-style: none;
  padding: 0;
  margin: 15px 0 0;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  flex-shrink: 0;
}

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

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

/* ==========================================================================
   15-Second Loop Animation Keyframes
   ========================================================================== */

.drw-play .drw-cursor {
  animation: drw-cursor-anim 15s linear infinite both;
}

.drw-play .drw-empty-slot {
  animation: drw-empty-slot-anim 15s linear infinite both;
}

.drw-play .drw-tile-new {
  animation: drw-tile-new-anim 15s cubic-bezier(0.18, 0.89, 0.32, 1.28) infinite both;
}

.drw-play .drw-cnt-before {
  animation: drw-cnt-before-anim 15s linear infinite both;
}

.drw-play .drw-cnt-after {
  animation: drw-cnt-after-anim 15s linear infinite both;
}

.drw-play .drw-click-tile-6 {
  animation: drw-click-t6-anim 15s linear infinite both;
}

.drw-play .drw-click-tile-new {
  animation: drw-click-tnew-anim 15s linear infinite both;
}

.drw-play .drw-add-dialog {
  animation: drw-add-dialog-anim 15s ease-in-out infinite both;
}

.drw-play .drw-formed-view {
  animation: drw-formed-view-anim 15s ease-in-out infinite both;
}

.drw-play .drw-explorer-win {
  animation: drw-explorer-win-anim 15s ease-in-out infinite both;
}

.drw-play .drw-st-p1 {
  animation: drw-st-p1-anim 15s linear infinite both;
}

.drw-play .drw-st-p2 {
  animation: drw-st-p2-anim 15s linear infinite both;
}

.drw-play .drw-st-p3 {
  animation: drw-st-p3-anim 15s linear infinite both;
}

.drw-play .drw-status-dot {
  animation: drw-dot-anim 15s linear infinite both;
}

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

/* Keyframes Definitions */

/* Cursor Movement */
@keyframes drw-cursor-anim {
  /* 0 - 28%: Step 1 - Add folder */
  0%, 2% {
    transform: translate(440px, 280px);
    opacity: 0;
  }
  5% {
    transform: translate(424px, 240px);
    opacity: 1;
  }
  8% {
    transform: translate(424px, 240px) scale(0.85);
    opacity: 1;
  }
  11% {
    transform: translate(424px, 240px) scale(1);
    opacity: 1;
  }
  16% {
    transform: translate(110px, 452px);
    opacity: 1;
  }
  19% {
    transform: translate(110px, 452px) scale(0.85);
    opacity: 1;
  }
  22% {
    transform: translate(110px, 452px) scale(1);
    opacity: 1;
  }

  /* 29 - 58%: Step 2 - Folder newly formed */
  29% {
    transform: translate(95px, 160px);
    opacity: 1;
  }
  38%, 54% {
    transform: translate(120px, 160px);
    opacity: 1;
  }

  /* 59 - 95%: Step 3 - Open in File Explorer & Run file */
  59% {
    transform: translate(95px, 160px);
    opacity: 1;
  }
  61% {
    transform: translate(95px, 160px) scale(0.85);
    opacity: 1;
  }
  64% {
    transform: translate(95px, 160px) scale(1);
    opacity: 1;
  }
  70% {
    transform: translate(220px, 420px);
    opacity: 1;
  }
  76% {
    transform: translate(410px, 420px);
    opacity: 1;
  }
  79% {
    transform: translate(410px, 420px) scale(0.88);
    opacity: 1;
  }
  82% {
    transform: translate(410px, 420px) scale(1);
    opacity: 1;
  }
  88%, 94% {
    transform: translate(240px, 526px);
    opacity: 0.9;
  }
  97%, 100% {
    transform: translate(440px, 280px);
    opacity: 0;
  }
}

/* Empty Slot in Slot 1 (visible only before creation) */
@keyframes drw-empty-slot-anim {
  0%, 27% {
    opacity: 1;
  }
  29%, 96% {
    opacity: 0;
  }
  98%, 100% {
    opacity: 1;
  }
}

/* New Card Creation Pop-in Animation */
@keyframes drw-tile-new-anim {
  0%, 27% {
    opacity: 0;
    transform: translate(18px, 124px) scale(0.3);
  }
  30% {
    opacity: 1;
    transform: translate(18px, 124px) scale(1.08);
  }
  34%, 95% {
    opacity: 1;
    transform: translate(18px, 124px) scale(1);
  }
  97%, 100% {
    opacity: 0;
    transform: translate(18px, 124px) scale(0.3);
  }
}

/* Counter update (4 -> 5) */
@keyframes drw-cnt-before-anim {
  0%, 27% {
    opacity: 1;
  }
  29%, 96% {
    opacity: 0;
  }
  98%, 100% {
    opacity: 1;
  }
}

@keyframes drw-cnt-after-anim {
  0%, 27% {
    opacity: 0;
  }
  29%, 95% {
    opacity: 1;
  }
  97%, 100% {
    opacity: 0;
  }
}

/* Click Ripples */
@keyframes drw-click-t6-anim {
  0%, 7% {
    opacity: 0;
    transform: scale(0.3);
  }
  8% {
    opacity: 1;
    transform: scale(0.8);
  }
  12% {
    opacity: 0;
    transform: scale(1.6);
  }
  13%, 100% {
    opacity: 0;
  }
}

@keyframes drw-click-tnew-anim {
  0%, 60% {
    opacity: 0;
    transform: scale(0.3);
  }
  61% {
    opacity: 1;
    transform: scale(0.8);
  }
  65% {
    opacity: 0;
    transform: scale(1.6);
  }
  66%, 100% {
    opacity: 0;
  }
}

/* Showcase 1: Add Dialog (Active 0% - 28%) */
@keyframes drw-add-dialog-anim {
  0%, 6% {
    opacity: 0;
    transform: translate(18px, 334px);
  }
  8%, 26% {
    opacity: 1;
    transform: translate(18px, 326px);
  }
  28%, 100% {
    opacity: 0;
    transform: translate(18px, 334px);
  }
}

/* Showcase 2: Folder Formed Celebration View (Active 29% - 58%) */
@keyframes drw-formed-view-anim {
  0%, 28% {
    opacity: 0;
    transform: translate(18px, 334px);
  }
  30%, 56% {
    opacity: 1;
    transform: translate(18px, 326px);
  }
  58%, 100% {
    opacity: 0;
    transform: translate(18px, 334px);
  }
}

/* Showcase 3: Windows File Explorer & Run Action (Active 59% - 95%) */
@keyframes drw-explorer-win-anim {
  0%, 58% {
    opacity: 0;
    transform: translate(18px, 334px);
  }
  61%, 94% {
    opacity: 1;
    transform: translate(18px, 326px);
  }
  97%, 100% {
    opacity: 0;
    transform: translate(18px, 334px);
  }
}

/* Status Texts */
@keyframes drw-st-p1-anim {
  0%, 27% {
    opacity: 1;
  }
  28%, 100% {
    opacity: 0;
  }
}

@keyframes drw-st-p2-anim {
  0%, 28% {
    opacity: 0;
  }
  29%, 57% {
    opacity: 1;
  }
  58%, 100% {
    opacity: 0;
  }
}

@keyframes drw-st-p3-anim {
  0%, 58% {
    opacity: 0;
  }
  59%, 95% {
    opacity: 1;
  }
  97%, 100% {
    opacity: 0;
  }
}

/* Status Dot Color */
@keyframes drw-dot-anim {
  0%, 28% {
    fill: #fae3ee;
  }
  29%, 58% {
    fill: #ff72ac;
  }
  59%, 100% {
    fill: #bce4cd;
  }
}

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

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