/* wwwroot/css/pages/leadDetail.css */

/* Shell */
.lead-detail-page {
  background: #f8f9fa;
}
.lead-detail-container {
  max-width: 1200px;
}

/* Back + Top badges */
.ld-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ld-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111827;
  text-decoration: none;
  font-weight: 600;
}
.ld-back:hover {
  text-decoration: underline;
}

.ld-topbadges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ld-layout > .col-lg-4 {
  padding-top: 50px;
}

/* Card */
.ld-card {
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
  padding: 20px;
}

/* Badge */
.ld-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid transparent;
  background: #f8f9fa;
  color: #212529;
}
.ld-badge i {
  font-size: 0.95rem;
  line-height: 1;
}

.ld-badge-subscribed {
  background-color: #e3f2fd;
  color: #0d47a1;
  border: 1px solid #bbdefb;
}

/* Badge variants */
.ld-badge-import {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.18);
  color: #dc3545;
}
.ld-badge-export {
  background: rgba(13, 110, 253, 0.12);
  border-color: rgba(13, 110, 253, 0.18);
  color: #0d6efd;
}
.ld-badge-active {
  background: rgba(25, 135, 84, 0.12);
  border-color: rgba(25, 135, 84, 0.18);
  color: #198754;
}
.ld-badge-inactive {
  background: rgba(220, 53, 69, 0.12);
  border-color: rgba(220, 53, 69, 0.18);
  color: #dc3545;
}
.ld-badge-free {
  background: rgba(253, 126, 20, 0.14);
  border-color: rgba(253, 126, 20, 0.2);
  color: #fd7e14;
}
.ld-badge-vip {
  background: rgba(13, 202, 240, 0.14);
  border-color: rgba(13, 202, 240, 0.2);
  color: #0dcaf0;
}

/* Badge Ek CSS */
.ld-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none !important;
}

.ld-badge-export {
  background: rgba(13, 110, 253, 0.08);
  border-color: rgba(13, 110, 253, 0.15);
  color: #0d6efd;
}

.ld-badge-export:hover {
  background: #0d6efd;
  color: #ffffff !important;
  border-color: #0d6efd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.25);
}

.ld-badge-import {
  background: rgba(220, 53, 69, 0.08);
  border-color: rgba(220, 53, 69, 0.15);
  color: #dc3545;
}

.ld-badge-import:hover {
  background: #dc3545;
  color: #ffffff !important;
  border-color: #dc3545;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

.ld-badge i {
  transition: transform 0.2s ease;
  font-size: 14px;
}
.ld-badge:hover i {
  transform: scale(1.15);
}
.ld-badge a {
  color: inherit;
  text-decoration: none;
}

/* Purchased */
.ld-badge-purchased {
  background: rgba(139, 92, 246, 0.08);
  border: 1.5px solid rgba(139, 92, 246, 0.15);
  color: #7c3aed;
}

/* .ld-badge-purchased:hover {
  background: #7c3aed;
  color: #ffffff !important;
  border-color: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}
.ld-badge-purchased:hover i {
  color: #ffffff;
  transform: scale(1.1);
} */

/* Owner */

.ld-badge-owner {
  background: rgba(15, 23, 42, 0.06);
  border: 1.5px solid rgba(15, 23, 42, 0.12);
  color: #0f172a;
}

/* .ld-badge-owner:hover {
  background: #0f172a;
  color: #ffffff !important;
  border-color: #0f172a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}
.ld-badge-owner:hover i {
  color: #ffffff;
} */

/* Header */
.ld-header {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.ld-header-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.ld-country-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
}
.ld-flag {
  display: inline-block;
  width: 25px;
  height: 18px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.ld-country {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
  position: relative;
  transition: color 0.3s ease;
}
.ld-country-wrap:hover {
  background: rgba(61, 63, 68, 0.04);
  border-color: rgba(13, 110, 253, 0.1);
}
.ld-country-wrap:hover .ld-flag {
  transform: scale(1.15);
}
.ld-country-wrap:hover .ld-country {
  color: #0d6efd;
}
.ld-country::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #0d6efd;
  transition: width 0.3s ease;
}
.ld-country-wrap:hover .ld-country::after {
  width: 100%;
}

/* Meta pills */
.ld-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ld-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.04);
  border: 1px solid rgba(2, 6, 23, 0.08);
  color: #0f172a;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.ld-pill i {
  line-height: 1;
}

