/* ============================================================================
   LocalLights — the post flow's own pieces.

   Everything shared lives in css/style.css (.sheet, .field, .input, .btn,
   .typeahead, .ta-list, .minimap, .progress, .empty, .note). This file only
   draws what the post sheet alone needs: the chooser, the preview strip, the
   "Is this 412 N Governor St?" row, the note counter, the claim switch and
   the clip progress. Tokens only; nothing here names a colour.
   ========================================================================= */

/* ----------------------------------------------------------- chooser ---- */

.post-pick {
  display: flex;
  justify-content: center;
  gap: 18px;
  padding: 20px 8px 4px;
  flex-wrap: wrap;
}
.post-pick .tile {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 96px;
}
.post-pick .tile-box {
  width: 96px; height: 96px;
  border-radius: 20px;
  background: var(--night-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition: background .15s ease, transform .08s ease, box-shadow .15s ease;
}
.post-pick .tile-box svg { width: 36px; height: 36px; color: var(--amber); }
.post-pick .tile:active .tile-box { transform: translateY(1px); background: var(--night-3); }
@media (hover: hover) { .post-pick .tile:hover .tile-box { background: var(--night-3); box-shadow: 0 0 0 4px var(--glow); } }
.post-pick .tile:focus-visible { outline: none; }
.post-pick .tile:focus-visible .tile-box { outline: 3px solid var(--amber); outline-offset: 3px; }

.post-pick-note {
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
  padding: 16px 24px 4px;
  margin: 0;
}
.post-clipnote { margin-top: 2px; }

/* ----------------------------------------------------------- preview ---- */

.post-preview { position: relative; margin-bottom: 8px; }
.post-preview img,
.post-preview video {
  display: block;
  width: 100%;
  max-height: 38vh;
  object-fit: contain;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: var(--radius, 14px);
}
.post-preview .post-x {
  position: absolute;
  top: 8px; right: 8px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--night);
  color: var(--text);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  cursor: pointer;
}
.post-preview .post-x svg { width: 16px; height: 16px; }
.post-preview.is-dupe img, .post-preview.is-error img { opacity: .4; }

.post-cap {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--text-3);
  margin: 0 2px 14px;
  min-height: 24px;
}
.post-preview.is-dupe + .post-cap > span,
.post-preview.is-error + .post-cap > span { color: var(--danger); font-weight: 700; }

/* the whole-armful strip */
.post-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.post-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm, 9px);
  overflow: hidden;
  background: var(--night-2);
  border: 1px solid var(--line);
  padding: 0;
}
.post-thumb img, .post-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb .post-badge {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3px 5px;
  font-size: 10.5px; line-height: 1.2;
  color: var(--text-2);
  background: var(--night);
  opacity: .92;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.post-thumb.is-busy .post-badge { color: var(--amber); }
.post-thumb.is-dupe, .post-thumb.is-error { border-color: var(--danger); }
.post-thumb.is-dupe img, .post-thumb.is-error img { opacity: .35; }
.post-thumb.is-dupe .post-badge, .post-thumb.is-error .post-badge { color: var(--danger); }
.post-thumb-x {
  position: absolute; top: 4px; right: 4px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--night);
  color: var(--text);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  padding: 0; cursor: pointer;
}
.post-thumb-x svg { width: 12px; height: 12px; }
.post-thumb.post-add {
  display: grid; place-items: center;
  border-style: dashed;
  color: var(--text-2);
  font-size: 28px; font-weight: 700;
  cursor: pointer;
}
.post-thumb.post-add:active { background: var(--night-3); }

.post-clip-wait {
  display: grid; place-items: center; gap: 6px;
  width: 100%; aspect-ratio: 16 / 9;
  color: var(--text-3);
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: var(--radius, 14px);
}
.post-thumb .post-clip-wait { aspect-ratio: 1; border: 0; border-radius: 0; }
.post-clip-wait svg { width: 34px; height: 34px; color: var(--amber); }
.post-clip-wait span { font-size: 12.5px; }

/* ----------------------------------------------------- clip progress ---- */

.post-clipprog { margin-bottom: 14px; }
.post-clipprog .post-loc-line { margin: 0 0 6px; color: var(--amber); }
.post-clipprog .progress { margin-top: 0; }

