/* Resize / Scale, VOL.01 theme. Prefix `rz-`, root #resize. */

#resize { color: var(--text); max-width: 1000px; margin: 0 auto; padding: clamp(10px,2.2vmin,22px) 16px 20px; }
#resize .rz-hero { text-align: center; margin-bottom: clamp(14px,2.8vmin,24px); }
#resize .rz-hero h1 {
  margin: 0 0 8px; font-size: clamp(1.7rem,5.4vmin,2.9rem); font-weight: 800;
  letter-spacing: 0.05em; text-transform: uppercase; color: #ededed;
  text-shadow: -0.7px 0 rgba(255,0,70,0.5), 0.7px 0 rgba(0,235,220,0.45);
}
#resize .lead-answer { color: var(--muted); font-size: clamp(0.82rem,1.6vmin,0.98rem); line-height: 1.55; max-width: 640px; margin: 0 auto; }

#resize .rz-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  min-height: clamp(150px,26vmin,210px); padding: 26px 20px; border: 1.5px dashed rgba(255,255,255,0.18);
  border-radius: 16px; background: var(--panel); cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
#resize .rz-drop[hidden] { display: none; }
#resize .rz-drop:hover, #resize .rz-drop:focus-visible { border-color: var(--line-hover); box-shadow: 0 10px 40px rgba(255,60,60,0.1); outline: none; }
#resize .rz-drop.drag { border-color: var(--accent); border-style: solid; background: rgba(255,60,60,0.06); }
#resize .rz-drop-ic { width: 40px; height: 40px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
#resize .rz-drop-title { font-size: clamp(1rem,2.4vmin,1.25rem); font-weight: 800; color: #ededed; }
#resize .rz-drop-sub { font-size: 12.5px; color: var(--muted); }
#resize .rz-drop-sub u { color: #d7d7d7; }

#resize .rz-editor { display: grid; grid-template-columns: 1fr minmax(240px,300px); gap: clamp(16px,2.6vmin,30px);
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(16px,2.6vmin,26px); }
#resize .rz-editor[hidden] { display: none; }

#resize .rz-stage-col { min-width: 0; }
#resize .rz-preview-wrap {
  display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-height: 220px;
  overflow: hidden; /* clips the selection's dim box-shadow to the frame */
  background-color: #141414;
  background-image: linear-gradient(45deg,#1c1c1c 25%,transparent 25%),linear-gradient(-45deg,#1c1c1c 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#1c1c1c 75%),linear-gradient(-45deg,transparent 75%,#1c1c1c 75%);
  background-size: 22px 22px; background-position: 0 0,0 11px,11px -11px,-11px 0;
}
/* the stage wraps the image exactly so overlay coords match the pixels */
#resize .rz-stage { position: relative; display: inline-block; line-height: 0; max-width: 100%; touch-action: none; }
#resize #rzPreview { display: block; max-width: 100%; max-height: 56vh; width: auto; height: auto; border-radius: 4px; user-select: none; -webkit-user-drag: none; }

/* the draggable selection box */
#resize .rz-crop {
  position: absolute; box-sizing: border-box;
  border: 1.5px solid #fff; cursor: move; touch-action: none;
  box-shadow: 0 0 0 4000px rgba(0, 0, 0, 0.55); /* dims everything outside */
}
/* rule-of-thirds guides */
#resize .rz-crop::before,
#resize .rz-crop::after { content: ""; position: absolute; pointer-events: none; }
#resize .rz-crop::before { left: 33.33%; right: 33.33%; top: 0; bottom: 0; border-left: 1px solid rgba(255,255,255,0.35); border-right: 1px solid rgba(255,255,255,0.35); }
#resize .rz-crop::after  { top: 33.33%; bottom: 33.33%; left: 0; right: 0; border-top: 1px solid rgba(255,255,255,0.35); border-bottom: 1px solid rgba(255,255,255,0.35); }

