/**
 * Little Social - Profile View Component
 * Profile header banner, overlapping avatar, verified metadata table,
 * follow stats, and timeline tabs.
 */

.profile-container {
  display: flex;
  flex-direction: column;
  background-color: var(--surface-card);
}

.profile-banner {
  width: 100%;
  aspect-ratio: 3 / 1;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.profile-header-main {
  padding: var(--space-4);
  position: relative;
}

.profile-avatar-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: -64px;
  margin-bottom: var(--space-3);
}

.profile-avatar {
  width: 92px;
  height: 92px;
  border-radius: var(--radius-full);
  border: 4px solid var(--surface-card);
  object-fit: cover;
  background-color: var(--surface-active);
  box-shadow: var(--shadow-md);
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.profile-name-group {
  margin-bottom: var(--space-3);
}

.profile-display-name {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  line-height: 1.2;
}

.profile-handle {
  font-size: var(--text-base);
  color: var(--text-secondary);
}

.profile-bio {
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  color: var(--text-primary);
}

/* Verified Metadata Table (e.g. Website, GitHub, PGP) */
.profile-metadata-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.profile-metadata-row {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-metadata-row:last-child {
  border-bottom: none;
}

.profile-metadata-label {
  width: 120px;
  min-width: 120px;
  padding: var(--space-2) var(--space-3);
  background-color: var(--surface-bg);
  color: var(--text-secondary);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--text-xs);
}

.profile-metadata-value {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  background-color: var(--surface-card);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.profile-metadata-value.verified {
  background-color: rgba(34, 197, 94, 0.08);
  color: #22c55e;
}

/* Stats Row */
.profile-stats {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  padding-bottom: var(--space-2);
}

.profile-stat-number {
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

/* Follow button states: Follow -> Following (Unfollow on hover) / Requested */
.profile-follow-btn {
  min-width: 7.5rem;
}

.profile-follow-btn .follow-label-hover,
.profile-follow-btn.is-following:hover .follow-label,
.profile-follow-btn.is-following:focus-visible .follow-label {
  display: none;
}

.profile-follow-btn.is-following:hover .follow-label-hover,
.profile-follow-btn.is-following:focus-visible .follow-label-hover {
  display: inline;
}

.profile-follow-btn.is-following:hover,
.profile-follow-btn.is-following:focus-visible {
  border-color: var(--color-danger);
  color: var(--color-danger);
}

.profile-follow-btn.is-requested {
  color: var(--text-secondary);
}

.profile-relationship-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

@container column (max-width: 380px) {
  .profile-avatar {
    width: 72px;
    height: 72px;
  }

  .profile-avatar-row {
    margin-top: -48px;
  }

  .profile-display-name {
    font-size: var(--text-lg);
  }

  .profile-metadata-label {
    width: 90px;
    min-width: 90px;
  }
}

.profile-metadata-value a {
  color: inherit;
  word-break: break-all;
}
