/**
 * Filigrane — page-specific styles (CyberRamen.com)
 * Builds on the shared design system (main.css / tools.css). Reuses existing
 * tokens only: --cream*, --ink*, --red, --font-display, --font-mono.
 */

/* Trust strip pinned near the drop zone */
.fil-trust {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 2px solid var(--red);
  background: var(--cream-dark);
  color: var(--ink);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.fil-trust .fil-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); flex: 0 0 auto;
}

/* Layout: controls + preview side by side, stacks on mobile */
.fil-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 820px) {
  .fil-grid { grid-template-columns: 1fr; }
}

/* Drop zone */
.fil-dropzone {
  border: 3px dashed var(--cream-darker);
  border-radius: 8px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--cream);
  transition: border-color 0.2s, background 0.2s;
}
.fil-dropzone:hover,
.fil-dropzone:focus-visible,
.fil-dropzone--over {
  border-color: var(--red);
  background: var(--cream-dark);
  outline: none;
}
.fil-dropzone .fil-dz-icon { font-size: 2.75rem; margin-bottom: 0.4rem; }
.fil-dropzone .fil-dz-title { font-weight: 700; color: var(--ink); margin: 0 0 0.3rem; font-size: 1.05rem; }
.fil-dropzone .fil-dz-sub { color: var(--ink-muted); margin: 0; font-size: 0.85rem; }

/* Controls */
.fil-field { margin-bottom: 1.1rem; }
.fil-field > label {
  display: block; margin-bottom: 0.35rem;
  font-weight: 600; color: var(--ink); font-size: 0.9rem;
}
.fil-select, .fil-textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 2px solid var(--cream-darker);
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  border-radius: 4px;
}
.fil-textarea { resize: vertical; min-height: 3.2rem; line-height: 1.5; }
.fil-select:focus, .fil-textarea:focus {
  outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red);
}

.fil-slider-row { display: flex; align-items: center; gap: 0.75rem; }
.fil-slider-row input[type="range"] { flex: 1; accent-color: var(--red); }
.fil-slider-row .fil-slider-val {
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--red);
  min-width: 3.5rem; text-align: right; font-weight: 700;
}

/* Colour swatches */
.fil-swatches { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.fil-swatch { position: relative; }
.fil-swatch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.fil-swatch span {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.6rem; border: 2px solid var(--cream-darker);
  border-radius: 4px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink);
}
.fil-swatch .fil-chip { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,0.2); }
.fil-swatch input:checked + span { border-color: var(--red); background: var(--cream-dark); }
.fil-swatch input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

/* Toggle */
.fil-toggle { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-mono); font-size: 0.88rem; color: var(--ink); }
.fil-toggle input { accent-color: var(--red); width: 1.05rem; height: 1.05rem; }

/* Preview */
.fil-preview-wrap {
  border: 2px solid var(--cream-darker);
  border-radius: 8px;
  background: var(--cream-dark);
  padding: 0.75rem;
  min-height: 260px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#fil-preview-canvas { max-width: 100%; height: auto; border-radius: 4px; box-shadow: 0 1px 6px rgba(0,0,0,0.15); }
.fil-preview-empty { color: var(--ink-muted); font-size: 0.9rem; text-align: center; padding: 2rem 1rem; }
.fil-preview-note { color: var(--ink-muted); font-size: 0.78rem; margin: 0.6rem 0 0; text-align: center; }

/* Queue */
.fil-queue { list-style: none; margin: 0; padding: 0; }
.fil-queue-item {
  display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between;
  padding: 0.7rem 0.85rem; border: 1px solid var(--cream-darker); border-radius: 6px;
  background: var(--cream); margin-bottom: 0.6rem;
}
.fil-queue-main { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; flex: 1; }
.fil-queue-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.fil-queue-meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink-muted); }
.fil-queue-status { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-muted); }
.fil-queue-status.fil-ok { color: #2a7d2a; font-weight: 700; }
.fil-queue-status.fil-err { color: var(--red); font-weight: 700; }
.fil-queue-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.btn.fil-mini { font-size: 0.78rem; padding: 0.3rem 0.7rem; }

/* Action bar */
.fil-actions {
  display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center;
  margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--cream-darker);
}
.fil-panic { margin-left: auto; }
.fil-panic.btn { border-color: var(--red); color: var(--red); }
.fil-panic.btn:hover { background: var(--red); color: var(--cream); }

/* Opt-in / disclosure note boxes */
.fil-note {
  border-left: 4px solid var(--red);
  background: var(--cream-dark);
  padding: 0.85rem 1rem;
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--ink-light);
  line-height: 1.55;
  margin: 1rem 0;
}
.fil-note strong { color: var(--ink); }

.fil-checkable { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-muted); }
.fil-checkable code {
  background: var(--cream-dark); padding: 0.1rem 0.35rem; border-radius: 3px;
  font-family: var(--font-mono); color: var(--red);
}
