/* ===== Rocketize your pic (index.html) — 🚀 sticker editor. Brand tokens/utilities come from styles.css. ===== */

/* --- "how it works" strip --- */
.rz-steps { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.1rem; margin: -1.2rem auto 1.8rem; padding: 0; max-width: 760px; }
.rz-steps li { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-dim); font-weight: 600; font-size: max(var(--text-floor), 0.92rem); }
/* decorative separator only — the alt-text form keeps it out of the accessibility tree (engines without it show no arrow) */
.rz-steps li + li::before { content: '→' / ''; color: var(--text-dim); font-weight: 800; margin-right: 0.3rem; }
.rz-step-num {
  width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; place-content: center; line-height: 1; flex: 0 0 30px;
  font-family: 'Luckiest Guy', 'Rubik', cursive; font-size: max(var(--text-floor), 1rem); color: var(--on-green);
  background: linear-gradient(180deg, var(--green-bright), var(--green-dark)); box-shadow: 0 3px 0 var(--green-dark);
}

.rz-card { padding: 1.2rem; }

/* --- empty state / drop zone --- */
.rz-drop {
  border: 2px dashed var(--g-lit); border-radius: 18px; padding: 1.6rem 1rem; text-align: center;
  background: rgba(16,22,35,0.6); transition: border-color 0.15s ease, background 0.15s ease;
}
.rz-drop.is-over { border-color: var(--green-bright); background: color-mix(in srgb, var(--green) 8%, transparent); }
.rz-drop-title { font-family: 'Luckiest Guy', 'Rubik', cursive; font-size: max(var(--text-floor), 1.5rem); color: var(--green-bright); margin: 0 0 0.25rem; letter-spacing: 0.02em; }
.rz-drop-sub { color: var(--text-dim); font-size: max(var(--text-floor), 0.9rem); margin: 0 0 1rem; }
.rz-private { color: var(--text-dim); font-size: max(var(--text-floor), 0.82rem); margin: 0.9rem 0 0; }

