/*
 * Reset, layout utilities, base styles.
 */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 13px;
  color: var(--ButtonText);
  background: var(--Background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Prevent text selection on UI elements */
.no-select,
.taskbar,
.ui-dialog__titlebar,
.ui-menubar,
.ui-menu,
.icon__label {
  user-select: none;
  -webkit-user-select: none;
}

/* Hidden */
.hidden { display: none !important; }
.invisible { visibility: hidden; }

/* Flex utilities */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* 3D border utilities (Windows 98 style) */
.border-raised {
  border: var(--border-width) solid;
  border-color: var(--ButtonHilight) var(--ButtonDkShadow) var(--ButtonDkShadow) var(--ButtonHilight);
}

.border-sunken {
  border: var(--border-width) solid;
  border-color: var(--ButtonDkShadow) var(--ButtonHilight) var(--ButtonHilight) var(--ButtonDkShadow);
}

.border-etched {
  border: 2px solid;
  border-color: var(--ButtonShadow) var(--ButtonHilight) var(--ButtonHilight) var(--ButtonShadow);
}

/* Button base */
button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Input base */
input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* Image resets */
img {
  display: block;
  max-width: 100%;
}

/* Disable default focus outline — we'll add our own */
:focus {
  outline: none;
}
:focus-visible {
  outline: 1px dotted var(--ButtonText);
  outline-offset: -1px;
}

/* Drag ghost */
.drag-ghost {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
}
