/* fcc.cc /tickets/ — Archetype E utility-form styling
   Pairs with the shared fcc-archetypes.css .utility-* primitives.
   Overrides + page-local extras only. */

/* Visually-hidden h1 for accessibility */
.fcc-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Mirror the inline-style "auto-saved as draft" stamp from the mocks
   without using inline style (CSP-compliant). */
.autosave-stamp {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Ticket status feedback line — sits in the field-actions row. */
.ticket-status {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  min-height: 1em;
}
.ticket-status[data-ok="true"]  { color: var(--accent); }
.ticket-status[data-ok="false"] { color: #c0392b; }
.ticket-status.ticket-status-ok    { color: var(--accent); }
.ticket-status.ticket-status-error { color: #c0392b; }

/* Honeypot field — hidden from sighted users + assistive tech. */
.ticket-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}

/* Submit/cancel hover affordance — keep the design's minimal feel. */
.btn-submit:hover  { filter: brightness(1.08); cursor: pointer; }
.btn-submit:active { filter: brightness(0.96); }
.btn-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-cancel:hover  { color: var(--ink); border-color: var(--ink-3); cursor: pointer; }

/* Screenshot dropzone — paper-bg with dashed rule, matches .field .input
   tone but communicates "drop a file here". */
.screenshot-dropzone {
  position: relative;
  background: var(--paper);
  border: 1.5px dashed var(--rule);
  min-height: 84px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.screenshot-dropzone:hover,
.screenshot-dropzone.drag-over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--paper));
}
.screenshot-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%; height: 100%;
  cursor: pointer;
  z-index: 2;
}
.screenshot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
  pointer-events: none;
  text-align: center;
}
.screenshot-hint {
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.screenshot-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px;
  width: 100%;
}
.screenshot-preview[hidden] { display: none !important; }
.screenshot-preview img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  display: block;
  border: 1px solid var(--rule);
}
.screenshot-remove {
  position: relative;
  z-index: 3;
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink-3);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 6px 10px;
  cursor: pointer;
}
.screenshot-remove:hover { color: var(--ink); border-color: var(--ink-3); }

/* select needs sane appearance reset on form elements (the .field .select
   in fcc-archetypes.css is a span-based mock; we use real <select>).  */
.utility-form select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
                    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
  font-style: normal;
  color: var(--ink);
}
.utility-form select.input option { color: var(--ink); background: var(--paper); }

/* Native textareas/inputs use the .field .input italic-serif style by
   default; restore non-italic for the rendered value while keeping
   italic placeholders. */
.utility-form input.input,
.utility-form textarea.input {
  font-style: normal;
  color: var(--ink);
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}
.utility-form input.input::placeholder,
.utility-form textarea.input::placeholder {
  font-style: italic;
  color: var(--ink-3);
}

/* Aside blurb — match the design's prose tone without inline styles. */
.utility-aside .aside-blurb {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-2);
}
.utility-aside .aside-blurb a { color: var(--accent); }

/* Responsive: collapse the 2-col body + 2-col field rows on narrower screens */
@media (max-width: 920px) {
  .utility-body { grid-template-columns: 1fr; gap: 32px; }
  .utility-form { padding: 24px 22px; }
  .field-row { grid-template-columns: 1fr; gap: 14px; }
}
