/* Contact Finder - Side-by-Side Comparison UI */

.contact-finder-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Stats row under page header */
.cf-stats-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.cf-stats-row .spt-small strong {
  color: var(--spt-text);
}

/* Difficulty Filters */
.cf-difficulty-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.cf-filter-btn {
  padding: 6px 14px;
  border-radius: var(--spt-radius-button);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  background: var(--spt-bg-white);
  color: var(--spt-text);
  border: 1px solid var(--spt-border);
  transition: all 0.15s ease;
}

.cf-filter-btn:hover {
  background: var(--spt-bg);
  text-decoration: none;
}

.cf-filter-btn.active {
  background: var(--spt-teal);
  color: #FFFFFF;
  border-color: var(--spt-teal);
}

.cf-filter-btn.cf-easy.active {
  background: #059669;
  border-color: #059669;
}

.cf-filter-btn.cf-medium.active {
  background: #d97706;
  border-color: #d97706;
}

.cf-filter-btn.cf-hard.active {
  background: #dc2626;
  border-color: #dc2626;
}

/* Main Layout - Side by Side */
.cf-main-layout {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  align-items: start;
}

/* Left Panel - Spotify Curator */
.cf-left-panel {
  position: sticky;
  top: 24px;
}

.cf-spotify-section {
  background: var(--spt-bg-white);
  border-radius: var(--spt-radius-card);
  box-shadow: var(--spt-shadow-card);
  border: 1px solid var(--spt-border);
  padding: 24px;
}

.cf-spotify-section h3 {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px 0;
}

/* Large Curator Card */
.cf-curator-card-new {
  text-align: center;
  margin-bottom: 24px;
}

.cf-large-profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #e5e7eb;
  margin-bottom: 16px;
}

.cf-large-profile-placeholder {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(135deg, #004c54 0%, #006670 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 48px;
  font-weight: 600;
  margin: 0 auto 16px;
}

.cf-curator-details {
  margin-bottom: 16px;
}

.cf-curator-name-large {
  font-size: 22px;
  font-weight: 600;
  color: #111827;
  margin: 0 0 8px 0;
}

.cf-difficulty-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-easy {
  background: #d1fae5;
  color: #065f46;
}

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

.badge-hard {
  background: #fee2e2;
  color: #991b1b;
}

.cf-playlist-details {
  margin-bottom: 16px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 8px;
}

.cf-playlist-name-link {
  margin-bottom: 4px;
}

.cf-playlist-name-link a {
  color: #004c54;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}

.cf-playlist-name-link a:hover {
  text-decoration: underline;
}

.cf-playlist-followers {
  font-size: 14px;
  color: #6b7280;
}

.cf-playlist-followers strong {
  color: #111827;
}

.cf-spotify-link {
  margin-bottom: 20px;
}

.cf-btn-spotify {
  background: transparent;
  color: #004c54;
  display: inline-block;
  padding: 10px 20px;
  border-radius: 9999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #004c54;
  transition: all 0.15s ease;
}

.cf-btn-spotify:hover {
  background: rgba(0, 76, 84, 0.08);
  color: #004c54;
}

/* Manual Entry Section */
.cf-manual-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 20px;
  margin-bottom: 20px;
}

.cf-manual-section h4 {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px 0;
}

.cf-save-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cf-input-row {
  display: flex;
  gap: 12px;
}

.cf-input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cf-input-group label {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
}

.cf-input-with-prefix {
  display: flex;
  align-items: center;
}

.cf-prefix {
  background: #f3f4f6;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-right: none;
  border-radius: 6px 0 0 6px;
  color: #6b7280;
  font-weight: 500;
  font-size: 13px;
}

.cf-input-with-prefix .cf-input {
  border-radius: 0 6px 6px 0;
}

.cf-input {
  padding: 8px 10px;
  border: 1px solid var(--spt-border);
  border-radius: var(--spt-radius-input);
  font-size: 13px;
  font-family: var(--spt-font);
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.cf-input:focus {
  outline: none;
  border-color: var(--spt-teal);
  box-shadow: 0 0 0 3px rgba(0, 76, 84, 0.08);
}

.cf-form-actions {
  margin-top: 4px;
}

/* Buttons */
.cf-btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.cf-btn-primary {
  background: transparent;
  color: #004c54;
  border: 1px solid #004c54;
  width: 100%;
}

.cf-btn-primary:hover {
  background: rgba(0, 76, 84, 0.08);
}

/* Action Buttons */
.cf-action-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.cf-btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  flex: 1;
}

.cf-btn-secondary:hover {
  background: #e5e7eb;
}

.cf-btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  flex: 1;
}

.cf-btn-danger:hover {
  background: #fee2e2;
}

