/* ── UI Animations ─────────────────────────────────────────────────────────── *
 * Isolated animation layer — no layout or base styles here.                    *
 * All durations kept short so the UI feels snappy, not sluggish.               */

/* ── Keyframes ── */

@keyframes win98-menu-open {
  from { opacity: 0; translate: 0 6px; scale: 0.97; }
  to   { opacity: 1; translate: 0 0;   scale: 1;    }
}

@keyframes win98-menu-close {
  from { opacity: 1; translate: 0 0;   scale: 1;    }
  to   { opacity: 0; translate: 0 6px; scale: 0.97; }
}

@keyframes win98-submenu-open {
  from { opacity: 0; translate: -6px 0; }
  to   { opacity: 1; translate: 0 0;    }
}

@keyframes win98-window-open {
  from { opacity: 0; scale: 0.97; }
  to   { opacity: 1; scale: 1;    }
}

@keyframes win98-window-minimize {
  from { opacity: 1; scale: 1;    translate: 0 0;    }
  to   { opacity: 0; scale: 0.85; translate: 0 30px; }
}

@keyframes win98-window-restore {
  from { opacity: 0; scale: 0.85; translate: 0 30px; }
  to   { opacity: 1; scale: 1;    translate: 0 0;    }
}

/* ── Start menu ── */

#startmenu.is-opening {
  animation: win98-menu-open 120ms ease-out forwards;
}

#startmenu.is-closing {
  animation: win98-menu-close 100ms ease-in forwards;
}

/* ── Submenus ── */

.start-menu-submenu.is-opening {
  animation: win98-submenu-open 100ms ease-out forwards;
}

/* ── Windows ── */

#windows-container .window.is-opening {
  animation: win98-window-open 150ms ease-out forwards;
}

#windows-container .window.is-minimizing {
  animation: win98-window-minimize 150ms ease-in forwards;
  pointer-events: none;
}

#windows-container .window.is-restoring {
  animation: win98-window-restore 180ms ease-out forwards;
}

/* ── Task buttons — snappier active/press transition ── */

.task-button {
  transition: box-shadow 60ms ease;
}
