/* The JV path (js/features/jv-listing.js): the listing form's first question,
   its deal and deposit sections, and the deal on a JV listing's detail view on
   /map and on the listing page. Colours and type come from design-tokens.css. */

/* ---- "What are you after?" ------------------------------------------------- */

.jvl-kinds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.form-section label.jvl-kind {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-md);
  cursor: pointer;
  font-weight: var(--nm-weight-reg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

/* Scoped like the base rule above, or that rule's specificity wins. */
.form-section label.jvl-kind:hover { border-color: var(--nm-border-strong); }

.form-section label.jvl-kind.is-on {
  border-color: var(--nm-accent);
  background: rgba(var(--nm-blue-rgb), 0.14);
  box-shadow: inset 0 0 0 1px var(--nm-accent);
}

/* The radio itself is hidden but stays focusable, so the card shows focus. */
.jvl-kind input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}

.jvl-kind:focus-within { outline: 2px solid var(--nm-accent); outline-offset: 1px; }

.jvl-kind > i {
  font-size: 20px;
  color: var(--nm-accent);
}

.jvl-kind-text b {
  display: block;
  font-size: 13px;
  font-weight: var(--nm-weight-med);
  color: var(--nm-text);
}

.jvl-kind-text small {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--nm-text-muted);
}

@media (max-width: 560px) {
  .jvl-kinds { grid-template-columns: 1fr; }
  .form-section label.jvl-kind { flex-direction: row; align-items: center; gap: 10px; }
}

/* ---- the deal and the deposit ---------------------------------------------- */

.jvl-hint {
  font-weight: normal;
  font-size: 11px;
  color: #999;
}

.jvl-sought {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-section label.jvl-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  font-size: 13px;
  font-weight: var(--nm-weight-reg);
  color: var(--nm-text);
  cursor: pointer;
}

.form-section label.jvl-chip {
  margin: 0;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--nm-border);
  border-radius: var(--nm-radius-pill);
}

.form-section label.jvl-chip:has(input:checked) {
  border-color: var(--nm-accent);
  background: rgba(var(--nm-blue-rgb), 0.14);
}

.jvl-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--nm-text-dim);
}

.jvl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-bottom: 6px;
}

.jvl-field > span,
.jvl-approvals > span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--nm-text-muted);
}

.form-section .jvl-field input[type="text"],
.form-section .jvl-field select {
  margin-bottom: 0;
}

.jvl-pair { display: flex; gap: 6px; }
.form-section .jvl-pair input[type="text"] { flex: 1; min-width: 0; }
.form-section .jvl-pair select { flex: 0 0 78px; width: 78px; }

.jvl-approvals { margin-top: 8px; }

@media (max-width: 480px) {
  .jvl-grid { grid-template-columns: 1fr; }
}

/* ---- the detail view ------------------------------------------------------- */

.jvl-headline {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--nm-text);
}

.jvl-detail .jvl-note { margin-top: 10px; }

.jvl-facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 13.5px;
}

.jvl-facts dt { color: var(--nm-text-muted); }
.jvl-facts dd { margin: 0; color: var(--nm-text); }

.jvl-ctx-h {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: var(--nm-weight-med);
  color: var(--nm-text);
}

.jvl-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.jvl-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--nm-border);
  font-size: 13px;
}

.jvl-list li:last-child { border-bottom: none; }
.jvl-list li b { font-weight: var(--nm-weight-med); color: var(--nm-text); }
.jvl-list li span { color: var(--nm-text-muted); }
.jvl-list li .jvl-owner { flex-basis: 100%; font-size: 12px; color: var(--nm-text-dim); }

.jvl-empty {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--nm-text-muted);
}

.jvl-source {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: var(--nm-text-faint);
}

@media (max-width: 480px) {
  .jvl-facts { grid-template-columns: 1fr; gap: 2px; }
  .jvl-facts dd { margin-bottom: 8px; }
}
