/* landing-assets/style-editor.css
   Mini studio for the style detail pages.
   Layout follows the homepage postfx section (canvas left, panel right).
   Controls are the app's own: .control-row / label / .right / .value,
   3px track + 11px square thumb (v2.css 4288), and .control-row select. */

.ed {
  --v2-track: rgba(255, 255, 255, 0.15);
  --v2-thumb: #ffffff;
  --ed-label: rgba(245, 245, 245, 0.55);
  --ed-muted: rgba(245, 245, 245, 0.42);
  --ed-line: rgba(255, 255, 255, 0.10);
  --ed-field-bg: rgba(255, 255, 255, 0.03);
  --ed-field-border: rgba(255, 255, 255, 0.10);
  --ed-field-text: rgba(255, 255, 255, 0.85);
  margin-top: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1076fr) minmax(0, 402fr);
  border-top: 2px solid var(--ed-line);
  border-bottom: 2px solid var(--ed-line);
  min-height: 0;
  grid-auto-rows: auto;
}

/* ---- left: the result ---- */
.ed__stage {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border-right: 2px solid var(--ed-line);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; min-width: 0; overflow: hidden;
}
.ed__canvas { display: block; max-width: 100%; max-height: 560px; height: auto; image-rendering: pixelated; }
.ed__drop {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; text-align: center;
  padding: 24px; opacity: 0; transition: opacity .15s; pointer-events: none;
  background: rgba(4, 4, 6, 0.86);
}
.ed__stage:hover .ed__drop, .ed__drop.is-over { opacity: 1; pointer-events: auto; }
.ed__drop strong { font-family: var(--font-display); font-size: 16px; font-weight: 400; color: #fff; }
.ed__drop span { font-size: 13px; color: var(--ed-label); max-width: 42ch; line-height: 1.5; }

/* ---- right: the panel ---- */
.ed__panel { display: flex; flex-direction: column; background: var(--bg); min-width: 0; }
.ed__panel-head {
  height: 78px; padding: 0 24px; flex: 0 0 78px;
  border-bottom: 2px solid var(--ed-line);
  font-family: var(--font-display); font-size: 20px; line-height: 32px; color: var(--text);
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.ed__body { padding: 24px; display: flex; flex-direction: column; gap: 0; flex: 1; overflow-y: auto; }
.ed__group { font-family: var(--font-display); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ed-muted); margin: 0 0 14px; }
.ed__group + .ed__group, .ed__sep { margin-top: 22px; }
.ed__note { font-size: 12px; line-height: 1.55; color: var(--ed-muted); margin: 14px 0 0; }
.ed__actions { display: flex; flex-direction: column; gap: 10px; padding: 20px 24px;
  border-top: 2px solid var(--ed-line); }
.ed__actions .cta-primary, .ed__actions .cta-ghost { width: 100%; justify-content: center; }
.ed__status { font-size: 12px; color: var(--ed-muted); min-height: 16px; text-align: center; }

/* ---- app control-row (v2.css 518-575 + 4288-4323) ---- */
.ed .control-row { display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 12px 0; padding: 0; min-height: 0; gap: 10px 18px; flex-wrap: wrap; }
.ed .control-row:last-child { margin-bottom: 0; }
.ed .control-row label { font-size: 13px; color: var(--ed-label); flex: 0 1 auto; min-width: 0; font-weight: 400; }
.ed .control-row .right { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; justify-content: flex-end; }
.ed .control-row .value { font-size: 11px; color: var(--ed-muted); min-width: 28px; text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: "GeistPixel-Square", ui-monospace, "SF Mono", Menlo, monospace; font-weight: 400; }
.ed input[type="range"] { -webkit-appearance: none; appearance: none;
  width: 120px; max-width: 100%; min-width: 64px; flex: 1 1 auto;
  height: 3px; background: var(--v2-track); outline: none; padding: 0; }
.ed input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none;
  width: 11px; height: 11px; background: var(--v2-thumb);
  border: 0; border-radius: 0; box-shadow: none; cursor: pointer; margin-top: 0; }
.ed input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; background: var(--v2-thumb);
  border: 0; border-radius: 0; cursor: pointer; }
.ed input[type="range"]::-moz-range-track { height: 3px; background: var(--v2-track); }

/* ---- app select (v2.css .control-row select) ---- */
.ed .control-row select {
  background: var(--ed-field-bg); color: var(--ed-field-text);
  border: 1px solid var(--ed-field-border); border-radius: 4px;
  padding: 5px 28px 5px 9px; font-size: 12px; outline: none; cursor: pointer;
  -webkit-appearance: none; appearance: none; max-width: 100%; min-width: 0; flex: 1 1 auto;
  font-family: var(--font-body);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='rgba(255,255,255,0.55)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.ed .control-row select:hover { border-color: rgba(255, 255, 255, 0.22); }
/* outline:none above removes the only focus affordance; put one back. */
.ed input[type="range"]:focus-visible,
.ed .control-row select:focus-visible,
.ed__toggle:focus-visible,
.ed__pick:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* Keyboard users land on "Choose an image" first; reveal the overlay for them. */
.ed__stage:focus-within .ed__drop { opacity: 1; pointer-events: auto; }
.ed .control-row select option { background: #0f0f12; color: #fff; }

/* ---- toggle pill, app .style-pill shape ---- */
.ed__toggle { font-family: var(--font-display); font-size: 12px; letter-spacing: .03em;
  padding: 6px 12px; border: 1px solid var(--ed-field-border); background: transparent;
  color: var(--ed-label); cursor: pointer; transition: all .15s; }
.ed__toggle:hover { border-color: rgba(255,255,255,0.28); color: #fff; }
.ed__toggle[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }

/* ---- copyable text output, for the glyph styles ---- */
.ed__textwrap { border-top: 2px solid var(--ed-line); grid-column: 1 / -1; min-width: 0; }
.ed__texthead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 16px 24px 0; font-family: var(--font-display); font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ed-muted); }
.ed__text { margin: 10px 0 0; padding: 0 24px 22px; overflow: auto; max-height: 320px;
  font-family: Menlo, Monaco, "SF Mono", ui-monospace, monospace; font-size: 8px; line-height: 1;
  color: #fff; white-space: pre; }

.ed__source[hidden] { display: none !important; }

@media (max-width: 900px) {
  .ed { grid-template-columns: 1fr; }
  .ed__stage { border-right: 0; border-bottom: 2px solid var(--ed-line); }
  .ed__panel-head { height: 62px; flex-basis: 62px; font-size: 17px; }
  .ed__text { font-size: 6px; }
}

/* ---- Pro effect pages: same shell, no editor ---- */
/* The stage must not take its height from the image. A portrait source
   (613x820 on cmyk-dots) scaled to the column width and pushed the row to
   1046px. Fix the box to the homepage postfx ratio and let the image crop. */
.ed--pro .ed__stage { padding: 0; aspect-ratio: 1076 / 629; max-height: 620px; overflow: hidden; }
.ed__proimg { display: block; width: 100%; height: 100%; max-height: 620px; object-fit: cover; }
/* Same guard for the live editor: the canvas is free to be any shape. */
.ed__stage { max-height: 620px; }
.ed__canvas { max-height: 580px; }
.ed__prolist { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }
.ed__prolist li { font-size: 13.5px; line-height: 1.55; color: var(--ed-field-text); }
.ed__prolist li::marker { color: var(--ed-muted); }