/* Title + Desc */
.ld-title {
  font-size: 26px;
  line-height: 1.25;
  font-weight: 600;
  color: #0b1220;
  margin: 0 0 14px;
}
.ld-desc {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

/* Sections */
.ld-section {
  margin-top: 16px;
}
.ld-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}
.ld-section-body {
  color: #334155;
  font-size: 14px;
  line-height: 1.7;
}

/* Chips */
.ld-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.ld-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  border: 1.5px solid rgba(37, 99, 235, 0.12);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #1e40af;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
a.ld-chip:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(37, 99, 235, 0.2);
}
span.ld-chip {
  cursor: default;
  background: rgba(2, 6, 23, 0.04);
  border-color: rgba(2, 6, 23, 0.08);
  color: #475569;
}

/* Keywords */
.ld-kd-keywords {
  margin-top: 16px;
}

.ld-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ld-keyword-item {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  transition: all 0.15s ease;
}

.ld-keyword-item:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

/* Documents */
.ld-kd-docs {
  align-self: stretch;
  min-width: 120px;
  display: flex;
  flex-direction: column;
}

.ld-kd-docs .ld-section-title {
  margin-bottom: 8px;
}

.ld-kd-docs .ld-docs-list {
  background: rgba(2, 6, 23, 0.03);
  border: 1px dashed rgba(2, 6, 23, 0.14);
  border-radius: 14px;
  padding: 12px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ld-kd-docs .ld-doc-item {
  border: 1px solid rgba(2, 6, 23, 0.1);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  overflow: hidden;
}

.ld-kd-docs .ld-doc-link {
  display: flex;
  align-items: center;
  gap: 10px;

  padding: 12px 12px;
  text-decoration: none;
  color: inherit;

  transition:
    transform 120ms ease,
    box-shadow 120ms ease,
    border-color 120ms ease;
}

.ld-kd-docs .ld-doc-link:hover {
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.1);
  transform: translateY(-1px);
}

.ld-kd-docs .ld-doc-link:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.55);
  outline-offset: 2px;
  border-radius: 10px;
}

.ld-kd-docs .ld-doc-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(2, 6, 23, 0.1);
  background: rgba(2, 6, 23, 0.03);
  flex: 0 0 auto;
}

.ld-kd-docs .ld-doc-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.ld-kd-docs .ld-doc-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: text;
  cursor: text;
}

.ld-kd-docs .ld-doc-sub {
  font-size: 12px;
  opacity: 0.75;
  line-height: 1.2;
}

.ld-kd-docs .ld-doc-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.ld-kd-docs .ld-doc-badge {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 6px 10px;
  border-radius: 999px;

  border: 1px solid rgba(2, 6, 23, 0.12);
  background: rgba(2, 6, 23, 0.04);
}

.ld-kd-docs .ld-doc-open {
  opacity: 0.75;
}

.ld-docs-blur {
  filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

.ld-doc-overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  text-align: center;
  pointer-events: auto;
  padding: 12px 24px;
  border-radius: 8px;
}

.ld-overlay-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #000;
  margin-bottom: 5px;
}

.ld-overlay-sub {
  font-weight: 400;
  font-size: 0.95rem;
  color: #000;
  opacity: 0.85;
}

.ld-docs-blur .ld-doc-link.disabled {
  pointer-events: none;
}

/* Mobile */
@media (max-width: 576px) {
  .ld-kd-docs .ld-docs-list {
    padding: 10px;
    gap: 8px;
  }

  .ld-kd-docs .ld-doc-link {
    padding: 12px 10px;
    gap: 10px;
  }

  .ld-kd-docs .ld-doc-icon {
    width: 34px;
    height: 34px;
  }

  .ld-kd-docs .ld-doc-name {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
  }
}

