/* ── Modal CSS retained — used by _openSuppressModal / _openScheduleModal ── */
/* These .ld- rules survive until the LDP refactor re-prefixes them to .ldp-. */

.ld-form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}

.ld-form-row label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.ld-form-row input,
.ld-form-row select {
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 5px 8px;
  outline: none;
  background: #fff;
  color: #1f2937;
}

.ld-form-row input:focus,
.ld-form-row select:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,0.08);
}

.ld-form-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.ld-btn-primary {
  padding: 6px 14px;
  background: #0d9488;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.ld-btn-primary:hover { background: #0f766e; }

.ld-btn-ghost {
  padding: 6px 14px;
  background: none;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}
.ld-btn-ghost:hover { background: #f3f4f6; }

/* ── Quick-action modals ─────────────────────────────────────── */

.ld-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
/* Hard dialer pop-up (App.noticeModal/confirmModal with hard:true): dim only the center —
   start past the 360px dialer left rail so the Pause button stays uncovered/clickable. */
.ld-modal-overlay.ld-modal-overlay--hard { left: 360px; }

.ld-modal {
  background: #fff;
  border-radius: 10px;
  padding: 20px 22px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.ld-modal h3 {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 14px;
}

/* ── Confirm-call modal ──────────────────────────────────────── */

.ldp-call-confirm {
  max-width: 340px;
  text-align: center;
  padding: 26px 24px 22px;
}

.ldp-call-confirm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #ccfbf1;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.ldp-call-confirm-title {
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 4px;
}

.ldp-call-confirm-phone {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 20px;
}

.ldp-call-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.ldp-call-confirm-actions .ld-btn-ghost {
  flex: 1;
  padding: 9px 14px;
  font-size: 13px;
}

.ldp-call-confirm-btn {
  flex: 1;
  padding: 9px 14px;
  background: #0F6E56;
  color: #fff;
  border: none;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ldp-call-confirm-btn:hover { background: #0c5a46; }

/* ── Suppress modal ──────────────────────────────────────────── */

.ld-suppress-opts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.ld-suppress-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  transition: background 0.1s;
}

.ld-suppress-opt:hover { background: #f8fafc; }
.ld-suppress-opt input { accent-color: #0d9488; }

/* ── Callback/Appt scheduler ─────────────────────────────────── */

.ld-sched-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.ld-sched-time-label {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 2px;
}

.ld-sched-time-val {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}

/* =============================================================
   BRIEF 7 — LEAD DETAIL PAGE
   Prefix: ldp-
   Full-page view; cancel page-content padding so sections
   can span edge-to-edge.
   ============================================================= */

#view-lead-detail {
  margin: 0 -24px -24px;
  min-height: calc(100vh - var(--topbar-h, 52px));
}

/* ── Loading ─────────────────────────────────────────────────── */

.ldp-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  font-size: 13px;
  color: var(--color-text-secondary, #6b7280);
}

/* ── Top bar — matches .bv-topbar / .bv-back from main.css ────── */
/* Uses .bv-back on each control so both views stay visually locked */

.ldp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 0;
  font-size: 13px;
}
.ldp-topbar-left { display: flex; gap: 8px; }
.ldp-topbar-right { display: flex; gap: 18px; }

/* Reset <button> defaults so .bv-back renders the same on buttons as on <a> */
.ldp-topbar-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  cursor: pointer;
}
/* Disabled prev/next: muted, no pointer */
.ldp-topbar-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

/* ── Identity zone ───────────────────────────────────────────── */

.ldp-identity-zone {
  padding: 12px 24px 6px;
}

.ldp-id-card {
  background: #fff;
  border: 0.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 16px 20px;
  min-width: 0;
}

/* Left card — person */

.ldp-person-divider {
  height: 0.5px;
  background: #E2E8F0;
  margin-bottom: 14px;
}

.ldp-reach-rows {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.ldp-reach-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #0F172A;
}

/* Reach icons: teal to match My Leads icon tile color */
.ldp-reach-icon {
  font-size: 16px;
  color: #0D9488;
  flex-shrink: 0;
  line-height: 1.35;
}

.ldp-reach-val {
  line-height: 1.35;
  min-width: 0;
}

.ldp-reach-add {
  font-style: italic;
  color: #94A3B8;
  font-size: 13px;
}


.ldp-lead-name {
  font-size: 19px;
  font-weight: 500;
  color: var(--color-text-primary, #111827);
  line-height: 1.25;
}

.ldp-id-sub {
  font-size: 12px;
  color: var(--color-text-secondary, #6b7280);
  margin-top: 3px;
  line-height: 1.4;
}



/* ── Inline edit input (used by phone/dob/email edits) ─────────── */
.ldp-raw-inp {
  font-size: 12px;
  border: 0;
  border-bottom: 1.5px solid #0d9488;
  outline: none;
  background: transparent;
  font-family: inherit;
  min-width: 60px;
  width: 100%;
}

/* ── Card 1 (person) — full-width layout ────────────────────── */

.ldp-id-card-person {
  padding: 16px 20px;
}

.ldp-p1-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ldp-p1-name-row {
  display: flex;
  align-items: baseline;
  gap: 9px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

/* Pencil button: subtle, hover → teal (it's a control, not a data icon) */
.ldp-p1-corner-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  color: #94A3B8;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 10px;
  font-family: inherit;
  transition: color .12s;
}
.ldp-p1-corner-btn:hover { color: #0D9488; }

.ldp-p1-identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  min-height: 20px;
}

.ldp-p1-identity-text {
  font-size: 13px;
  color: #64748B;
  line-height: 1.4;
}

.ldp-p1-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #334155;
  background: #F8FAFC;
  border: 0.5px solid #E2E8F0;
  border-radius: 999px;
  padding: 2px 8px 2px 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ldp-p1-time-dot {
  font-size: 8px;
  line-height: 1;
}

/* ── Reach grid: 3 equal columns, icons top-aligned ─────────── */

.ldp-p1-reach-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.ldp-p1-reach-col {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #0F172A;
  min-width: 0;
}

.ldp-p1-phone-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ldp-p1-phone-line1 {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ldp-p1-phone-val {
  font-size: 14px;
  font-weight: 500;
  color: #0F172A;
}

.ldp-p1-phone2-line {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #475569;
}

.ldp-p1-addr-csz {
  font-size: 13px;
  color: #475569;
  margin-top: 2px;
}

.ldp-p1-add-sec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 0.5px solid #CBD5E1;
  background: none;
  color: #0D9488;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  font-family: inherit;
  line-height: 1;
}
.ldp-p1-add-sec-btn:hover {
  background: #E6F7F5;
  border-color: #0D9488;
}

/* Inline secondary input — al-input look, sized for phone column */
.ldp-p1-sec-inp {
  height: 34px;
  border: 0.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 0 11px;
  font-size: 14px;
  color: #0F172A;
  font-family: inherit;
  background: #fff;
  outline: none;
  min-width: 0;
  flex: 1;
  transition: border-color .12s, box-shadow .12s;
}
.ldp-p1-sec-inp:focus {
  border-color: #0D9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.ldp-p1-sec-inp::placeholder { color: #94A3B8; }

/* ── Person-edit popup — mirrors Add Lead modal chrome ───────── */

/* Overlay scrim with fade-in */
.ldp-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .18s ease;
}
.ldp-popup-overlay.ldp-popup-open {
  opacity: 1;
}

/* Panel with scale-in */
.ldp-popup-panel {
  background: #fff;
  border-radius: 12px;
  width: 520px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(15,23,42,.18);
  transform: translateY(6px) scale(.985);
  transition: transform .18s ease;
}
.ldp-popup-overlay.ldp-popup-open .ldp-popup-panel {
  transform: translateY(0) scale(1);
}

/* Header */
.ldp-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 0.5px solid #E2E8F0;
  flex-shrink: 0;
}
.ldp-popup-title {
  font-size: 15px;
  font-weight: 600;
  color: #0F172A;
  letter-spacing: -0.01em;
}
.ldp-popup-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #64748B;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-family: inherit;
  transition: background .12s, color .12s;
}
.ldp-popup-close-btn i { font-size: 16px; }
.ldp-popup-close-btn:hover { background: #F1F5F9; color: #0F172A; }

/* Body */
.ldp-popup-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px;
}

/* Form stack */
.ldp-popup-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Footer */
.ldp-popup-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 0.5px solid #E2E8F0;
  flex-shrink: 0;
}
.ldp-popup-cancel-btn {
  height: 36px;
  padding: 0 16px;
  background: none;
  border: 0.5px solid #CBD5E1;
  border-radius: 8px;
  color: #64748B;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.ldp-popup-cancel-btn:hover { background: #F1F5F9; color: #0F172A; border-color: #94A3B8; }
.ldp-popup-save-btn {
  height: 36px;
  padding: 0 18px;
  background: #0D9488;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background .12s;
}
.ldp-popup-save-btn:hover { background: #0F766E; }
.ldp-popup-save-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Popup form field rows (al- values, ldp- names) ─────────── */

/* A row is a flex container of fields */
.ldp-edit-form-row {
  display: flex;
  gap: 14px;
}

/* Individual field: label + input stack */
.ldp-edit-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

/* Width flex modifiers */
.ldp-edit-field-dob    { flex: 1.4; }
.ldp-edit-field-sm     { flex: 0.9; }
.ldp-edit-field-street { flex: 2;   }
.ldp-edit-field-city   { flex: 2;   }
.ldp-edit-field-state  { flex: 0.7; }
.ldp-edit-field-zip    { flex: 0.9; }

/* Label — matches al-label */
.ldp-edit-label {
  font-size: 12px;
  font-weight: 500;
  color: #64748B;
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Input — matches al-input */
.ldp-edit-inp {
  height: 38px;
  border: 0.5px solid #CBD5E1;
  border-radius: 8px;
  padding: 0 11px;
  font-size: 14px;
  color: #0F172A;
  font-family: inherit;
  background: #fff;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color .12s, box-shadow .12s;
}
.ldp-edit-inp::placeholder { color: #94A3B8; }
.ldp-edit-inp:focus {
  border-color: #0D9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

/* ── Band card: actions + source data (Block 2) ─────────────── */

.ldp-band-card {
  margin: 0 24px 10px;
  background: #fff;
  border: 0.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 20px;
}

/* Button row: contact left | script toggle center | outcomes right */
.ldp-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ldp-btn-left  { display: flex; align-items: center; gap: 8px; }
.ldp-btn-right { display: flex; align-items: center; gap: 8px; }

/* Script toggle control (center of button row) */
.ldp-script-ctrl {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.ldp-script-icon-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  line-height: 0;
  transition: color 0.12s, filter 0.12s;
}
.ldp-script-icon-btn i { font-size: 23px; }
.ldp-script-icon-btn.ldp-script-on  {
  color: #0F6E56;
  filter: drop-shadow(0 1.5px 2px rgba(15,110,86,0.35));
}
.ldp-script-icon-btn.ldp-script-off {
  color: #A32D2D;
  filter: drop-shadow(0 1.5px 2px rgba(163,45,45,0.35));
}
.ldp-script-icon-btn:hover { filter: drop-shadow(0 2px 3px rgba(0,0,0,0.18)); }
.ldp-script-ctrl-lbl { font-size: 13px; color: #64748B; }

/* Hairline between button row and source row */
.ldp-band-divider {
  height: 0.5px;
  background: #F1F5F9;
  margin: 10px 0 0;
}

/* Source row: toggle LEFT, table RIGHT */
.ldp-src-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-top: 8px;
}
.ldp-src-toggle {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 7px;   /* aligns with th padding-top so toggle sits on the header row */
  cursor: pointer;
  user-select: none;
}
.ldp-src-chevron { font-size: 11px; color: #94A3B8; }
.ldp-src-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: #6b7280;
  text-transform: uppercase;
}
/* Body is flex:1 — hidden on collapse, stays right of the toggle */
.ldp-src-body { flex: 1; min-width: 0; }
.ldp-src-empty {
  display: block;
  padding: 7px 0 5px;
  font-size: 12px;
  color: #94A3B8;
  font-style: italic;
}

/* Table wrapper — matches cw-preview-wrap exactly */
.ldp-src-wrap {
  overflow-x: auto;
  border: 0.5px solid #E2E8F0;
  border-radius: 8px;
}
.ldp-src-wrap::-webkit-scrollbar { height: 3px; }
.ldp-src-wrap::-webkit-scrollbar-track { background: transparent; }
.ldp-src-wrap::-webkit-scrollbar-thumb { background: #E2E8F0; border-radius: 2px; }

/* Table — matches cw-preview-table exactly; strict 2 rows */
.ldp-src-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.ldp-src-table th {
  background: #F8FAFC;
  color: #64748B;
  font-weight: 500;
  padding: 7px 10px;
  text-align: left;
  border-bottom: 0.5px solid #E2E8F0;
  white-space: nowrap;
}
.ldp-src-table td {
  padding: 5px 10px;
  color: #0F172A;
  white-space: nowrap;
  border-bottom: none;
  cursor: pointer;
}
.ldp-src-table td:hover { background: #F8FAFC; }

/* Call — teal hero (FROZEN — do not change) */
.ldp-btn-call {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 22px;
  background: #0D9488;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
}
.ldp-btn-call:hover { background: #0F766E; }
.ldp-btn-call i { font-size: 15px; }
/* Call button — active/calling state (becomes "Hang up") */
.ldp-btn-call.ldp-btn-call-active              { background: #A32D2D; }
.ldp-btn-call.ldp-btn-call-active:hover        { background: #8B2020; }
/* Call button — disabled in dialer queue mode (the queue owns dialing) */
.ldp-btn-call.ldp-btn-call-disabled            { background: #CBD5E1; cursor: not-allowed; opacity: 0.7; }
.ldp-btn-call.ldp-btn-call-disabled:hover      { background: #CBD5E1; }

/* Text / Email — teal outline (FROZEN) */
.ldp-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 15px;
  background: #fff;
  color: #0D9488;
  border: 0.5px solid #99E6DA;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
}
.ldp-btn-outline:hover { background: #F0FDFA; }
.ldp-btn-outline i { font-size: 14px; }

/* Disposition / Appointment / Add Referral — quiet (FROZEN) */
.ldp-btn-quiet {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  background: #F8FAFC;
  color: #475569;
  border: 0.5px solid #E2E8F0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s;
}
.ldp-btn-quiet:hover { background: #F1F5F9; }
.ldp-btn-quiet i { font-size: 13px; }

/* Script placeholder — full-width anchor (Block 3) */
.ldp-script-placeholder {
  margin: 0 24px 24px;
  background: #F0FDFA;
  border: 1.5px solid #0D9488;
  border-radius: 10px;
  padding: 48px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 500;
  color: #0F766E;
}
