/* Lead marketplace */
.marketplace-page .wrap {
  max-width: 720px;
}

.marketplace-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: var(--border);
}

.marketplace-header h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.marketplace-tagline {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.marketplace-cta {
  margin: 0;
  font-size: 0.95rem;
}

.marketplace-cta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.marketplace-cta a:hover {
  text-decoration: underline;
}

/* Messages */
.marketplace-message {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-warm, #efece4);
  border-radius: var(--radius);
  border: var(--border);
}

.marketplace-message code {
  font-size: .9em;
  background: rgba(0,0,0,.06);
  padding: .15rem .4rem;
  border-radius: 4px;
}

.marketplace-error {
  background: #fef2f2;
  border-color: #fecaca;
}

/* Loading */
.marketplace-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.marketplace-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: marketplace-spin 0.8s linear infinite;
}

@keyframes marketplace-spin {
  to { transform: rotate(360deg); }
}

/* Empty state */
.marketplace-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  color: #6b7280;
  margin: 0;
  font-size: 0.9375rem;
}

/* Leads list header */
.marketplace-leads-wrap {
  margin-top: 0.5rem;
}

.marketplace-leads-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.marketplace-leads-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
}

.marketplace-leads-count {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Lead cards - Modern & Clean */
.lead-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lead-card {
  background: #fff;
  border: 1px solid #eaeef3;
  border-radius: 10px;
  padding: 24px;
  transition: all 0.15s;
}

.lead-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border-color: #d0d7de;
}

.lead-card-header {
  margin-bottom: 16px;
}

.lead-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.lead-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f1419;
  margin: 0;
  letter-spacing: -0.01em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-badge.open {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.claimed {
  background: #f3f4f6;
  color: #6b7280;
}

.lead-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f6f8fa;
  flex-wrap: wrap;
}

.lead-meta-item {
  display: flex;
  gap: 6px;
  font-size: 0.875rem;
}

.lead-meta-label {
  font-weight: 500;
  color: #656d76;
}

.lead-meta-value {
  color: #0f1419;
}

.lead-message {
  background: #f6f8fa;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #0f1419;
  margin-bottom: 16px;
  border: 1px solid #eaeef3;
}

.lead-message strong {
  color: #656d76;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.lead-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

.btn-claim {
  padding: 10px 20px;
  background: #2563eb;
  color: #fff;
  border: 1px solid #2563eb;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-claim:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-claim:disabled {
  background: #9ca3af;
  border-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
  opacity: 0.6;
}

/* Claimed Lead Info */
.lead-claimed-info {
  margin-top: 8px;
}

.claimed-banner {
  background: #f6f8fa;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #656d76;
  border: 1px solid #eaeef3;
  margin-bottom: 16px;
}

.claimed-banner strong {
  color: #10b981;
  font-weight: 600;
}

.customer-contact {
  background: #dbeafe;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  padding: 16px;
}

.contact-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin-bottom: 12px;
}

.contact-grid {
  display: grid;
  gap: 8px;
}

.contact-item {
  font-size: 0.9375rem;
  color: #0f1419;
}

.contact-item strong {
  color: #1e40af;
  font-weight: 600;
  min-width: 60px;
  display: inline-block;
}

/* Blurred leads for free trial users */
.lead-blurred {
  position: relative;
  filter: blur(4px);
  user-select: none;
  pointer-events: none;
}

.blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(2px);
  border-radius: 10px;
  pointer-events: auto;
  z-index: 10;
}

.blur-message {
  text-align: center;
  padding: 24px 32px;
  background: #fff;
  border: 2px solid #2563eb;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-width: 320px;
}

.blur-message strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f1419;
  margin-bottom: 12px;
}

.blur-message p {
  font-size: 0.9375rem;
  color: #656d76;
  line-height: 1.5;
  margin: 0 0 20px 0;
}

.btn-subscribe {
  display: inline-block;
  padding: 12px 24px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.15s;
  cursor: pointer;
}

