/* ─── Listing form ─────────────────────────────────────────────────────
   Loaded AFTER site.css so it can override anything that conflicts.
   Self-contained: prefixes everything with .lf- or #listing-form to
   avoid leaking into other pages.
*/

.listing-form {
  max-width: 920px;
  margin: 0 auto;
  padding-bottom: 4rem;
}

.listing-form__header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--bs-border-color, #e5e7eb);
}

/* ─── Section card ──────────────────────────────────────────────────── */
.lf-section {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.lf-section__title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: rgba(14, 45, 50, 0.87);
}

.lf-section__hint {
  font-size: 0.75rem;
  font-weight: 400;
  color: #6c757d;
  margin-left: 0.25rem;
}

/* Hidden by JS when the chosen transaction doesn't match data-show-for */
.lf-section[data-show-for]:not([data-active]) {
  display: none;
}

/* ─── Field & row layout ────────────────────────────────────────────── */
.lf-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.lf-row:last-child { margin-bottom: 0; }

.lf-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.75rem;
}
.lf-field:last-child { margin-bottom: 0; }

.lf-field--full {
  grid-column: 1 / -1;
}

.lf-field--wide {
  grid-column: span 2;
}

.lf-label {
  font-size: 0.78rem;
  color: #4a5560;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.lf-field .form-control,
.lf-field .form-select {
  font-size: 0.85rem;
}

/* ─── Sub-section group (e.g. "Indoor", "Communal") ─────────────────── */
.lf-group {
  margin: 0.75rem 0;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.lf-group:first-child {
  border-top: none;
  padding-top: 0;
}

.lf-group__title {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 0.5rem;
}

/* ─── Pill toggles (y/n/ask cycling) ────────────────────────────────── */
.lf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lf-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 4px;
  background: #f5f5f3;
  color: #5f5e5a;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background 0.1s, border-color 0.1s;
}

.lf-pill:hover {
  background: #ebebea;
  border-color: rgba(0, 0, 0, 0.15);
}

/* States — cycle: unset → yes → no → ask → unset */
.lf-pill[data-state="yes"] {
  background: #d8eef9;
  color: #0a557d;
  border-color: rgba(10, 85, 125, 0.25);
}
.lf-pill[data-state="yes"]:hover { background: #c8e5f5; }

.lf-pill[data-state="no"] {
  background: #fcebeb;
  color: #791f1f;
  border-color: rgba(121, 31, 31, 0.25);
}
.lf-pill[data-state="no"]:hover { background: #f7d7d7; }

.lf-pill[data-state="ask"] {
  background: #faeeda;
  color: #633806;
  border-color: rgba(99, 56, 6, 0.25);
}
.lf-pill[data-state="ask"]:hover { background: #f6e1bf; }

.lf-pill__state {
  font-size: 0.7rem;
  opacity: 0.75;
}
.lf-pill[data-state="yes"] .lf-pill__state::before { content: "✓"; }
.lf-pill[data-state="no"]  .lf-pill__state::before { content: "✗"; }
.lf-pill[data-state="ask"] .lf-pill__state::before { content: "?"; }

/* ─── Submit ────────────────────────────────────────────────────────── */
.lf-submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--bs-border-color, #e5e7eb);
}

.lf-submit .btn-primary {
  background: rgba(14, 45, 50, 0.87);
  border-color: rgba(14, 45, 50, 0.87);
  padding: 0.5rem 1.5rem;
  font-weight: 500;
}
.lf-submit .btn-primary:hover {
  background: rgba(14, 45, 50, 1);
  border-color: rgba(14, 45, 50, 1);
}
