/* Glideball: the "Send feedback" page. Builds on /styles.css (tokens, buttons,
   nav, footer); this is only the form: one quiet group, native-looking fields. */

.fb-main { padding: clamp(36px, 6vw, 72px) 0 clamp(72px, 9vw, 110px); }
.fb-container { max-width: calc(720px + 2 * var(--gutter)); }
.fb-head { margin-bottom: 28px; }
.fb-title { font-size: clamp(34px, 5vw, 48px); }
.fb-head .body { margin-top: 12px; font-size: 19px; line-height: 1.5; }

.fb-card {
  display: grid;
  gap: 22px;
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--fill);
}
.fb-card[hidden] { display: none; }

/* ---- Fields ---- */
.fb-field { display: grid; gap: 8px; min-width: 0; }
.fb-label { font-size: 14px; font-weight: 600; color: var(--text); padding: 0; }
.fb-opt { font-weight: 400; color: var(--text-3); font-size: 13px; }
.fb-input {
  width: 100%;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* no zooming in on iPhone */
  line-height: 1.45;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.fb-input::placeholder { color: var(--text-3); }
.fb-input:hover { border-color: rgba(255, 255, 255, 0.24); }
.fb-input:focus { border-color: var(--ball); box-shadow: 0 0 0 3px rgba(77, 168, 255, 0.28); }
.fb-input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(255, 69, 58, 0.22); }
textarea.fb-input { resize: vertical; min-height: 140px; }
.fb-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 560px) { .fb-row { grid-template-columns: minmax(0, 1fr); } }

/* ---- Bug / Idea / Question: a segmented control ---- */
.fb-types { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.fb-seg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill-2);
}
.fb-type { position: relative; cursor: pointer; }
.fb-type input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.fb-type span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text-2);
  font-weight: 500;
  font-size: 15px;
  transition: background-color 0.15s, color 0.15s;
}
.fb-type span .icon { width: 1.1em; height: 1.1em; }
.fb-type:hover span { color: var(--text); }
.fb-type input:checked + span { color: var(--text); background: rgba(255, 255, 255, 0.16); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.fb-type input:focus-visible + span { outline: 2px solid var(--ball); outline-offset: 1px; }

/* ---- Pictures ---- */
.fb-drop {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 14px;
  border-radius: var(--r);
  border: 1px dashed var(--line-2);
  transition: border-color 0.15s, background-color 0.15s;
}
.fb-drop.over { border-color: var(--ball); background: rgba(77, 168, 255, 0.08); }
.fb-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}
.fb-drop-btn:hover { background: var(--fill); border-color: rgba(255, 255, 255, 0.24); }
.fb-drop-btn .icon { color: var(--text-2); }
#fb-files:focus-visible + .fb-drop-btn { outline: 2px solid var(--ball); outline-offset: 3px; }
.fb-drop-hint { color: var(--text-3); font-size: 14px; }
.fb-drop.full .fb-drop-btn { opacity: 0.5; pointer-events: none; }

.fb-thumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.fb-thumbs:empty { display: none; }
.fb-thumb { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-2); background: rgba(0, 0, 0, 0.25); }
.fb-thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.fb-thumb-cap { display: flex; justify-content: space-between; gap: 6px; padding: 6px 9px; font-size: 12.5px; color: var(--text-2); }
.fb-thumb-cap span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.fb-thumb-cap span:last-child { flex: none; white-space: nowrap; }
.fb-thumb.noimg img { visibility: hidden; }
.fb-thumb-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(11, 11, 16, 0.72);
  color: #fff;
  cursor: pointer;
}
.fb-thumb-x .icon { width: 15px; height: 15px; stroke-width: 2.2; }
.fb-thumb-x:hover { background: rgba(255, 69, 58, 0.85); }
.fb-note { color: var(--text-3); font-size: 14px; }
.fb-note:empty { display: none; }
.fb-note.bad { color: var(--bad); }

/* ---- Contact ---- */
.fb-check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; justify-self: start; }
.fb-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.fb-check.off { color: var(--text-3); cursor: default; }
.fb-check.off input { cursor: default; }

/* The honeypot: off screen, for bots that fill in every field. */
.fb-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---- Sending ---- */
.fb-error {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 69, 58, 0.4);
  background: rgba(255, 69, 58, 0.1);
  color: var(--text);
  font-size: 15px;
}
.fb-error[hidden] { display: none; }
.fb-error .icon { color: var(--bad); margin-top: 2px; }
.fb-actions { display: grid; gap: 14px; justify-items: start; padding-top: 4px; }
.fb-submit[disabled] { opacity: 0.7; cursor: progress; }
.fb-progress { width: 100%; height: 4px; border-radius: 2px; background: var(--fill-2); overflow: hidden; }
.fb-progress[hidden] { display: none; }
.fb-bar { height: 100%; width: 0; background: var(--ball); border-radius: inherit; transition: width 0.3s var(--ease); }
.fb-privacy { color: var(--text-3); font-size: 13.5px; }
@media (max-width: 560px) {
  .fb-actions { justify-items: stretch; }
  .fb-submit { width: 100%; }
}

/* ---- Sent ---- */
.fb-done { justify-items: center; text-align: center; padding-block: clamp(36px, 6vw, 56px); }
.fb-done:focus { outline: none; }
.fb-done .body { margin: 0 auto; }
.fb-done .cta-row { margin-top: 6px; justify-content: center; }
.fb-done-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ok);
  border: 1.5px solid rgba(48, 209, 88, 0.55);
  animation: fb-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.fb-done-mark .icon { width: 28px; height: 28px; stroke-width: 2.2; }
.fb-done-title { font-size: clamp(28px, 4vw, 36px); }
@keyframes fb-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fb-done-mark { animation: none; } }
