/* ============================================================
   linkar-venda.css — Modal de linkagem venda↔conversa
   Sessão 134, namespace .lvd-*
   ============================================================ */

.lvd-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 16px;
  animation: lvd-fade-in 0.15s ease-out;
}
.lvd-overlay.lvd-closing { animation: lvd-fade-out 0.15s ease-in forwards; }

@keyframes lvd-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lvd-fade-out { from { opacity: 1; } to { opacity: 0; } }

.lvd-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 64px);
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
  animation: lvd-pop 0.2s cubic-bezier(.34,1.56,.64,1);
}
@keyframes lvd-pop {
  from { transform: scale(0.96) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.lvd-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.lvd-head h3 {
  margin: 0 0 4px;
  font-size: 16px; font-weight: 600;
  color: #0f172a;
  font-family: 'IBM Plex Sans', sans-serif;
}
.lvd-head p {
  margin: 0;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.5;
}
.lvd-close {
  background: transparent; border: none;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer;
  color: #64748b;
  transition: background 0.15s;
}
.lvd-close:hover { background: #f1f5f9; color: #0f172a; }

.lvd-search {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid #f1f5f9;
}
.lvd-search input {
  flex: 1;
  border: none; outline: none;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: #0f172a;
}
.lvd-search input:focus { background: #fff; box-shadow: 0 0 0 2px #1E5BAA22; }

.lvd-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  min-height: 240px;
}

.lvd-loading {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 48px 16px;
  font-size: 13px; color: #64748b;
}
.lvd-spin { animation: lvd-spin 0.8s linear infinite; }
@keyframes lvd-spin { to { transform: rotate(360deg); } }

.lvd-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 48px 24px;
  text-align: center;
}
.lvd-empty strong {
  font-size: 13px; color: #475569;
}
.lvd-empty small {
  font-size: 12px; color: #94a3b8;
  max-width: 360px; line-height: 1.5;
}

.lvd-list {
  display: flex; flex-direction: column; gap: 6px;
}

.lvd-row {
  display: flex; gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 8px;
  transition: background 0.15s;
}
.lvd-row:hover { background: #f1f5f9; }

.lvd-row-main {
  flex: 1;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.lvd-row-main strong {
  font-size: 13px; font-weight: 600;
  color: #0f172a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lvd-row-main small {
  font-size: 12px; color: #475569;
}
.lvd-row-meta {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 4px;
}
.lvd-row-meta span {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: #64748b;
}

.lvd-row-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  flex-shrink: 0;
}
.lvd-row-amount {
  font-size: 14px; font-weight: 600;
  color: #0f172a;
  font-family: 'IBM Plex Sans', sans-serif;
}
.lvd-row-status {
  font-size: 10.5px;
  color: #64748b;
}
.lvd-btn-link {
  display: inline-flex; align-items: center; gap: 4px;
  background: #1E5BAA; color: #fff;
  border: none;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 11.5px; font-weight: 500;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s;
}
.lvd-btn-link:hover { background: #164a8e; }
.lvd-btn-link:disabled { background: #94a3b8; cursor: not-allowed; }

.lvd-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 24px;
  border-top: 1px solid #f1f5f9;
  background: #f8fafc;
}
.lvd-foot small {
  font-size: 11.5px; color: #64748b;
}
.lvd-btn-ghost {
  background: transparent;
  border: 1px solid #e2e8f0;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 12px; color: #475569;
  cursor: pointer;
}
.lvd-btn-ghost:hover { background: #fff; border-color: #cbd5e1; }
