/* ==========================================================================
   MediaLib People (Actors, Directors, Athletes) View Styles
   ========================================================================== */

.people-view-container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 0 80px 0;
  animation: fadeIn 0.2s ease-in-out;
}

.people-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}

.people-badge-header {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(229, 9, 20, 0.12);
  border: 1px solid rgba(229, 9, 20, 0.3);
  color: #ff4d55;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.people-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary, #ffffff);
  margin-bottom: 4px;
}

.people-subtitle {
  color: var(--text-secondary, #9ca3af);
  font-size: 0.95rem;
  max-width: none;
}

/* Search bar */
.people-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card, #1f1f1f);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 12px;
  padding: 8px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.people-search-bar:focus-within {
  border-color: rgba(229, 9, 20, 0.6);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.people-search-bar svg {
  color: var(--text-secondary, #9ca3af);
  flex-shrink: 0;
}

.people-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary, #ffffff);
  font-size: 1rem;
  outline: none;
}

.people-search-input::placeholder {
  color: var(--text-secondary, #6b7280);
}

.people-search-clear {
  background: none;
  border: none;
  color: var(--text-secondary, #9ca3af);
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.people-search-clear:hover {
  color: var(--text-primary, #ffffff);
}

/* Controls Bar (Filter + Sort) */
.people-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.people-filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.people-filter-row::-webkit-scrollbar {
  display: none;
}

.people-chip {
  padding: 6px 14px;
  background: var(--bg-card, #1f1f1f);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: var(--text-secondary, #9ca3af);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.people-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #ffffff);
  border-color: rgba(255, 255, 255, 0.2);
}

.people-chip.active {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.25) 0%, rgba(147, 51, 234, 0.35) 100%);
  color: #f3e8ff;
  border-color: rgba(229, 9, 20, 0.6);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.2);
}

/* Sort Row */
.people-sort-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.people-sort-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary, #9ca3af);
}

.people-sort-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.people-sort-pills::-webkit-scrollbar {
  display: none;
}

.people-sort-chip {
  padding: 5px 12px;
  background: var(--bg-card, #1f1f1f);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: var(--text-secondary, #9ca3af);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}

.people-sort-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary, #ffffff);
  border-color: rgba(255, 255, 255, 0.2);
}

.people-sort-chip.active {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.25) 0%, rgba(229, 9, 20, 0.35) 100%);
  color: #dbeafe;
  border-color: rgba(229, 9, 20, 0.6);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.2);
}

/* Results summary */
.people-results-summary {
  font-size: 0.9rem;
  color: var(--text-secondary, #9ca3af);
  margin-bottom: 16px;
  font-weight: 500;
}

/* Loading & Empty states */
.people-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary, #9ca3af);
}

.people-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: #ff4d55;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px auto;
}

.people-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary, #9ca3af);
}

.people-empty h3 {
  color: var(--text-primary, #ffffff);
  font-size: 1.15rem;
  margin-bottom: 6px;
}

/* Grid layout */
.people-grid,
.people-grid.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
  width: 100%;
}

.people-grid .card-poster-wrapper,
.people-grid .media-card-poster {
  aspect-ratio: 3 / 4;
}

/* Load more button */
.people-pagination {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.people-btn-load-more {
  padding: 10px 28px;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #f3e8ff;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.people-btn-load-more:hover {
  background: rgba(229, 9, 20, 0.3);
  border-color: rgba(229, 9, 20, 0.7);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.25);
  transform: translateY(-1px);
}

/* Sports match card in person modal */
.sport-match-person-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sport-match-person-card:hover {
  background: rgba(229, 9, 20, 0.12);
  border-color: rgba(229, 9, 20, 0.35);
  transform: translateY(-2px);
}

.sport-match-person-card .person-card-title {
  font-weight: 600;
  color: var(--text-primary, #ffffff);
  font-size: 0.9rem;
}

.sport-match-person-card .person-card-meta {
  color: var(--text-secondary, #9ca3af);
  font-size: 0.8rem;
  margin-top: 2px;
}

/* Person Modal Portrait & Bio */
.person-modal-portrait-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(229, 9, 20, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  margin-right: 14px;
}

.person-modal-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.person-bio-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #e50914;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.person-bio-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary, #d1d5db);
  margin: 0;
}

@media (max-width: 700px) {
  .people-view-container {
    padding: 16px 12px 90px 12px;
  }
  .people-title {
    font-size: 1.6rem;
  }
  .people-grid {
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 10px;
  }
}

/* Person Detail Router View in Main Content */
.person-detail-view-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: calc(100vh - var(--top-nav-height, 64px) - 80px);
  padding: 24px 32px 80px 32px;
  box-sizing: border-box;
  animation: fadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.person-detail-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
}

