.system-window-dialog-overlay {
  animation: system-window-fade-in 0.15s ease-out;
}

.system-window-dialog-panel {
  animation: system-window-zoom-in 0.15s ease-out;
}

@keyframes system-window-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes system-window-zoom-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.system-window-dialog-panel--fullscreen {
  animation: system-window-fade-in 0.15s ease-out;
}

.system-window-dialog-panel--behind {
  pointer-events: none;
}

.system-window-dialog-panel__blocker {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.system-window-titlebar--mac {
  background: #ebebeb;
  border-bottom: 1px solid #d4d4d4;
}

.dark .system-window-titlebar--mac {
  background: #3a3a3c;
  border-bottom-color: #525254;
}

.system-window-titlebar--win {
  background: #f3f3f3;
  border-bottom: 1px solid #e0e0e0;
}

.dark .system-window-titlebar--win {
  background: #2d2d2d;
  border-bottom-color: #454545;
}

.system-window-traffic-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 0.5px solid rgba(0, 0, 0, 0.12);
  padding: 0;
  cursor: default;
  flex-shrink: 0;
}

.system-window-traffic-light--close {
  background: #ff5f57;
}

.system-window-traffic-light--close:not(:disabled):hover {
  background: #ff3b30;
}

.system-window-traffic-light--minimize {
  background: #febc2e;
}

.system-window-traffic-light--maximize {
  background: #28c840;
}

.system-window-traffic-light--maximize:not(:disabled):hover {
  background: #1db934;
}

.system-window-traffic-light:disabled {
  opacity: 0.6;
  cursor: default;
}

.system-window-traffic-light--active {
  cursor: pointer;
}

.system-window-win-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 28px;
  border: none;
  background: transparent;
  color: #1a1a1a;
  cursor: default;
  padding: 0;
}

.system-window-win-btn:not(:disabled):hover {
  background: rgba(0, 0, 0, 0.06);
}

.system-window-win-btn--close:not(:disabled):hover {
  background: #e81123;
  color: #fff;
}

.system-window-win-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.system-window-win-btn--active {
  cursor: pointer;
}

.dark .system-window-win-btn {
  color: #f0f0f0;
}

.dark .system-window-win-btn:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.08);
}

.dark .system-window-win-btn--close:not(:disabled):hover {
  background: #e81123;
  color: #fff;
}

.system-window-traffic-light--minimize:not(:disabled):hover {
  background: #e1a82a;
}

.system-window-minimized-tab {
  position: fixed;
  bottom: 0;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 4px 0 12px;
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
  animation: system-window-tab-slide-up 0.15s ease-out;
  overflow: hidden;
}

.system-window-minimized-tab--mac {
  border-radius: 8px 8px 0 0;
  border-bottom: none;
  background: #ebebeb;
}

.dark .system-window-minimized-tab--mac {
  background: #3a3a3c;
}

.system-window-minimized-tab--win {
  border-radius: 0;
  background: #f3f3f3;
}

.dark .system-window-minimized-tab--win {
  background: #2d2d2d;
}

.system-window-minimized-tab--plain {
  border-radius: 8px 8px 0 0;
}

.system-window-minimized-tab__restore {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 8px 0 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  color: inherit;
}

.system-window-minimized-tab__restore:hover {
  opacity: 0.85;
}

.system-window-minimized-tab__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.system-window-minimized-tab__close:hover {
  background: rgba(0, 0, 0, 0.08);
}

.dark .system-window-minimized-tab__close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.system-window-minimized-tab--win .system-window-minimized-tab__close:hover {
  background: #e81123;
  color: #fff;
}

@keyframes system-window-tab-slide-up {
  from {
    opacity: 0;
    transform: translateY(100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
