/* Shared listing photo editor. Source of record: direct-standards/master-photo-editor. */
.sw-photo-editor {
  box-sizing: border-box;
  width: min(620px, calc(100% - 20px));
  max-height: calc(100% - 20px);
  padding: clamp(12px, 3vw, 24px);
  border: 1px solid var(--line, #ded8ce);
  border-radius: 14px;
  background: var(--white, #fff);
  color: var(--ink, #23201b);
  overflow: auto;
}
.sw-photo-editor:modal,
.sw-photo-editor::backdrop { overscroll-behavior: contain; }
.sw-photo-editor::backdrop { overflow: hidden; background: #17110acc; }
.sw-photo-editor h2 { margin: 0 0 12px; }
.sw-photo-viewport {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f1ede5;
  border-radius: 8px;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.sw-photo-viewport[hidden] { display: none; }
.sw-photo-viewport:active { cursor: grabbing; }
.sw-photo-viewport canvas {
  display: block;
  max-width: 100%;
  max-height: min(36vh, 360px);
  width: auto;
  height: auto;
}
.sw-photo-editor fieldset {
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--line, #ded8ce);
  border-radius: 8px;
}
.sw-photo-editor legend { font-weight: 700; }
.sw-photo-editor label { display: grid; align-items: center; gap: 4px; margin: 0; }
.sw-photo-editor select, .sw-photo-editor button {
  min-height: 44px;
  padding: 4px 10px;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #534c43;
  border-radius: 8px;
}
.sw-photo-editor button { min-width: 44px; cursor: pointer; font-weight: 650; }
.sw-photo-editor button:disabled { cursor: default; opacity: .55; }
.sw-photo-editor button.sw-photo-save { background: #e8a33d; color: #23201b; border-color: #a56715; }
.sw-photo-editor :focus-visible { outline: 3px solid #165387; outline-offset: 2px; }
.sw-photo-editor .sw-photo-zoom {
  margin: 8px 0;
  display: grid;
  align-items: end;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
}
.sw-photo-editor input[type="range"] { width: 100%; min-height: 44px; margin: 0; }
.sw-photo-editor .sw-photo-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.sw-photo-editor details { margin-top: 6px; }
.sw-photo-editor summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
.sw-photo-editor .sw-photo-help, .sw-photo-editor .sw-photo-status { margin: 8px 0; font-size: .875rem; }
.sw-photo-editor .sw-photo-status:empty { min-height: 0; }
.sw-photo-edit-trigger {
  min-height: 44px;
  max-width: 100%;
  font: inherit;
  padding: 4px 9px;
  border: 1px solid currentColor;
  border-radius: 7px;
  color: inherit;
  background: transparent;
  cursor: pointer;
}