.person-detail-nav-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.btn-person-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  padding: 8px 16px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.btn-person-back:hover {
  background: rgba(229, 9, 20, 0.2);
  color: #ff4d55;
  border-color: rgba(229, 9, 20, 0.45);
  transform: translateX(-2px);
}

.btn-person-back svg {
  flex-shrink: 0;
}

/* Breadcrumb / Kruimelpad */
.person-breadcrumb {
  display: flex;
  align-items: center;
  min-width: 0;
}

.person-breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
  color: var(--text-secondary, #94a3b8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-breadcrumb-btn {
  background: none;
  border: none;
  color: var(--text-secondary, #94a3b8);
  font-size: 13.5px;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
  transition: color 0.15s ease;
  text-decoration: none;
}

.person-breadcrumb-btn:hover {
  color: var(--text-primary, #ffffff);
  text-decoration: underline;
}

.person-breadcrumb-sep {
  color: rgba(255, 255, 255, 0.3);
  font-size: 12px;
  user-select: none;
}

.person-breadcrumb-current {
  color: #ff4d55;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.person-detail-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn-person-fav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.btn-person-fav:hover {
  background: rgba(251, 191, 36, 0.18);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  transform: translateY(-1px);
}

.btn-person-fav.active {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.6);
  color: #fbbf24;
}

.btn-person-fav.active svg {
  fill: #fbbf24;
  color: #fbbf24;
}

.is-person-card.is-fav-person {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.12);
}

.person-item-card.is-fav-item,
.sport-match-person-card.is-fav-item {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.12);
}

.person-item-fav-badge {
  display: inline-flex;
  align-items: center;
  color: #fbbf24;
}

.btn-person-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  transition: all 0.2s ease;
}

.btn-person-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  transform: rotate(90deg);
}

.person-detail-view-container .person-detail-content {
  width: 100%;
  max-width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  max-height: none;
  overflow: visible;
}

.person-detail-view-container .person-modal-header {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0 0 20px 0;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.person-detail-view-container .person-modal-portrait-wrap {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin-right: 20px;
  border: 3px solid rgba(229, 9, 20, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.person-detail-view-container .person-name {
  font-size: 2rem;
  letter-spacing: -0.4px;
}

.person-detail-view-container .person-count {
  font-size: 14px;
  color: var(--text-secondary, #94a3b8);
}

/* Social media links bar in person/team detail */
.person-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.person-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary, #94a3b8);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  line-height: 1;
}

.person-social-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.person-social-btn:hover {
  transform: translateY(-1px);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.person-social-btn.social-twitter:hover {
  background: #000;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.person-social-btn.social-instagram:hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 14px rgba(220, 39, 67, 0.4);
}

.person-social-btn.social-tiktok:hover {
  background: #010101;
  border-color: #00f2fe;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 242, 254, 0.3);
}

.person-social-btn.social-youtube:hover {
  background: rgba(255, 0, 0, 0.2);
  border-color: #ff0000;
  color: #ff4444;
  box-shadow: 0 4px 14px rgba(255, 0, 0, 0.3);
}

.person-social-btn.social-facebook:hover {
  background: rgba(24, 119, 242, 0.2);
  border-color: #1877f2;
  color: #e50914;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.3);
}

.person-social-btn.social-imdb:hover {
  background: #f5c518;
  border-color: #f5c518;
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 197, 24, 0.35);
}

.person-social-btn.social-website:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}

.person-social-btn.social-wikipedia:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.person-social-btn.social-wikidata:hover {
  background: rgba(51, 153, 102, 0.25);
  border-color: #339966;
  color: #5cd699;
}

.person-detail-view-container .person-modal-body {
  padding: 0;
  overflow: visible;
}

@media (max-width: 700px) {
  .person-detail-view-container {
    padding: 16px 12px 90px 12px;
  }
  .person-detail-nav-bar {
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }
  .person-detail-view-container .person-name {
    font-size: 1.5rem;
  }
  .person-detail-view-container .person-modal-portrait-wrap {
    width: 65px;
    height: 65px;
    margin-right: 14px;
  }
  .person-breadcrumb-current {
    max-width: 130px;
  }
}
