/* src/styles/windows/base-window.css */

.desktop-window {
  position: fixed;
  background: rgba(45, 45, 45, 0.95);
  border: 1px solid #555;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  overflow: hidden;
  font-family: "Ubuntu", sans-serif;
  z-index: var(--z-window-base);
  display: flex;
  flex-direction: column;
}

.window-resize-handle {
  position: absolute;
  z-index: 10;
}

.resize-n {
  top: 0;
  left: 8px;
  right: 8px;
  height: 4px;
}

.resize-s {
  bottom: 0;
  left: 8px;
  right: 8px;
  height: 4px;
}

.resize-e {
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
}

.resize-w {
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
}

.resize-ne {
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
}

.resize-nw {
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
}

.resize-se {
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
}

.resize-sw {
  bottom: 0;
  left: 0;
  width: 12px;
  height: 12px;
}

.desktop-window.resizing {
  user-select: none;
  transition: none;
}

.window-title-bar {
  height: 32px;
  background: #404040;
  border-bottom: 1px solid #555;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: #fff;
  font-size: 12px;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.title-bar {
  height: 32px;
  background: #404040;
  border-bottom: 1px solid #555;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: #fff;
  font-size: 12px;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1;
}

.window-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.window-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  flex-shrink: 0;
}

.window-controls span {
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 16px;
  font-weight: bold;
  transition: background-color 0.2s ease;
  color: #fff;
  line-height: 1;
}

.window-controls span:hover {
  background: rgba(255, 255, 255, 0.15);
}

.window-close:hover {
  background: #e81123 !important;
  color: #fff;
}

.window-extra-button {
  cursor: pointer;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 14px;
  transition: background-color 0.2s ease;
  color: #fff;
}

.window-extra-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.window-content {
  flex: 1;
  overflow: auto;
  background: transparent;
  position: relative;
  padding: 12px;
}

.window-content:has(.shake-soft),
.window-content:has(.screen-shake),
.window-content:has(.warp-tunnel) {
  overflow: hidden !important;
}

.window-content-no-padding {
  padding: 0;
}

.window-content-compact {
  padding: 8px;
}

.window-content-spacious {
  padding: 16px;
}

.window-status-bar {
  height: 24px;
  background: #333;
  border-top: 1px solid #555;
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 11px;
  color: #ccc;
  flex-shrink: 0;
}

.window-maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  transform: none !important;
}