/* Lists */
.ld-list {
  display: grid;
  gap: 8px;
}
.ld-list-item {
  background: rgba(2, 6, 23, 0.03);
  border: 1px solid rgba(2, 6, 23, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

/* Sidebar */
.ld-sidebar {
  position: sticky;
  top: 16px;
}
.ld-kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.ld-kv:first-of-type {
  border-top: 0;
}
.ld-k {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.ld-v {
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

/* Contact Information ek CSS */
.ld-card.ld-locked {
  position: relative;
  overflow: hidden;
}

.ld-card.ld-locked .ld-contact-body .ld-kv {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
}

.ld-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.ld-lock-box {
  text-align: center;
  max-width: 320px;
}

.ld-lock-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.ld-lock-sub {
  opacity: 0.85;
  margin-bottom: 10px;
}

.ld-lock-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}

/* Responsive */
@media (max-width: 991.98px) {
  .ld-sidebar {
    position: static;
    top: auto;
  }
  .ld-card {
    padding: 16px;
    border-radius: 14px;
  }
  .ld-title {
    font-size: 22px;
  }
  .ld-kv {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .ld-k {
    font-size: 11px;
  }
  .ld-layout > .col-lg-4 {
    padding-top: 0;
  }
}

/* Mobile */
@media (max-width: 576px) {
  .ld-toprow {
    align-items: flex-start;
    flex-direction: column;
  }
  .ld-topbadges {
    justify-content: flex-start;
  }
  .ld-title {
    font-size: 20px;
  }
  .ld-pill {
    font-size: 11px;
    padding: 5px 9px;
  }
  .ld-chip {
    font-size: 11px;
  }
}

/* Lead Buy Panel (Right Sidebar) */
.ld-buy-panel {
  margin-top: 24px;
}

.ld-buy-header {
  padding: 14px 0px 10px 0px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ld-buy-title {
  font-size: 1.05rem;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.ld-buy-sub {
  margin-top: 6px;
  font-size: 0.92rem;
  color: rgba(0, 0, 0, 0.65);
}

.ld-buy-body {
  padding: 12px 0px 14px 0px;
}

/* Header badge: Lead credit */
.ld-lead-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 244, 214, 0.9);
  border: 1px solid #ffd39a;
  color: #b35c00;
  font-weight: 700;
  font-size: 0.9rem;
}

.ld-company-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 10px;
}

.ld-company-row.disable-buy {
  opacity: 0.6;
  filter: saturate(0.75);
  cursor: not-allowed !important;
}

.ld-company-main {
  flex: 1;
  min-width: 0;
}

.ld-company-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.ld-company-title {
  display: block;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ld-company-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.ld-company-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.7);
}

/* Badges */
.ld-credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 244, 214, 0.9);
  border: 1px solid #ffd39a;
  color: #b35c00;
  font-weight: 700;
}

.ld-rem {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.75);
}

.ld-rem-ok {
  background: rgba(25, 135, 84, 0.12);
  border-color: rgba(25, 135, 84, 0.25);
}

.ld-rem-bad {
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.25);
}

/* Status pills (Banned / No spend) */
.ld-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.7);
}

.ld-pill-warn {
  background: rgba(255, 193, 7, 0.2);
  border-color: rgba(255, 193, 7, 0.35);
}

/* Buy button */
.ld-buy-btn {
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* No available company message */
.no-available-company {
  margin: 0;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid rgba(220, 53, 69, 0.25);
  background: rgba(220, 53, 69, 0.06);
  color: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Loading */
.loading-companies {
  padding: 12px 0;
}

/* Company List scroll */
.ld-buy-list-scroll {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 6px;
}

.ld-buy-list-scroll .ld-company-row:last-child {
  margin-bottom: 0;
}

.ld-buy-list-scroll::-webkit-scrollbar {
  width: 10px;
}
.ld-buy-list-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.18);
  border-radius: 999px;
}
.ld-buy-list-scroll::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
}

@media (max-width: 575.98px) {
  .ld-company-row {
    flex-direction: column;
    align-items: stretch;
  }

  .ld-buy-btn {
    width: 100%;
  }
}
