/* Listing-composer-specific styling.
   Layered on top of compose.css. */

/* ── Info banner (v1: shows what the bundle includes) ─────────────── */
.info-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: #eff6ff;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 12px;
  font-size: 13px; color: #1e293b;
}
.info-banner strong { color: #0f172a; font-weight: 600; }

/* ── Document package selector ──────────────────────────────────────── */
.package-selector {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  padding: 22px 24px;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.04);
}
.package-selector-header h3 { color: #0f172a; }
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px 14px;
  margin-top: 18px;
}
.doc-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 180ms cubic-bezier(.34,1.56,.64,1);
}
.doc-row:hover { border-color: #cbd5e1; background: #fff; }
.doc-row.checked {
  border-color: #3b82f6;
  background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(59,130,246,0.18);
}
.doc-row.locked { cursor: not-allowed; opacity: 0.92; }
.doc-row.locked:hover { transform: none; }
.doc-checkbox {
  flex-shrink: 0;
  width: 18px; height: 18px; margin-top: 2px;
  border-radius: 4px; border: 1.5px solid #cbd5e1;
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all 150ms ease-out;
}
.doc-row.checked .doc-checkbox {
  border-color: #3b82f6; background: #3b82f6;
}
.doc-checkbox svg { width: 12px; height: 12px; opacity: 0; color: #fff; transition: opacity 100ms; }
.doc-row.checked .doc-checkbox svg { opacity: 1; }
.doc-row.locked .doc-checkbox { background: #94a3b8; border-color: #94a3b8; }
.doc-row.locked .doc-checkbox svg { opacity: 1; }
.doc-label { font-weight: 600; font-size: 14px; color: #0f172a; line-height: 1.35; }
.doc-note { font-size: 12px; color: #64748b; margin-top: 2px; }

/* ── Confirm modal ──────────────────────────────────────────────────── */
.confirm-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  animation: modal-fade 150ms ease-out;
}
.confirm-modal-backdrop.hidden { display: none; }
.confirm-modal {
  background: #fff; border-radius: 14px;
  padding: 24px 26px;
  width: min(440px, calc(100vw - 32px));
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  animation: modal-pop 200ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modal-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop   { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ── Schedule A clause picker ───────────────────────────────────────── */
.clause-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 180ms cubic-bezier(.34,1.56,.64,1);
  margin-bottom: 8px;
}
.clause-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.clause-card.checked {
  border-color: #3b82f6;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}
.clause-card.unchecked {
  opacity: 0.55;
  background: #f8fafc;
}
.clause-card-header {
  display: flex; align-items: center; gap: 12px;
}
.clause-card-summary { flex: 1; font-size: 14px; color: #0f172a; }
.clause-card.unchecked .clause-card-summary { text-decoration: line-through; }
.clause-toggle-link {
  font-size: 12px; color: #3b82f6; cursor: pointer;
  font-weight: 600;
}
.clause-toggle-link:hover { text-decoration: underline; }
.clause-card-body {
  margin-top: 10px;
  font-size: 13px; line-height: 1.55;
  color: #475569;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}
.clause-card-body.hidden { display: none; }

/* Checkbox inside clause card — overrides the .doc-checkbox base since
   we're not nested inside .doc-row.checked. */
.clause-card .doc-checkbox {
  width: 18px; height: 18px; cursor: pointer;
  background: #fff; border-color: #cbd5e1;
}
.clause-card.checked .doc-checkbox {
  background: #3b82f6; border-color: #3b82f6;
}
.clause-card .doc-checkbox svg { width: 12px; height: 12px; color: #fff; opacity: 0; }
.clause-card.checked .doc-checkbox svg { opacity: 1; }

.add-custom-clause {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 10px;
  color: #475569; font-size: 13px; font-weight: 600;
  background: transparent;
  cursor: pointer;
  transition: all 150ms;
  margin-top: 6px;
}
.add-custom-clause:hover {
  border-color: #3b82f6; color: #3b82f6; background: #eff6ff;
}

/* ── Document section wrapper ───────────────────────────────────────── */
.doc-section {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  padding: 22px 24px;
  margin-top: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: opacity 200ms, max-height 300ms;
}
.doc-section.collapsed { display: none; }
.doc-section-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 6px;
}
.doc-section-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 17px; color: #0f172a; }
.doc-section-note  { font-size: 12px; color: #64748b; }

/* ── Radio + toggle controls ────────────────────────────────────────── */
.radio-row {
  display: flex; flex-direction: column; gap: 8px;
  margin: 8px 0 12px;
}
.radio-option {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 150ms;
}
.radio-option:hover { border-color: #cbd5e1; background: #fff; }
.radio-option.selected {
  border-color: #3b82f6; background: #eff6ff;
  box-shadow: 0 0 0 1px rgba(59,130,246,0.16);
}
.radio-dot {
  flex-shrink: 0;
  width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  background: #fff; margin-top: 2px;
  position: relative;
  transition: all 150ms;
}
.radio-option.selected .radio-dot {
  border-color: #3b82f6;
}
.radio-option.selected .radio-dot::after {
  content: ''; position: absolute; inset: 3px;
  border-radius: 50%; background: #3b82f6;
}
.radio-label { font-size: 14px; color: #0f172a; line-height: 1.4; }

.toggle-row {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-label { flex: 1; font-size: 14px; color: #0f172a; }
.toggle-switch {
  width: 36px; height: 20px;
  background: #cbd5e1; border-radius: 999px;
  position: relative; cursor: pointer;
  transition: background 150ms;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff;
  transition: left 150ms;
  box-shadow: 0 1px 2px rgba(15,23,42,0.2);
}
.toggle-switch.on { background: #3b82f6; }
.toggle-switch.on::after { left: 18px; }

/* Conditional reveal */
.cond-section { margin-top: 6px; }
.cond-section.hidden-cond { display: none; }

/* Subtype pill row (Property type within MLS Data Form Condo) */
.subtype-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
}
.subtype-pill {
  padding: 6px 12px; font-size: 12px; font-weight: 600;
  border: 1px solid #e2e8f0; background: #f8fafc;
  border-radius: 999px; cursor: pointer; color: #475569;
  transition: all 150ms;
}
.subtype-pill:hover { border-color: #cbd5e1; }
.subtype-pill.active {
  border-color: #3b82f6; background: #3b82f6; color: #fff;
}

/* Mobile narrowing */
@media (max-width: 640px) {
  .doc-grid { grid-template-columns: 1fr; }
  .package-selector { padding: 16px; }
  .doc-section { padding: 16px; }
}
