/* Offers tool. icon() emits an SVG with no width or height and the global
   default is 16px, so anything that wants a different size says so here. */

.off-search {
  padding: 7px 11px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); min-width: 200px;
}
.off-sort { padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }

.off-tip {
  display: flex; gap: 9px; align-items: flex-start;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  border-radius: var(--radius); padding: 9px 12px; margin: 12px 0; font-size: 12.5px;
}
.off-tip svg { color: #2563eb; margin-top: 1px; }

/* ---- The listing board ---- */

.off-board { display: flex; flex-direction: column; gap: 8px; }

.off-row, .off-unmatched {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer;
}
.off-row:hover, .off-unmatched:hover { border-color: var(--blue); }
.off-unmatched { border-left: 3px solid var(--amber); }
/* min-width:0 or a long address pushes the tallies off the card */
.off-row-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.off-tallies { display: flex; gap: 8px; flex: none; }
.off-tallies.inline { margin-left: 10px; }
.off-tally {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 58px; padding: 5px 8px; border-radius: 8px; font-weight: 700; font-size: 16px;
  background: var(--bg); color: var(--text); line-height: 1.1;
}
.off-tally small { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; opacity: .7; }
.off-tally.formal { background: #dcfce7; color: #14532d; }
.off-tally.informal { background: #e0e7ff; color: #312e81; }
.off-tally.backup { background: #fef3c7; color: #78350f; }

/* ---- Offer cards ---- */

.off-cards { display: flex; flex-direction: column; gap: 10px; }
.off-card { padding: 0; overflow: visible; }
/* "Also changes card color to light green" once it has been prepped. */
.off-card.prepped { background: #f0fdf4; border-color: #86efac; }

.off-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.off-head-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.off-pick { display: flex; align-items: center; }
.off-price { text-align: right; font-size: 18px; font-weight: 700; flex: none; }
.off-price small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }

.off-kind {
  display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 11px;
  font-weight: 700; margin-left: 6px; vertical-align: 2px;
}
.off-kind.formal { background: #dcfce7; color: #14532d; }
.off-kind.informal { background: #e0e7ff; color: #312e81; }
.off-kind.backup { background: #fef3c7; color: #78350f; }

.off-warn {
  margin: 0 16px 12px; padding: 7px 10px; border-radius: 8px;
  background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; font-size: 12px;
}

/* The manual tick ribbon */
.off-ribbon {
  display: flex; flex-wrap: wrap; gap: 5px; padding: 0 16px 12px;
  border-bottom: 1px solid var(--border);
}
.off-tick {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 99px;
  padding: 3px 9px 3px 4px; font-size: 11.5px; color: var(--muted);
}
.off-tick .box {
  width: 15px; height: 15px; border-radius: 4px; background: var(--card);
  border: 1px solid var(--border); display: inline-flex; align-items: center;
  justify-content: center; font-size: 11px; line-height: 1; color: var(--text);
}
.off-tick.on { background: #dcfce7; border-color: #86efac; color: #14532d; font-weight: 600; }
.off-tick.on .box { background: #16a34a; border-color: #16a34a; color: #fff; }
.off-tick.maybe { background: #fef3c7; border-color: #fcd34d; color: #78350f; }
.off-tick.maybe .box { background: #d97706; border-color: #d97706; color: #fff; }

/* Actions menu */
.off-menu-wrap { position: relative; flex: none; }
.off-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 40;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .14); min-width: 250px; padding: 4px;
}
.off-menu.show { display: block; }
.off-menu button {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 7px 10px; border-radius: 7px; font-size: 13px; color: var(--text);
}
.off-menu button:hover { background: var(--bg); }
.off-menu button.danger { color: var(--red); }

/* ---- Details ---- */

.off-details { padding: 14px 16px 16px; }
.off-notes { margin-bottom: 14px; }
.off-notes label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.off-notes textarea, .off-field input, .off-field textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card); box-sizing: border-box;
}

.off-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
/* Grid children default to min-width:auto, so a long value would widen its
   column and push the next one off the card. */
.off-field { min-width: 0; overflow-wrap: anywhere; }
.off-field > span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.off-field.revised > span { color: var(--amber); font-weight: 600; }
.off-field.revised input, .off-field.revised textarea { border-color: #fcd34d; background: #fffbeb; }
.off-field.unsure input, .off-field.unsure textarea { border-style: dashed; }
.off-field i { font-style: normal; font-size: 10px; text-transform: uppercase; }
.off-field input[readonly], .off-field textarea[readonly] { background: var(--bg); color: var(--muted); }

.off-docs { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.off-docs a { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.off-save { margin-top: 14px; display: flex; align-items: center; gap: 10px; }

/* ---- Comparison ---- */

.off-comparebar {
  display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin-bottom: 10px;
  background: var(--navy); color: #fff; border-radius: var(--radius);
}
.off-comparebar .btn { background: rgba(255, 255, 255, .14); color: #fff; border-color: transparent; }

.off-compare { overflow-x: auto; }
.off-compare table { border-collapse: collapse; min-width: 100%; font-size: 12.5px; }
.off-compare th, .off-compare td {
  border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top;
  max-width: 260px; overflow-wrap: anywhere;
}
.off-compare thead th { background: var(--bg); position: sticky; top: 0; }
.off-compare tbody th { background: var(--bg); font-weight: 600; white-space: nowrap; }
.off-compare small { display: block; font-weight: 500; color: var(--muted); }

/* ---- Modals ---- */

.off-libbox {
  max-height: 190px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 8px; padding: 8px;
}
.off-lib { display: block; font-size: 12.5px; padding: 2px 0; overflow-wrap: anywhere; }
.off-lib i { color: var(--muted); font-style: normal; }

.off-formhead { margin: 16px 0 6px; font-size: 13px; }
.off-form {
  display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--border); border-radius: 8px;
}
.off-form span { display: block; min-width: 0; overflow-wrap: anywhere; }
.off-form small { display: block; font-size: 11px; color: var(--muted); }
.off-form.present { background: #f0fdf4; border-color: #bbf7d0; }
.off-form.missing { background: #fffbeb; border-color: #fcd34d; }

.off-blacklist { display: flex; flex-direction: column; gap: 6px; }
.off-bl-row {
  display: flex; align-items: center; gap: 10px; padding: 6px 10px;
  background: var(--bg); border-radius: 8px; font-size: 13px;
}
.off-bl-row span { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ---- The link on the lead page and the deal modal ---- */

.off-link {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--blue); border-radius: 10px; background: #eff6ff;
  color: var(--blue-dark); text-decoration: none; margin-bottom: 8px;
}
.off-link:hover { background: #dbeafe; text-decoration: none; }
.off-link span { min-width: 0; overflow-wrap: anywhere; }
.off-link small { display: block; color: var(--muted); font-weight: 500; }
.off-link-go { margin-left: auto; font-weight: 700; font-size: 12px; flex: none; }

@media (max-width: 760px) {
  .off-head { flex-wrap: wrap; }
  .off-price { text-align: left; }
  .off-tallies { flex-wrap: wrap; }
}
