/* Support / Bug-Report form. Layers on top of styles.css + legal.css so the
   article frame, typography and dark-mode tokens come for free. */

.support-page { padding-bottom: 80px; }

.support-doc .legal-meta {
  font-size: 15px;
  color: var(--fg-soft);
  margin-bottom: 24px;
}

.js-warn {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--fg);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin: 0 0 24px 0;
}

/* ---- Form layout ---- */

.support-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 24px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.field .hint {
  font-weight: 400;
  color: var(--fg-mute);
  font-size: 13px;
}

.field .req {
  color: var(--accent);
  font-weight: 700;
}

.field input[type="text"],
.field input[type="email"],
.field textarea,
.field select {
  font: inherit;
  font-size: 15px;
  color: var(--fg);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

.field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.5;
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%237a8294' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  padding-right: 32px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

.hint-counter { text-align: right; margin: -2px 0 0 0; }

/* ---- Honeypot: invisible but reachable in the source ---- */

.hp-wrap {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Dropzone ---- */

.dropzone {
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  background: var(--bg-card);
  transition: border-color .15s, background .15s;
}

.dropzone.is-drop {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}

.dropzone-cta {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: var(--fg);
}

.dropzone-types {
  margin: 0;
  font-size: 12px;
  color: var(--fg-mute);
  letter-spacing: .04em;
}

.link-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-btn:hover { text-decoration-thickness: 2px; }

.file-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.file-item .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item .file-size { color: var(--fg-mute); font-size: 12px; font-variant-numeric: tabular-nums; }

.file-remove {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--fg-mute);
  font-size: 20px;
  line-height: 1;
  width: 24px; height: 24px;
  cursor: pointer;
  border-radius: 6px;
}
.file-remove:hover { background: color-mix(in srgb, var(--fg) 8%, transparent); color: var(--fg); }

.hint-budget { margin: 6px 2px 0 2px; font-size: 12px; color: var(--fg-mute); font-variant-numeric: tabular-nums; }

/* ---- Consent + submit ---- */

.consent label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-soft);
}
.consent input[type="checkbox"] { margin-top: 3px; }

.submit-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.submit-row .btn { min-width: 160px; justify-content: center; }
.submit-row .btn:disabled { opacity: .6; cursor: progress; }

.submit-status {
  font-size: 13px;
  color: var(--fg-mute);
}
.submit-status.is-error { color: #d54e3a; }

/* ---- Progress ---- */

.progress-wrap { margin-top: 4px; }

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .15s ease-out;
}

.progress-text {
  margin: 6px 0 0 0;
  font-size: 12px;
  color: var(--fg-mute);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---- Success / error panels ---- */

.support-success,
.support-error {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
  text-align: center;
}

.support-success h2,
.support-error h2 { margin: 0 0 8px 0; }

.support-error h2 { color: #d54e3a; }