/* CSS-only illustration: a tilted polaroid with a sky/sun/hills scene and a bobbing rocket */
.rz-empty { position: relative; width: 150px; height: 132px; margin: 0 auto 1rem; }
.rz-polaroid {
  position: absolute; inset: 0; background: #eef4ff; border-radius: 8px; transform: rotate(-4deg);
  box-shadow: 0 12px 26px rgba(0,0,0,0.45);
}
.rz-polaroid::before {
  content: ''; position: absolute; inset: 10px 10px 30px; border-radius: 4px;
  background: linear-gradient(180deg, #1d3a6b 0%, #2a7fb0 62%, #4c8a00 62%, #3e7000 100%);
}
.rz-sun { position: absolute; top: 22px; right: 28px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 14px rgba(255,179,64,0.85); }
.rz-hills {
  position: absolute; left: 10px; right: 10px; bottom: 30px; height: 44px; border-radius: 0 0 4px 4px; overflow: hidden;
  background: radial-gradient(circle at 28% 110%, #6dbf00 0 58%, transparent 59%), radial-gradient(circle at 78% 115%, #7e9a00 0 52%, transparent 53%);
}
.rz-float { position: absolute; left: -16px; bottom: -8px; font-size: max(var(--text-floor), 2.5rem); line-height: 1; animation: rz-bob 2.6s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes rz-bob { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-10px) rotate(4deg); } }

/* --- editor layout --- */
.rz-editor { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.2rem; align-items: start; }
.rz-stage {
  background: var(--ink); border: 1.5px solid var(--ink-4); border-radius: 14px; padding: 0.6rem; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
/* pan-y: a thumb scrolling past the picture on a phone still scrolls the page (rockets are added on a clean tap only);
   rocketize.js cancels the scroll per-touch when the finger lands on a rocket so it can be dragged */
#rz-canvas { display: block; max-width: 100%; max-height: 72vh; width: auto; height: auto; border-radius: 8px; touch-action: pan-y; cursor: crosshair; background: var(--ink-2); }
#rz-canvas:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 3px; }
.rz-stage-hint { color: var(--text-dim); font-size: max(var(--text-floor), 0.82rem); text-align: center; margin: 0; }

.rz-tools { display: grid; gap: 0.9rem; min-width: 0; }
.rz-group { background: var(--ink-2); border: 1.5px solid var(--ink-4); border-radius: 14px; padding: 0.9rem; display: grid; gap: 0.6rem; min-width: 0; }
.rz-group-title { font-weight: 800; font-size: max(var(--text-floor), 0.76rem); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin: 0; }
.rz-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.rz-row .btn { flex: 1 1 auto; min-width: 0; white-space: normal; }
.rz-sel { margin: 0; font-size: max(var(--text-floor), 0.88rem); color: var(--text); font-weight: 600; min-height: 1.3em; }

.rz-field { display: grid; gap: 0.25rem; }
.rz-field label { display: flex; justify-content: space-between; gap: 0.5rem; font-weight: 700; font-size: max(var(--text-floor), 0.9rem); color: var(--text); }
.rz-field output { color: var(--green-bright); font-variant-numeric: tabular-nums; }
.rz-slider-row { display: flex; align-items: center; gap: 0.4rem; min-width: 0; }
.rz-slider-row input[type=range] { flex: 1 1 auto; min-width: 0; }
.rz-tools input[type=range]:disabled { opacity: 0.45; cursor: not-allowed; }
.rz-step-btn {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; border: 2px solid var(--ctl-fill-lo); background: var(--ctl-fill-lo);
  color: var(--ctl-ink); font-family: 'Rubik', sans-serif; font-weight: 800; font-size: max(var(--text-floor), 1.3rem); line-height: 1; cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}
.rz-step-btn:hover:not(:disabled) { border-color: var(--green); background: var(--ctl-fill-hi); color: var(--ctl-ink); }
.rz-step-btn:disabled { background: var(--ctl-fill-dis); border-color: var(--ctl-fill-dis); color: var(--ctl-ink); opacity: 1; cursor: not-allowed; }
.rz-tools .btn:disabled, .rz-tools .btn[aria-disabled="true"] { background: var(--ctl-fill-dis); color: var(--ctl-ink); border-color: transparent; box-shadow: none; text-shadow: none; opacity: 1; cursor: not-allowed; transform: none !important; }
.rz-kbd { margin: 0; font-size: max(var(--text-floor), 0.78rem); color: var(--text-dim); line-height: 1.5; }
.rz-kbd kbd { font-family: inherit; font-weight: 800; color: var(--text); }

.rz-actions .btn { width: 100%; white-space: normal; }
.rz-note { margin: 0; font-size: max(var(--text-floor), 0.8rem); color: var(--text-dim); line-height: 1.5; }
.rz-status { margin: 0; min-height: 1.4em; font-size: max(var(--text-floor), 0.9rem); line-height: 1.45; color: var(--text-dim); font-weight: 600; overflow-wrap: anywhere; }
.rz-status.is-err { color: var(--red); }
.rz-status.is-ok { color: var(--green-bright); }
.rz-status a { color: var(--gold); font-weight: 800; }

/* --- responsive --- */
@media (max-width: 860px) {
  .rz-editor { grid-template-columns: 1fr; }
  #rz-canvas { max-height: 60vh; }
}
@media (max-width: 480px) {
  .rz-card { padding: 0.9rem; }
  .rz-drop { padding: 1.2rem 0.6rem; }
  .rz-steps li { font-size: max(var(--text-floor), 0.85rem); }
  .rz-group { padding: 0.75rem; }
  .rz-row .btn { flex-basis: 100%; }
}

/* --- reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  .rz-float { animation: none; }
  .rz-drop, .rz-step-btn { transition: none; }
}
