/**
 * Modern User Profile
 * Following best practices for contemporary profile layouts
 */

.user-profile-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6);
}

/* Profile Header Card */
.user-profile-header {
  background: var(--color-bg-base);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-6);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-6);
  align-items: start;
  transition: box-shadow var(--transition-base);
}

.user-profile-header:hover {
  box-shadow: var(--shadow-lg);
}

/* Avatar Section */
.user-profile-avatar {
  position: relative;
}

.user-profile-avatar img {
  width: 240px;
  height: 240px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  box-shadow: var(--shadow-md);
  border: 4px solid var(--color-bg-subtle);
  transition: transform var(--transition-base);
}

.user-profile-avatar img:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
}

/* Main Info Section */
.user-profile-info {
  min-width: 0; /* Allow text truncation */
}

.user-profile-name {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-base);
  margin: 0 0 var(--space-2) 0;
  line-height: var(--line-height-tight);
}

.user-profile-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Status Badges */
.user-profile-badges {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  background: var(--color-bg-subtle);
  color: var(--color-text-base);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border: 1px solid var(--color-border-base);
}

.user-profile-badge.is-instructor {
  background: var(--ctp-blue);
  color: white;
  border-color: var(--ctp-blue);
}

.user-profile-badge.is-suspended {
  background: var(--ctp-yellow);
  color: white;
  border-color: var(--ctp-yellow);
}

/* Contact Info */
.user-profile-contacts {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.user-profile-contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--color-bg-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
  color: var(--color-text-base);
  border: 1px solid transparent;
}

.user-profile-contact-item:hover {
  background: var(--color-bg-muted);
  border-color: var(--color-border-muted);
  transform: translateX(2px);
}

.user-profile-contact-item i {
  width: 20px;
  text-align: center;
  color: var(--color-primary);
}

/* Action Buttons Section */
.user-profile-actions {
  display: flex;
  flex-direction: row;
  gap: var(--space-2);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-4);
}
/* History Sections */
.user-profile-section {
  background: var(--color-bg-base);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--space-6);
}

.user-profile-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-border-base);
}

.user-profile-section-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-base);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.user-profile-section-title i {
  color: var(--color-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
  .user-profile-container {
    padding: var(--space-4);
  }

  .user-profile-header {
    grid-template-columns: 1fr;
    padding: var(--space-5);
    text-align: center;
  }

  .user-profile-avatar {
    justify-self: center;
  }

  .user-profile-avatar img {
    width: 180px;
    height: 180px;
  }

  .user-profile-section {
    padding: var(--space-4);
  }
}

/* Empty State */
.user-profile-empty {
  text-align: center;
  padding: var(--space-8);
  color: var(--color-text-muted);
}

.user-profile-empty i {
  font-size: 3rem;
  color: var(--color-border-strong);
  margin-bottom: var(--space-4);
}

/* Chat removal status */
.user-profile-badge.is-chat-removed {
  background: var(--ctp-red);
  color: white;
  border-color: var(--ctp-red);
}
