/* The deal form: listing paperwork, sharing, and the checkboxes that styles.css
   would otherwise stretch across the modal.

   Everything here is scoped to classes that only exist inside the deal and
   document modals, so nothing leaks onto another screen. */

/* ---- A checkbox inside a .field ----

   styles.css sets `.field input { width: 100%; padding: 8px 11px; border: 1px
   solid var(--border) }` because almost every input in a form grid is a text
   box. A checkbox is an input too, so it came out as wide as the modal and its
   label wrapped underneath it.

   Deliberately not written as a bare `.field input[type="checkbox"]`. That
   would be the right global fix and the wrong thing to land from one feature's
   stylesheet, because several other screens have already worked around the
   old behaviour in their own markup. Scoped to the two forms this batch
   touched; `.cbx` is the opt-in for anything else that wants it. */
#deal-form input[type="checkbox"],
#deal-form input[type="radio"],
.cbx input[type="checkbox"] {
  width: 14px; height: 14px; min-width: 14px;
  padding: 0; margin: 0; border-radius: 3px; flex: none; vertical-align: middle;
}

/* ---- Listing agreement and pictures ---- */

.df-sec { border-top: 1px solid var(--border); padding-top: 12px; }
.df-doc-row {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
}
/* The select is the part that should give when the modal narrows, and grid and
   flex children default to a min-width of their content, so a long filename
   pushed the Upload button off the edge. */
.df-doc-row select { flex: 1 1 200px; min-width: 0; }

/* Every <label> below is scoped under `.df-sec` on purpose, not for tidiness.
   styles.css sets `.field label { display: block; font-size: 12px; font-weight:
   700; color: var(--muted); margin-bottom: 4px }` for the caption above a form
   field, and at (0,1,1) that outranks a bare class. A label that is a button or
   a row of controls rather than a caption has to say so at (0,2,0) or higher,
   which is the same trap `.dt-scan` fell into in dealtools.css. */
.df-sec .df-up {
  display: inline-flex; align-items: center;
  cursor: pointer; flex: none; margin-bottom: 0;
  font-size: 13px; font-weight: 600; color: inherit;
}

.df-pics { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.df-pic { max-width: 100%; overflow-wrap: anywhere; }
.df-pic a { margin-left: 4px; color: var(--red); text-decoration: none; }

/* ---- Sharing ---- */

.df-share {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 190px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px;
}
.df-sec .df-share-row {
  display: flex; align-items: center; gap: 8px; min-width: 0;
  padding: 4px 2px; margin-bottom: 0; cursor: pointer;
  font-size: 13px; font-weight: 600; color: inherit; text-transform: none;
}
.df-share-row span { min-width: 0; overflow-wrap: anywhere; }
.df-share-row .muted { font-weight: 400; color: var(--muted); }
