/* Picoture Recolor Lite - recolor.css
   2025-08-29
   - ????/?????????????
   - ??????????
   - ???????????????????JS?? type="button" ????
*/

/* ??? */
.prl, .prl * { box-sizing: border-box; }

/* ===== Stage?????????===== */
.prl-stage {
  position: relative;
  display: inline-block;
  line-height: 0;
  z-index: 1;
  padding: 0;
  border: 0;
}
.prl-canvas {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

/* JS??????????????????? */
.prl-overlay {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  pointer-events: none;      /* ? ??????????????? */
  image-rendering: pixelated;
  z-index: 1;
  opacity: 0;
  transition: opacity .12s ease;
}
.prl-overlay.active { opacity: 1; }

/* ===== Toolbar???????===== */
.prl-toolbar {
  position: relative;
  z-index: 2;                /* ? ???????????? */
  display: grid;
  gap: 12px;
}

/* ???????? */
.prl-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.prl-picker input[type="color"] {
  width: 42px; height: 32px;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}
.prl-picker input[type="text"] {
  flex: 1 1 150px;
  min-width: 120px; max-width: 240px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 8px;
  background: #fff;
}

/* ??????? */
.prl-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}
.prl-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  white-space: nowrap;   /* ??????????? */
}
.prl-controls input[type="checkbox"] {
  width: 18px; height: 18px;
}

/* ????? */
.prl-controls .prl-tol {
  width: 180px;
  max-width: 40vw;
}

/* ??? */
.prl-controls button {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}
.prl-controls .prl-dl { /* ????????? */
  border-color: #cbd5e1;
}
.prl-apply[disabled],
.prl-clear[disabled],
.prl-undo[disabled] {
  opacity: .5;
  cursor: not-allowed;
}

/* ===== ?????640px?===== */
@media (max-width: 640px) {
  .prl-toolbar { gap: 10px; }

  .prl-picker { gap: 6px; }
  .prl-picker input[type="text"] {
    flex: 1 1 100%;
    max-width: none;
  }

  .prl-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .prl-controls label {
    width: 100%;
    justify-content: flex-start;
    white-space: normal;  /* ??????????? */
  }
  .prl-controls .prl-tol {
    width: 100%;
    max-width: none;
  }
  .prl-controls button,
  .prl-controls .prl-dl {
    width: 100%;
    display: block;
    text-align: center;
  }
/* ??????????JS??????????????????????? */
.prl-stage {
  max-width: 100%;
  margin: 0 auto;
}

.prl-stage .prl-canvas {
  width: 100%;
  height: auto;
}

/* ????????????????? */
.prl-size-control {
  display: flex;
  justify-content: flex-end;
}
.prl-size-control input[type="range"] {
  vertical-align: middle;
}

}

/* ===== ?????/PC?641px??===== */
@media (min-width: 641px) {
  /* ????2???????????????????
  .prl-toolbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  } */
  .prl-controls { align-items: center; }
  .prl-controls .prl-tol { width: 200px; }
}

/* ===== ??????????360px?===== */
@media (max-width: 360px) {
  .prl-controls button { font-size: 13px; padding: 8px 10px; }
}
