/* shutterai.cam — disposable camera filter tool.
   The card around the tool comes from article.css (.a-body .tool); this file
   only adds the controls. Everything reuses the site custom properties
   (--cream, --ink, --plum, --line, --radius, --serif, --sans). */

.dz { font-family: var(--sans); max-width: none; }
.dz p { max-width: none; }

.dz-note {
  font-size: .82rem;
  color: var(--muted);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.dz-note::before { content: "✦"; color: var(--gold); }

/* ---------- drop zone ---------- */
.dz-drop {
  position: relative;
  border: 1.5px dashed var(--line);
  border-radius: 16px;
  background: var(--cream);
  padding: clamp(1.4rem, 4.5vw, 2.6rem) 1.2rem;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}
.dz-drop.is-over { border-color: var(--plum); background: var(--blush-2); }
.dz-drop:focus-within { border-color: var(--plum); box-shadow: 0 0 0 3px rgba(109, 44, 79, .18); }
.dz.has-image .dz-drop { padding: .85rem 1.05rem; text-align: left; }

.dz-drop-label {
  display: inline-block;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
  cursor: pointer;
  margin: 0 0 .35rem;
}
.dz.has-image .dz-drop-label { font-family: var(--sans); font-size: .92rem; font-weight: 700; }
.dz-hint { font-size: .82rem; color: var(--muted); margin: 0; }
.dz.has-image .dz-hint { display: none; }

/* The file input stays a real, focusable, labelled control: it is only made
   plain, never display:none, so it works with a keyboard and a screen reader. */
.dz-file {
  display: block;
  margin: .7rem auto 0;
  font: inherit;
  font-size: .85rem;
  color: var(--ink-2);
  max-width: 100%;
}
.dz.has-image .dz-file { margin: .5rem 0 0; }
.dz-file::file-selector-button {
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  font-family: var(--sans);
  border: 1px solid transparent;
  background: var(--ink);
  color: var(--cream);
  border-radius: 999px;
  padding: .5rem 1rem;
  margin-right: .7rem;
  cursor: pointer;
}
.dz-file::file-selector-button:hover { background: var(--plum); }
.dz-file:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }

/* ---------- stage ---------- */
.dz-stage { margin-top: 1.1rem; }
.dz-stage[hidden] { display: none; }
.dz-frame {
  background: repeating-conic-gradient(var(--cream-2) 0% 25%, #fff 0% 50%) 50% / 18px 18px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  display: flex;
  justify-content: center;
}
#dz-canvas { display: block; max-width: 100%; height: auto; max-height: 70vh; }
.dz-status { font-size: .8rem; color: var(--muted); margin: .55rem 0 0; min-height: 1.1em; }

/* ---------- error ---------- */
.dz-error {
  margin: 1rem 0 0;
  padding: .75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(109, 44, 79, .35);
  border-left: 3px solid var(--plum);
  background: var(--blush-2);
  color: var(--ink);
  font-size: .92rem;
  font-weight: 600;
}
.dz-error[hidden] { display: none; }

/* ---------- controls ---------- */
.dz-controls { margin: 1.3rem 0 0; border: 0; padding: 0; min-width: 0; }
.dz-controls[hidden] { display: none; }
.dz-controls > legend {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--plum);
  padding: 0;
  margin-bottom: .7rem;
}
.dz-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 1.6rem;
}
.dz-field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.dz-field > label { font-size: .85rem; font-weight: 700; color: var(--ink); }
.dz-field output { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }

.dz-field input[type="range"] { width: 100%; accent-color: var(--plum); height: 1.6rem; margin: 0; }
.dz-field input[type="range"]:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }

.dz-check { display: flex; align-items: center; gap: .55rem; font-size: .9rem; font-weight: 600; color: var(--ink); }
.dz-check input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--plum); margin: 0; }
.dz-check input[type="checkbox"]:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }

.dz-field input[type="date"] {
  font: inherit;
  font-size: .9rem;
  font-family: var(--sans);
  padding: .5rem .7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  max-width: 100%;
}
.dz-field input[type="date"]:focus-visible { outline: 2px solid var(--plum); outline-offset: 2px; }

.dz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
  margin-top: 1.2rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.dz-actions .btn { font-size: .9rem; padding: .7rem 1.2rem; }
.dz-actions .btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.dz-actions .btn:focus-visible { outline: 2px solid var(--plum); outline-offset: 3px; }

@media (max-width: 640px) {
  .dz-actions .btn { flex: 1 1 auto; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .dz-drop, .dz-actions .btn { transition: none; }
}
