/* ==========================================================================
   Shared styles for the two public tool pages (/sell/ and /want/).
   Loaded after site.css, which supplies the theme custom properties via the
   inline <style> block each page carries.
   Big tap targets and 16px+ inputs throughout — iOS zooms the viewport on
   focus for anything under 16px, which feels broken on a phone.
   ========================================================================== */

.formpage { padding: 26px 0 46px; }

.backlink {
  display: inline-block; margin-bottom: 16px; font-size: .9rem;
  color: var(--steel); text-decoration: none; font-weight: 600;
}
.backlink:active { color: var(--brand); }

.formhead { margin-bottom: 22px; }
.formhead h1 { font-size: 1.85rem; font-weight: 800; margin: 0 0 8px; }
.formhead p { margin: 0; color: var(--steel); max-width: 52ch; }

.card {
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 12px; padding: 20px 18px 24px;
}

.field { margin-bottom: 18px; }
.field:last-of-type { margin-bottom: 0; }

label.lab {
  display: block; font-size: .74rem; text-transform: uppercase;
  letter-spacing: .1em; font-weight: 700; color: var(--steel); margin-bottom: 7px;
}
.lab .req { color: var(--brand); }
.hint { font-size: .84rem; color: var(--steel); margin: 6px 0 0; line-height: 1.45; }

input[type="text"], input[type="tel"], input[type="email"],
input[type="number"], select, textarea {
  width: 100%; font-size: 1.05rem; font-family: inherit; color: var(--ink);
  padding: 13px 12px; border: 2px solid var(--rule); border-radius: 8px;
  background: #fff; -webkit-appearance: none; appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--steel) 50%),
                    linear-gradient(135deg, var(--steel) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 38px;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }

/* Radio groups rendered as tappable rows rather than tiny dots. */
.choices { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: flex-start; gap: 11px;
  border: 2px solid var(--rule); border-radius: 8px; padding: 13px 13px;
  cursor: pointer; background: #fff;
}
.choice input { margin: 3px 0 0; width: 19px; height: 19px; flex: none; accent-color: var(--brand); }
.choice span { font-size: 1rem; line-height: 1.35; }
.choice.on { border-color: var(--brand); background: rgba(92,43,41,.045); }

/* --- Photo picker ------------------------------------------------------- */
.photopick {
  display: block; text-align: center; border: 2px dashed var(--rule);
  border-radius: 10px; padding: 24px 16px; cursor: pointer; background: #fff;
}
.photopick .pp-i { font-size: 1.7rem; display: block; margin-bottom: 6px; }
.photopick .pp-t { font-weight: 700; display: block; }
.photopick .pp-s { font-size: .85rem; color: var(--steel); display: block; margin-top: 3px; }
.photopick input[type="file"] { display: none; }

.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.thumbs:empty { display: none; }
.thumb { position: relative; }
.thumb img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--rule);
}
.thumb button {
  position: absolute; top: 4px; right: 4px; width: 26px; height: 26px;
  border-radius: 50%; border: none; background: rgba(22,17,13,.8); color: #fff;
  font-size: 1rem; line-height: 1; cursor: pointer; padding: 0;
}

/* --- Compliance notice -------------------------------------------------- */
.notice {
  background: rgba(142,149,155,.13); border-left: 4px solid var(--sterling);
  border-radius: 0 8px 8px 0; padding: 13px 14px; margin: 20px 0 0;
  font-size: .88rem; line-height: 1.5; color: var(--ink);
}
.notice strong { display: block; margin-bottom: 3px; }

/* --- Submit ------------------------------------------------------------- */
.submitrow { margin-top: 22px; }
.bigbtn {
  width: 100%; background: var(--brand); color: #fff; border: none;
  border-radius: 10px; padding: 17px; font-size: 1.12rem; font-weight: 800;
  font-family: inherit; cursor: pointer; letter-spacing: .01em;
}
.bigbtn:active { background: var(--brand-dark); }
.bigbtn[disabled] { opacity: .6; cursor: default; }

.msg { margin-top: 14px; font-weight: 700; font-size: .95rem; min-height: 1.2em; }
.msg.err { color: #a4262c; }
.msg.ok { color: var(--field); }

/* --- Success panel (replaces the form) ---------------------------------- */
.done { text-align: center; padding: 34px 20px; }
.done .d-i { font-size: 2.6rem; }
.done h2 { font-size: 1.5rem; font-weight: 800; margin: 12px 0 8px; }
.done p { color: var(--steel); margin: 0 auto 20px; max-width: 40ch; }

@media (min-width: 760px) {
  .formpage { padding: 40px 0 60px; }
  .card { padding: 28px 26px 30px; max-width: 620px; }
  .formhead h1 { font-size: 2.3rem; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
}