.btn-subscribe:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .lead-card {
    padding: 20px;
  }
  .lead-title {
    font-size: 1rem;
  }
  .lead-meta {
    flex-direction: column;
    gap: 8px;
  }
  .blur-message {
    padding: 20px 24px;
    max-width: 280px;
  }
  .blur-message strong {
    font-size: 1rem;
  }
  .blur-message p {
    font-size: 0.875rem;
  }
}

.lead-card-badges {
  display: flex;
  gap: 8px;
}

.lead-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lead-badge-open {
  background: #dbeafe;
  color: #1e40af;
}

.lead-badge-claimed {
  background: #f3f4f6;
  color: #6b7280;
}

.lead-badge-new {
  background: #fef3c7;
  color: #92400e;
}

.lead-card-location {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.lead-card-address {
  font-size: 0.9375rem;
  color: #6b7280;
  margin: 0 0 16px 0;
}

.lead-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0;
  padding: 16px;
  background: #f9fafb;
  border-radius: 6px;
}

.meta-item {
  font-size: 0.875rem;
  color: #374151;
}

.meta-item strong {
  color: #1a1a1a;
  font-weight: 600;
}

.lead-card-message {
  margin: 16px 0;
  padding: 16px;
  background: #fffbeb;
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  font-size: 0.9375rem;
  color: #374151;
}

.lead-card-message strong {
  font-weight: 600;
  color: #92400e;
  display: block;
  margin-bottom: 8px;
}

.lead-claimed-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.lead-claimed-info {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0 0 16px 0;
}

.lead-customer-contact {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 16px;
}

.contact-header {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-row {
  display: flex;
  align-items: baseline;
  font-size: 0.9375rem;
}

.contact-label {
  min-width: 60px;
  color: #6b7280;
  font-weight: 500;
}

.contact-value {
  color: #1a1a1a;
  font-weight: 400;
}

.lead-card-actions {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.btn-claim-lead {
  width: 100%;
  padding: 12px 24px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-claim-lead:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-claim-lead:active {
  transform: translateY(0);
}

/* Claim modal */
.claim-modal-box {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.claim-modal-box .quote-modal-title {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.claim-modal-box .quote-modal-intro {
  margin-bottom: 1.25rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.claim-modal-box label {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.claim-modal-box input {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.claim-modal-box button {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.project-list .quote-form-row {
  margin-bottom: 1rem;
}

/* Subtle blur for free trial users */
.lead-blurred {
  position: relative;
  filter: blur(2px);
  opacity: 0.85;
  user-select: none;
  pointer-events: none;
}

.blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  pointer-events: auto;
  z-index: 10;
}

.blur-message {
  text-align: center;
  padding: 24px 28px;
  background: #fff;
  border: 2px solid #2563eb;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  max-width: 340px;
}

.blur-message strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 8px;
}

.blur-message p {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 16px 0;
}

.btn-subscribe {
  display: inline-block;
  padding: 10px 20px;
  background: #2563eb;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.15s;
  cursor: pointer;
}

.btn-subscribe:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

@media (max-width: 768px) {
  .blur-message {
    padding: 20px 24px;
    max-width: 300px;
  }
  
  .blur-message strong {
    font-size: 1rem;
  }
  
  .blur-message p {
    font-size: 0.8125rem;
  }
}

/* Loading states */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.loading-state p {
  margin-top: 16px;
  font-size: 0.95rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Lead score badge */
.lead-score {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 8px;
}

.lead-score.high {
  background: #d1fae5;
  color: #065f46;
}

.lead-score.medium {
  background: #fef3c7;
  color: #92400e;
}

.lead-score.low {
  background: #fee2e2;
  color: #991b1b;
}

/* Load More button */
.load-more-wrap {
  text-align: center;
  padding: 24px 0;
}

.btn-load-more {
  padding: 12px 32px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-load-more:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.btn-load-more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Claim success flash animation */
.claim-success-flash {
  animation: claimFlash 2s ease-out;
}

@keyframes claimFlash {
  0% {
    border-color: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
  }
  50% {
    border-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
  }
  100% {
    border-color: #eaeef3;
    box-shadow: none;
  }
}
