/* ============================================================
   PAINT.CSS — MS Paint Clone Styles (Windows 95)
   ============================================================ */

body.paint-body {
  background: var(--windows-gray);
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  font-size: 11px;
  color: black;
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- WINDOW CHROME ---- */
.paint-window {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--windows-gray);
}

.paint-title-bar {
  background: linear-gradient(to right, #000080, #1084d0);
  color: white;
  font-weight: bold;
  font-size: 12px;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
  flex-shrink: 0;
}

.paint-title-bar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.paint-title-icon {
  font-size: 14px;
}

.paint-title-buttons {
  display: flex;
  gap: 2px;
}

.paint-title-btn {
  width: 16px;
  height: 14px;
  background: var(--windows-gray);
  border-top: 1px solid white;
  border-left: 1px solid white;
  border-right: 1px solid #555;
  border-bottom: 1px solid #555;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
  color: black;
  cursor: pointer;
  font-weight: bold;
}

/* ---- MENU BAR ---- */
.paint-menu-bar {
  background: var(--windows-gray);
  border-bottom: 1px solid #888;
  padding: 2px 4px;
  display: flex;
  gap: 0;
  flex-shrink: 0;
}

.paint-menu-item {
  padding: 2px 8px;
  cursor: pointer;
  font-size: 11px;
  font-family: Arial, sans-serif;
  user-select: none;
}
.paint-menu-item:hover {
  background: #000080;
  color: white;
}

/* ---- TOOLBAR ---- */
.paint-toolbar {
  display: flex;
  flex-direction: column;
  background: var(--windows-gray);
  border-right: 2px solid #555;
  border-left: none;
  padding: 4px;
  gap: 2px;
  flex-shrink: 0;
  width: 56px;
  align-items: center;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 100%;
}

.tool-btn {
  width: 24px;
  height: 24px;
  background: var(--windows-gray);
  border-top: 1px solid white;
  border-left: 1px solid white;
  border-right: 1px solid #555;
  border-bottom: 1px solid #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  user-select: none;
  position: relative;
  title: '';
}

.tool-btn:hover {
  background: #d0d0d0;
}

.tool-btn.active {
  border-top: 1px solid #555;
  border-left: 1px solid #555;
  border-right: 1px solid white;
  border-bottom: 1px solid white;
  background: #b0b0b0;
}

.tool-separator {
  width: 100%;
  height: 4px;
  border-top: 1px solid #888;
  border-bottom: 1px solid white;
  margin: 4px 0;
}

/* Brush size options */
.brush-sizes {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
}

.brush-size-option {
  border-radius: 50%;
  background: black;
  cursor: pointer;
  transition: transform 0.1s;
}
.brush-size-option:hover { transform: scale(1.2); }
.brush-size-option.active {
  outline: 2px solid #000080;
  outline-offset: 2px;
}

/* ---- MAIN CONTENT AREA ---- */
.paint-main {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ---- CANVAS AREA ---- */
.paint-canvas-area {
  flex: 1;
  overflow: auto;
  background: #808080;
  padding: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
}

#paintCanvas {
  display: block;
  cursor: crosshair;
  background: white;
  box-shadow: 2px 2px 0 #555;
  image-rendering: pixelated;
}

/* ---- COLOR PALETTE ---- */
.paint-palette {
  background: var(--windows-gray);
  border-top: 2px solid #555;
  border-bottom: 1px solid white;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.color-wells {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 36px;
  height: 24px;
  position: relative;
  margin-right: 8px;
}

.color-well {
  width: 22px;
  height: 18px;
  border: 1px solid #555;
  position: absolute;
  cursor: pointer;
}

.color-well-bg {
  top: 6px;
  left: 12px;
  z-index: 1;
}

.color-well-fg {
  top: 0;
  left: 0;
  z-index: 2;
  border: 2px solid #555;
}

.palette-colors {
  display: flex;
  flex-wrap: wrap;
  width: 392px;
  gap: 1px;
}

.palette-swatch {
  width: 16px;
  height: 16px;
  cursor: pointer;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.palette-swatch:hover {
  border-color: white;
  transform: scale(1.1);
}

/* ---- STATUS BAR ---- */
.paint-status {
  background: var(--windows-gray);
  border-top: 1px solid #888;
  padding: 2px 8px;
  font-size: 11px;
  font-family: Arial, sans-serif;
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.paint-status-item {
  border: 1px inset #888;
  padding: 1px 8px;
  min-width: 80px;
}

/* ---- TOOLTIP ---- */
.paint-tooltip {
  position: fixed;
  background: #FFFFCC;
  border: 1px solid black;
  padding: 2px 6px;
  font-size: 11px;
  font-family: Arial, sans-serif;
  pointer-events: none;
  z-index: 1000;
  display: none;
}