/* ---------------------------------------------------------- location ---- */

.post-loc {
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: var(--radius, 14px);
  padding: 12px;
  margin-bottom: 14px;
}
.post-loc .field { margin-bottom: 10px; }
.post-loc-status b { display: block; font-size: 14.5px; color: var(--text); line-height: 1.3; }
.post-loc-status span { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }

/* "Is this 412 N Governor St?" */
.post-confirm-q {
  font-family: var(--display);
  font-weight: 600;
  font-size: 21px;
  line-height: 1.25;
  color: var(--text);
}
.post-confirm-q b { color: var(--amber); font-weight: 700; }
.post-confirm-q small {
  display: block;
  font-family: var(--body);
  font-weight: 400;
  font-size: 13px;
  color: var(--text-3);
  margin-top: 3px;
}
.post-confirm-row { display: flex; gap: 9px; margin-top: 12px; }
.post-confirm-row .btn { flex: 1 1 auto; min-height: 44px; }

/* the agreed address, with a way out */
.post-loc-set { display: flex; align-items: center; gap: 10px; }
.post-loc-set .post-loc-status { flex: 1 1 auto; min-width: 0; }
.post-loc-set .post-loc-status b { color: var(--amber); overflow: hidden; text-overflow: ellipsis; }
.post-loc-set .btn { flex: 0 0 auto; }

/* the ask: typeahead, GPS, pin */
.post-loc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.post-loc-actions .btn { min-height: 40px; }
.post-loc-line {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--text-3);
  margin: 9px 0 0;
}
.post-loc-line.ok { color: var(--ok); }
.post-loc-line.bad { color: var(--danger); }
.post-loc .minimap { height: 220px; border-color: var(--line); }
.post-pin-help { margin: 7px 0 0; }
.post-tip {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-3);
  margin: 10px 0 0;
}
.post-tip b { color: var(--text-2); }

/* the draggable pin on the minimap */
.post-pin {
  width: 26px; height: 26px;
  background: var(--amber);
  border: 2px solid var(--night);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 0 0 5px var(--glow), 0 3px 8px rgba(0, 0, 0, .5);
}

/* typeahead rows: the house number leads, the city trails */
.ta-item .ta-num { font-weight: 800; margin-right: 6px; }
.ta-item .ta-street { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-item .ta-city { margin-left: auto; padding-left: 10px; font-size: 12.5px; white-space: nowrap; }
.ta-item.on .ta-city { color: inherit; opacity: .8; }

/* -------------------------------------------------------------- note ---- */

.post-count { text-align: right; font-size: 11px; color: var(--text-3); margin-top: 4px; }
.post-count.near { color: var(--amber); }
.post-count.over { color: var(--danger); }

/* ------------------------------------------------------------- claim ---- */

.post-claim {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: var(--radius, 14px);
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.post-claim input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.post-claim-text { flex: 1 1 auto; min-width: 0; }
.post-claim-text b { display: block; font-size: 14.5px; color: var(--text); }
.post-claim-text span { display: block; font-size: 12px; color: var(--text-3); margin-top: 1px; }
.post-switch {
  flex: 0 0 auto;
  position: relative;
  width: 46px; height: 28px;
  border-radius: 14px;
  background: var(--night-3);
  border: 1px solid var(--line);
  transition: background .15s ease, border-color .15s ease;
}
.post-switch::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform .15s ease, background .15s ease;
}
.post-claim input:checked ~ .post-switch { background: var(--amber); border-color: var(--amber); }
.post-claim input:checked ~ .post-switch::after { transform: translateX(18px); background: var(--night); }
.post-claim input:focus-visible ~ .post-switch { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ----------------------------------------------------------- submit ----- */

.post-sub { text-align: center; margin: 8px 0 0; }

/* -------------------------------------------------------------- done ---- */

.post-done .big { display: flex; justify-content: center; }
.post-bulb { width: 64px; height: 64px; filter: drop-shadow(0 0 14px var(--glow)); }
.post-done .post-claimline { color: var(--amber); font-size: 13.5px; margin-top: 10px; }
.post-done .btn-row { justify-content: center; margin-top: 18px; }
.post-done .btn-row .btn { flex: 0 1 auto; }
