/* User profile page */

.profile-page {
  max-width: 1140px;
}

.profile-sidebar {
  position: sticky;
  top: 5.5rem;
}

.profile-card,
.profile-panel {
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.08);
}

.profile-avatar-wrap {
  width: 7.5rem;
  height: 7.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #dee2e6 0%, #f8f9fa 55%, #adb5bd 100%);
  padding: 4px;
}

.profile-avatar-wrap .profile-avatar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #fff;
  color: #495057;
  font-size: 3rem;
}

.profile-avatar-wrap .profile-avatar-icon[data-bs-toggle] {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.profile-avatar-wrap .profile-avatar-icon[data-bs-toggle]:hover {
  transform: scale(1.03);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
}

.profile-username {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.profile-meta {
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.profile-xp-card {
  background: #f8f9fa;
  border-radius: 0.625rem;
  padding: 0.875rem 1rem;
  margin: 1rem 0;
}

.profile-xp-level {
  font-size: 1.125rem;
  font-weight: 600;
}

.profile-stat-section + .profile-stat-section {
  margin-top: 1rem;
}

.profile-stat-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.5rem;
}

.profile-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.profile-stat-tile {
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 0.5rem 0.375rem;
  text-align: center;
  min-height: 3.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-stat-tile .stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.2;
}

.profile-stat-tile .stat-label {
  font-size: 0.6875rem;
  color: var(--bs-secondary-color);
  line-height: 1.2;
  margin-top: 0.125rem;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.profile-actions .btn {
  font-size: 0.8125rem;
}

.profile-activity-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .profile-activity-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.profile-activity-card .card-header {
  background: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.625rem 1rem;
}

.profile-activity-card .list-group-item {
  font-size: 0.875rem;
  padding: 0.625rem 1rem;
  border-color: rgba(0, 0, 0, 0.05);
}

.profile-activity-card .activity-title {
  display: block;
  font-weight: 500;
  text-decoration: none;
  color: inherit;
}

.profile-activity-card .activity-title:hover {
  color: var(--bs-primary);
}

.profile-activity-card .activity-meta {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  margin-top: 0.125rem;
}

.profile-xp-table {
  font-size: 0.8125rem;
}

.profile-xp-table th {
  white-space: nowrap;
  font-weight: 600;
}

.profile-xp-table td:nth-child(5) {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-icon-choice.selected,
.avatar-radio-label input:checked + .avatar-icon-choice {
  border-color: var(--bs-primary) !important;
  color: var(--bs-primary) !important;
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.2);
}
