/* =============================
   BASE PAGE LAYOUT
============================= */

.main {
  padding-top: var(--header-height);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: calc(100vh - var(--header-height));
}

h1 {
  margin: 12px;
  font-size: 1.8rem;
  text-align: center;
}

.clickable-title {
  cursor: pointer;
  user-select: none;
}


/* =============================
   CONTROLS LAYOUT
============================= */

.controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.control-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.palettes {
  display: flex;
  gap: 12px;
}


/* =============================
   SWATCH BASE
============================= */

.swatch {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 2px solid var(--border-color);
  background: transparent;

  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color);

  position: relative;
  box-sizing: border-box;
}


/* =============================
   SHAPE MODIFIERS
============================= */

.swatch--circle {
  border-radius: 50%;
}

.swatch--square {
  border-radius: 6px;
}


/* =============================
   ROLE MODIFIERS
============================= */

.swatch--color {
  background: #888;
}

.swatch--opacity {
  background: transparent;
}

.swatch--label {
  border: none;
  background: transparent;
  cursor: default;
}


/* Background (BG) swatches */
.swatch[data-role="background"] {
  border-style: dashed;
}


/* =============================
   COLOR INPUT (HIDDEN)
============================= */

.swatch--color input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}


/* =============================
   OPACITY BOX
============================= */

.opacity-box {
  width: 100%;
  height: 100%;
  border-radius: inherit;

  background: #888;
  border: 1px solid var(--border-color);
}


/* =============================
   ADD COLUMN
============================= */

.add-column {
  display: flex;
  flex-direction: column;
  gap: 10px;

  padding: 2px;
  border: 2px dashed var(--border-color);
  border-radius: 8px;

  background: transparent;
  cursor: pointer;
}

.swatch--ghost {
  background: transparent;
  border: 2px dashed var(--border-color);
}


/* =============================
   CANVAS
============================= */

#canvas {
  margin-top: 16px;

  width: calc(100% - 32px);
  flex: 1;

  background: var(--bg-color);
  border-radius: 8px;
}