/* FORGE — image tool styles, shared by every tool in tools/<name>/ that
   uses assets/image-tools.js (brightness, contrast, saturation, hue,
   sharpness, image-adjustor). Not loaded on other pages — this is a
   "shared but not universal" stylesheet, same idea as global.css but
   scoped to one family of tools instead of the whole site. */

.image-tool {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 8px 20px 56px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 16px;
  align-items: start;
}

.image-tool-canvas-wrap {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.image-dropzone {
  width: 100%;
  text-align: center;
  padding: 56px 20px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.image-dropzone.is-dragover { border-color: var(--ember); background: var(--bg-raised-hi); }
.dropzone-text { font-size: 0.95rem; margin-bottom: 6px; }
.dropzone-text .btn { padding: 6px 12px; margin: 0 2px; pointer-events: none; }
.dropzone-hint { font-size: 0.8rem; color: var(--text-dim); }

#preview-canvas { max-width: 100%; max-height: 70vh; height: auto; border-radius: 6px; }

/* ---- Controls ------------------------------------------------------------ */
.image-tool-controls {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.adjust-control-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.adjust-control-head label { font-size: 0.85rem; }
.adjust-value {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--steel-bright);
  min-width: 3.5em;
  text-align: right;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--molten-gradient);
  border: 2px solid var(--bg-raised);
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--molten-gradient);
  border: 2px solid var(--bg-raised);
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
}
input[type="range"]:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; }

.adjust-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.adjust-actions .btn { flex: 1; white-space: nowrap; }

/* ---- Responsive ------------------------------------------------------------ */
@media (max-width: 760px) {
  .image-tool { grid-template-columns: 1fr; }
}