/* Manual Search Links (Collapsed) */
.cf-manual-links {
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.cf-manual-links summary {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

.cf-manual-links summary:hover {
  color: #374151;
}

.cf-search-links-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cf-search-links-compact a {
  font-size: 12px;
  padding: 6px 12px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.cf-search-links-compact a:hover {
  background: #e5e7eb;
}

/* Right Panel - Instagram Results */
.cf-right-panel {
  min-height: 400px;
}

.cf-instagram-section {
  background: var(--spt-bg-white);
  border-radius: var(--spt-radius-card);
  box-shadow: var(--spt-shadow-card);
  border: 1px solid var(--spt-border);
  padding: 24px;
}

.cf-instagram-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.cf-instagram-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  margin: 0;
}

.cf-search-btn {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.cf-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.4);
}

.cf-search-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.cf-config-warning {
  font-size: 12px;
  color: #dc2626;
  background: #fef2f2;
  padding: 6px 12px;
  border-radius: 6px;
}

/* Loading State */
.cf-loading {
  text-align: center;
  padding: 60px 20px;
}

.cf-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #004c54;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

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

.cf-loading p {
  color: #6b7280;
  margin: 0 0 8px 0;
}

.cf-loading-note {
  font-size: 12px;
  color: #9ca3af;
}

/* Error State */
.cf-error {
  text-align: center;
  padding: 40px 20px;
  background: #fef2f2;
  border-radius: 8px;
}

.cf-error p {
  color: #dc2626;
  margin: 0 0 16px 0;
}

/* Results Container */
.cf-results-container {
  /* Results wrapper */
}

/* Face Matching Status */
.cf-face-matching-status {
  margin-bottom: 16px;
}

.cf-face-match-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}

.cf-face-match-active {
  background: #d1fae5;
  color: #065f46;
}

.cf-face-match-inactive {
  background: #fef3c7;
  color: #92400e;
}

.cf-face-icon {
  font-size: 14px;
}

/* Results Grid */
.cf-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* New Result Card */
.cf-result-card-new {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  border: 2px solid #e5e7eb;
  transition: all 0.15s ease;
  display: flex;
  gap: 16px;
}

.cf-result-card-new:hover {
  border-color: #004c54;
  box-shadow: 0 4px 12px rgba(0, 76, 84, 0.1);
}

.cf-result-image-container {
  position: relative;
  flex-shrink: 0;
}

.cf-result-profile-image {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
}

.cf-similarity-badge {
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.cf-similarity-high {
  background: #059669;
  color: white;
}

.cf-similarity-medium {
  background: #d97706;
  color: white;
}

.cf-similarity-low {
  background: #6b7280;
  color: white;
}

.cf-result-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cf-result-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.cf-result-username {
  font-size: 15px;
  font-weight: 600;
  color: #004c54;
  text-decoration: none;
}

.cf-result-username:hover {
  text-decoration: underline;
}

.cf-verified-badge {
  background: #3b82f6;
  color: white;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cf-result-fullname {
  font-size: 13px;
  color: #374151;
  margin-bottom: 2px;
}

.cf-result-followers {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.cf-result-bio {
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.4;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cf-select-btn {
  align-self: flex-start;
  background: transparent;
  color: #004c54;
  border: 1px solid #004c54;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  margin-top: auto;
}

.cf-select-btn:hover {
  background: rgba(0, 76, 84, 0.08);
}

/* Score Type & Source Labels */
.cf-match-score {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.cf-score-image {
  background: #dbeafe;
  color: #1e40af;
}

.cf-score-name {
  background: #fef3c7;
  color: #92400e;
}

.cf-source-label {
  font-size: 10px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

/* Empty State */
.cf-empty-results {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}

.cf-empty-results p {
  margin: 0;
}

.cf-no-results {
  text-align: center;
  padding: 40px 20px;
  color: #6b7280;
}

/* Empty State (no playlists) */
.cf-empty-state {
  text-align: center;
  padding: 60px 24px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.cf-empty-state h2 {
  font-size: 24px;
  font-weight: 600;
  color: #059669;
  margin: 0 0 8px 0;
}

.cf-empty-state p {
  color: #6b7280;
  margin: 0 0 20px 0;
  font-size: 14px;
}

/* Content Notice */
.content-notice {
  background: #d1fae5;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
  .cf-main-layout {
    grid-template-columns: 1fr;
  }

  .cf-left-panel {
    position: static;
  }

  .cf-results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cf-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .cf-input-row {
    flex-direction: column;
  }

  .cf-action-buttons {
    flex-direction: column;
  }

  .cf-result-card-new {
    flex-direction: column;
    text-align: center;
  }

  .cf-result-image-container {
    margin: 0 auto;
  }

  .cf-result-details {
    align-items: center;
  }

  .cf-select-btn {
    width: 100%;
  }
}