/* handles */
#resize .rz-h {
  position: absolute; width: 13px; height: 13px; box-sizing: border-box;
  background: #fff; border: 1px solid #0a0a0a; border-radius: 2px;
  transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
#resize .rz-h[data-h="nw"] { left: 0;    top: 0;    cursor: nwse-resize; }
#resize .rz-h[data-h="n"]  { left: 50%;  top: 0;    cursor: ns-resize; }
#resize .rz-h[data-h="ne"] { left: 100%; top: 0;    cursor: nesw-resize; }
#resize .rz-h[data-h="e"]  { left: 100%; top: 50%;  cursor: ew-resize; }
#resize .rz-h[data-h="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
#resize .rz-h[data-h="s"]  { left: 50%;  top: 100%; cursor: ns-resize; }
#resize .rz-h[data-h="sw"] { left: 0;    top: 100%; cursor: nesw-resize; }
#resize .rz-h[data-h="w"]  { left: 0;    top: 50%;  cursor: ew-resize; }
/* locked to a ratio: only corner handles are meaningful */
#resize .rz-stage.rz-locked .rz-h.edge { display: none; }

#resize .rz-stat { margin-top: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
#resize .rz-stat strong { color: #ededed; }
#resize .rz-stat .rz-out { color: #a7e0a0; font-weight: 700; }
#resize .rz-tip { margin: 8px 0 0; font-size: 11px; color: #7a7a7a; text-align: center; }
#resize .rz-hint { margin-top: 8px; font-size: 11px; color: #7a7a7a; min-height: 1em; }

#resize .rz-controls { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
#resize .rz-group-title { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
#resize .rz-dims { display: flex; align-items: center; gap: 8px; }
#resize .rz-dims input[type="number"] {
  width: 100%; background: var(--tile); color: var(--text); border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 10px; font: inherit; font-size: 14px; text-align: center; min-width: 0;
}
#resize .rz-dims span { color: var(--muted); font-size: 13px; }
#resize .rz-lock { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: #cfcfcf; cursor: pointer; }
#resize .rz-lock input { accent-color: var(--accent); width: 15px; height: 15px; }

#resize .rz-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
#resize .rz-seg button { background: transparent; border: none; border-right: 1px solid var(--line); cursor: pointer; color: var(--muted); font-size: 11.5px; font-weight: 700; padding: 8px 12px; transition: all 0.15s ease; }
#resize .rz-seg button:last-child { border-right: none; }
#resize .rz-seg button:hover { color: #fff; }
#resize .rz-seg button.on { background: var(--accent); color: #0a0a0a; }

#resize input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 999px; background: var(--line); outline: none; }
#resize input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid #0a0a0a; }
#resize input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--accent); cursor: pointer; border: 2px solid #0a0a0a; }
#resize .rz-slider { display: flex; align-items: center; gap: 12px; }
#resize .rz-slider label { flex: none; width: 62px; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

#resize .rz-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--tile); color: #d7d7d7; border: 1px solid var(--line); border-radius: 11px; padding: 11px 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; cursor: pointer; transition: all 0.15s ease; }
#resize .rz-btn:hover { border-color: var(--line-hover); color: #fff; }
#resize .rz-btn-primary { width: 100%; background: var(--accent); color: #0a0a0a; border-color: var(--accent); text-transform: uppercase; font-weight: 800; }
#resize .rz-btn-primary:hover { transform: translateY(-1px); filter: brightness(1.08); color: #0a0a0a; }
#resize .rz-msg { text-align: center; margin: 14px auto 0; font-size: 13px; color: #e78; min-height: 1em; }

@media (max-width: 820px) { #resize .rz-editor { grid-template-columns: 1fr; } }
@media (max-width: 560px) { #resize { padding-left: 12px; padding-right: 12px; overflow-x: hidden; } #resize .rz-hero h1 { font-size: clamp(1.35rem,7vmin,1.9rem); } }
