/*!
 * Winamp Resurrected
 * Designed & developed by Serkan Hursgunel — www.serkanhursgunel.com
 */

/* Shared window chrome — Figma "Title Bar" (7:64), "Window Button" (5:107), Divider. */

.wa-window {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 1100px;
  padding: 8px;
  background: var(--wa-window-bg);
  box-shadow: var(--page-window-shadow);
  transform: translate(var(--x, 0px), var(--y, 0px));
  user-select: none;
  -webkit-user-select: none;
}

.wa-window[hidden] {
  display: none;
}

.wa-window__body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 8px 12px 12px 16px;
  border: 4px solid var(--wa-window-border);
  background: var(--wa-window-surface);
}

.wa-titlebar {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 40px;
  flex-shrink: 0;
  cursor: grab;
  touch-action: none;
}

.wa-window[data-dragging] .wa-titlebar {
  cursor: grabbing;
}

.wa-titlebar__glyph {
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.wa-rail {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  gap: 4px;
  min-width: 1px;
  pointer-events: none;
}

.wa-rail::before,
.wa-rail::after {
  content: '';
  height: 8px;
  border-radius: 4px;
}

.wa-rail::before {
  background: var(--wa-titlebar-rail);
  box-shadow: inset 0 4px 0 var(--wa-titlebar-rail-edge);
}

.wa-rail::after {
  background: var(--wa-titlebar-rail-shade);
  box-shadow: inset 0 4px 4px rgba(0, 0, 0, 0.25);
}

.wa-titlebar__title {
  margin: 0;
  flex-shrink: 0;
  font: 700 32px/1 var(--wa-font-title);
  color: var(--wa-titlebar-text);
  white-space: nowrap;
}

.wa-titlebar__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wa-winbtn {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  transition: filter 120ms ease, transform 80ms ease;
}

.wa-winbtn img {
  display: block;
  width: 28px;
  height: 28px;
}

.wa-winbtn--close img {
  width: 25px;
  height: 24px;
}

.wa-winbtn:hover {
  filter: brightness(1.15);
}

.wa-winbtn:active {
  transform: translateY(2px);
}

.wa-winbtn:focus-visible {
  outline: 4px solid var(--wa-focus);
  outline-offset: 2px;
}

.wa-divider {
  height: 4px;
  flex-shrink: 0;
  background: var(--wa-window-divider);
}

.wa-window__content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Shade mode collapses a window to its title bar. */
.wa-window[data-shaded] .wa-divider,
.wa-window[data-shaded] .wa-window__content,
.wa-window[data-shaded] .wa-resize-grip {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .wa-winbtn {
    transition: none;
  }
}
