/* v0.2 — a purpose-built pigment desk */
#editor.sampling .selection-box,
#editor.sampling .symmetry-origin {
  pointer-events: none;
}
.library select {
  margin-top: 3px;
}
.library #regionNote {
  min-height: 50px;
  line-height: 1.6;
}
.color-row {
  margin-top: 14px;
}
.color-trigger {
  flex: 1;
  padding: 9px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: #f5f3e9;
  min-width: 0;
  font-size: 10px;
}
.color-trigger i {
  display: block;
  width: 48px;
  height: 36px;
  border-radius: 5px 6px 4px 7px;
  border: 1px solid #0002;
  box-shadow:
    inset 1px 2px 3px #fff7,
    inset -1px -2px 4px #0002,
    0 2px 3px #0000000c;
  position: relative;
}
.color-trigger:hover {
  border-color: #91a59a;
  background: #eaf0e5;
}
.symmetry-chips {
  display: flex;
  gap: 4px;
  margin-top: 10px;
}
.symmetry-chips button {
  flex: 1;
  padding: 5px 0;
  font-size: 11px;
  min-width: 0;
}
.symmetry-chips button.active {
  background: #245c62;
  color: #fff;
  border-color: #245c62;
}
.symmetry-chips button:hover {
  outline: 1px solid #b9945c;
}
.selection-box [data-handle="resize"] {
  cursor: nwse-resize;
}
.selection-box [data-handle="rotate"] {
  cursor: grab;
}
.symmetry-origin {
  cursor: move;
}
#editor.sampling,
#editor.sampling [data-id] {
  cursor: crosshair;
}
#editor.dragging [data-handle] {
  cursor: grabbing;
}
.glaze-picker {
  width: 650px;
  max-width: calc(100vw - 28px);
  max-height: calc(100dvh - 30px);
  padding: 27px 30px 20px;
  overflow: auto;
  border: 1px solid #cbd5c8;
  box-shadow: 0 25px 100px #102e4455;
  border-radius: 18px;
  background: #fbfaf2;
}
.glaze-picker::backdrop {
  background: #173e4359;
  backdrop-filter: blur(5px);
}
.picker-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.picker-heading h2 {
  font-size: 31px;
  margin-top: 4px;
}
.picker-heading > button {
  border: 0;
  border-radius: 50%;
  font-size: 24px;
  width: 35px;
  height: 35px;
  padding: 0;
  background: #eaf0e5;
}
.picker-subtitle {
  color: #7d897d;
  font-size: 12px;
  margin: 8px 0 20px;
}
.picker-targets {
  display: flex;
  gap: 5px;
  margin-bottom: 23px;
  background: #e9ede2;
  border-radius: 9px;
  padding: 4px;
}
.picker-targets button {
  flex: 1;
  padding: 7px;
  border: 0;
  font-size: 11px;
}
.picker-targets .active {
  background: #fffef6;
  box-shadow: 0 1px 5px #233e4010;
  color: #245c62;
  font-weight: 600;
}
.picker-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 25px;
}
.sv-field {
  height: 225px;
  position: relative;
  touch-action: none;
  border-radius: 10px;
  cursor: crosshair;
  background-image:
    linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent);
  box-shadow: inset 0 0 0 1px #0001;
  overflow: hidden;
}
.sv-cursor {
  position: absolute;
  width: 17px;
  height: 17px;
  border: 2px solid white;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px #0006,
    0 1px 5px #0005;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
.glaze-picker label {
  margin-top: 14px;
  font-size: 10px;
  letter-spacing: 0.2px;
}
.glaze-picker .hue-slider {
  appearance: none;
  -webkit-appearance: none;
  height: 13px;
  border-radius: 8px;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  width: 100%;
  margin: 6px 0 9px;
}
.hue-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 1px #0004;
  cursor: ew-resize;
}
.hue-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 1px #0004;
  cursor: ew-resize;
}
.color-comparison {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 11px;
}
.pigment-sample {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 6px;
  align-items: center;
  padding: 7px 3px;
  border: 0;
  background: transparent;
  font-size: 9px;
  color: #738174;
}
.pigment-sample i {
  display: block;
  width: 100%;
  height: 37px;
  border-radius: 5px;
  border: 1px solid #0002;
  position: relative;
}
.sample-color {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 6px;
  gap: 2px;
  font-size: 23px;
  border: 0;
  color: #5a756c;
}
.sample-color span {
  font-size: 8px;
}
.hex-input {
  background: #fffef9;
  width: 100%;
  border: 1px solid #d9dfd2;
  border-radius: 6px;
  padding: 8px 11px;
  color: #245c62;
  font:
    12px ui-monospace,
    monospace;
  letter-spacing: 1px;
}
.hex-input[aria-invalid="true"] {
  border-color: #ad6049;
}
#hexError {
  font-size: 9px;
  color: #a95740;
}
.picker-pigments > label:first-child {
  margin-top: 0;
}
.pigment-wells {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 14px 0 20px;
}
.pigment-well {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  border: 1px solid #e6e6d8;
  background: #f4f3e9;
  padding: 9px 6px 7px;
  font-size: 9px;
}
.pigment-well i {
  display: block;
  width: 54px;
  height: 45px;
  background: var(--pigment);
  border-radius: 8px 5px 7px 6px;
  box-shadow:
    inset 1px 2px 4px #fff5,
    inset -1px -2px 5px #0002,
    0 2px 3px #0001;
  position: relative;
}
.pigment-well:hover {
  border-color: #8a9e8b;
  transform: translateY(-2px);
}
.mini-wells {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 29px;
}
.mini-well {
  padding: 0;
  width: 25px;
  height: 25px;
  border-radius: 5px;
  border: 1px solid #0002;
  background: var(--pigment);
  box-shadow: inset 0 1px 2px #fff5;
  flex-shrink: 0;
}
.mini-well:hover {
  background: var(--pigment);
  outline: 2px solid #ac935b;
  outline-offset: 2px;
}
.mini-well i,
.mini-well span {
  display: none;
}
.personal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.personal-heading button {
  border: 0;
  font-size: 9px;
  padding: 5px;
  color: #245c62;
}
.personal-heading label {
  margin: 8px 0;
}
#personalPalettes {
  max-height: 110px;
  overflow: auto;
  scrollbar-width: thin;
}
.personal-palette {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 5px 0;
}
.personal-palette > span {
  color: #9ba28e;
  font-size: 8px;
  width: 8px;
}
.personal-palette .mini-well {
  width: 23px;
  height: 23px;
}
.personal-palette > button:last-child {
  border: 0;
  padding: 2px 4px;
  font-size: 14px;
  color: #8c8e81;
  margin-left: auto;
}
.picker-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  border-top: 1px solid #e2e5d8;
  padding-top: 16px;
  gap: 10px;
}
.picker-footer > span {
  font-size: 9px;
  color: #81907c;
}
.picker-footer > button {
  min-width: 90px;
}
.glaze-picker .small-note {
  font-size: 9px;
  line-height: 1.6;
}
#pickerPalette {
  font-size: 10px;
}
.settings #selectionControls .wide {
  margin-top: 7px;
  font-size: 9px;
}
@media (max-width: 820px) {
  .settings #selectionControls .symmetry-chips,
  .settings #selectionControls > .small-note,
  .settings #selectionControls > .wide,
  .settings #selectionControls > .color-row {
    grid-column: 1/-1;
  }
  .settings .color-row {
    max-width: 300px;
  }
}
@media (max-width: 540px) {
  .glaze-picker {
    padding: 20px 17px 17px;
    max-width: calc(100vw - 16px);
  }
  .picker-layout {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 13px;
  }
  .sv-field {
    height: 185px;
  }
  .picker-heading h2 {
    font-size: 27px;
  }
  .picker-subtitle {
    font-size: 10px;
  }
  .picker-targets {
    margin-bottom: 16px;
  }
  .picker-targets button {
    font-size: 10px;
    padding: 7px 3px;
  }
  .pigment-wells {
    gap: 5px;
  }
  .pigment-well {
    padding: 7px 3px;
  }
  .pigment-well i {
    width: 38px;
    height: 36px;
  }
  .picker-footer > span {
    font-size: 8px;
  }
  .picker-footer > button {
    min-width: 75px;
  }
  .mini-well {
    width: 21px;
    height: 21px;
  }
  .personal-palette .mini-well {
    width: 18px;
    height: 18px;
  }
  .personal-palette {
    gap: 3px;
  }
  .color-comparison {
    gap: 4px;
  }
  .pigment-sample i {
    height: 30px;
  }
  .sample-color {
    font-size: 21px;
    padding: 3px;
  }
  .sample-color span {
    font-size: 7px;
  }
  .library #regionNote {
    min-height: 0;
    font-size: 8px;
  }
  .library select {
    font-size: 9px;
    padding: 7px 3px;
  }
  .library label {
    font-size: 8px;
  }
  .library .panel-heading > span {
    font-size: 8px;
  }
  .color-trigger i {
    width: 42px;
    height: 31px;
  }
}
.surface-forms {
  margin: 12px 0;
}
.surface-forms > summary {
  cursor: pointer;
  font-size: 12px;
}
#ceramicFormChoices svg,
#newCeramicFormChoices svg {
  max-height: 64px;
}
