/* ==========================================================================
   User Profile
   Colors reference camerisetheme _variables.scss:
   $camerise-purple: #5B2B6B
   $camerise-purple-light: lighten(#5B2B6B, 15%) ≈ #8B4FA0
   $camerise-teal: #08B29F
   $camerise-teal-light: lighten(#08B29F, 15%) ≈ #3DCFBE
   $camerise-green: #A5BA39
   ========================================================================== */

/* Banner */
.userprofile__banner {
  height: 120px;
  background: linear-gradient(135deg, #8B4FA0 0%, #5B2B6B 50%, #4A2258 100%);
  opacity: 0.35;
}

/* Header layout */
.userprofile__header {
  margin-top: -50px;
  margin-bottom: 1.25rem;
}

/* Avatar */
.userprofile__avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 4px solid #fff;
  background-color: #5B2B6B;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

.userprofile__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.userprofile__avatar-initials {
  font-size: 2.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.userprofile__btn-edit {
  background-color: #5B2B6B;
  color: #fff;
  border: none;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  text-decoration: none;
}

.userprofile__btn-edit:hover {
  background-color: #4A2258;
  color: #fff;
}

.userprofile__btn-dashboard {
  background-color: #fff;
  color: #212529;
  border: 1px solid #dee2e6;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  text-decoration: none;
}

.userprofile__btn-dashboard:hover {
  background-color: #f8f9fa;
  color: #212529;
}

/* Identity */
.userprofile__identity {
  padding-top: 0.5rem;
}

.userprofile__name {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.125rem;
  color: #212529;
}

.userprofile__role {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}

.userprofile__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6c757d;
}

.userprofile__meta-item i {
  margin-right: 0.25rem;
}

/* Action buttons */
.userprofile__actions {
  display: flex;
  gap: 0.5rem;
  padding-top: 0.75rem;
}

.userprofile__btn-follow {
  background-color: #08B29F;
  color: #fff;
  border: none;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.4rem 1rem;
}

.userprofile__btn-follow:hover {
  background-color: #079386;
  color: #fff;
}

.userprofile__btn-message {
  background-color: #fff;
  color: #5B2B6B;
  border: 1px solid #5B2B6B;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.4rem 1rem;
  text-decoration: none;
}

.userprofile__btn-message:hover {
  background-color: #5B2B6B;
  color: #fff;
}

.userprofile__btn-share {
  background-color: #fff;
  color: #212529;
  border: 1px solid #dee2e6;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.4rem 1rem;
}

.userprofile__btn-share:hover {
  background-color: #f8f9fa;
}

/* Stats */
.userprofile__stats {
  display: flex;
  gap: 1.5rem;
  font-size: 0.95rem;
  color: #212529;
}

.userprofile__stat strong {
  font-weight: 700;
  margin-right: 0.25rem;
}

.userprofile__divider {
  border-color: #dee2e6;
  margin: 1rem 0;
}

/* Bio */
.userprofile__bio {
  font-size: 0.95rem;
  color: #495057;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Tags / Pills */
.userprofile__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.userprofile__tag-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.userprofile__tag-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c757d;
}

.userprofile__tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.userprofile__pill {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
}

.userprofile__pill--subject {
  background-color: #eef6f5;
  color: #08B29F;
  border: 1px solid #d0ebe8;
}

.userprofile__pill--grade {
  background-color: #fff;
  color: #495057;
  border: 1px solid #ced4da;
}

/* Social / Web Links */
.userprofile__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.userprofile__social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: #5B2B6B;
  text-decoration: none;
  padding: 0.3rem 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  transition: background-color 0.15s;
}

.userprofile__social-link:hover {
  background-color: #f8f9fa;
  color: #5B2B6B;
}

.userprofile__social-link i {
  font-size: 1rem;
}

/* Tabs */
.userprofile__tabs {
  border-bottom: 2px solid #dee2e6;
  margin-bottom: 1.5rem;
  gap: 0;
}

.userprofile__tabs .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  color: #6c757d;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  margin-bottom: -2px;
  border-radius: 0;
  background: none;
}

.userprofile__tabs .nav-link:hover {
  color: #212529;
  border-bottom-color: #ced4da;
}

.userprofile__tabs .nav-link.active {
  color: #212529;
  border-bottom-color: #08B29F;
}

/* Tab content */
.userprofile__tab-content {
  padding-bottom: 3rem;
}

/* Resource Cards */
.userprofile__resource-img-wrap {
  background: linear-gradient(180deg, #f0f0f0 0%, #e8e8e8 100%);
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
}

.userprofile__resource-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.userprofile__resource-card {
  transition: box-shadow 0.15s;
}

.userprofile__resource-card:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1) !important;
}

.userprofile__resource-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.userprofile__resource-field-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  margin-bottom: 0.2rem;
  width: 100%;
}

.userprofile__resource-link:hover {
  color: #5B2B6B !important;
}

.userprofile__resource-grades {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.userprofile__resource-stats {
  display: flex;
  gap: 0.625rem;
  font-size: 0.75rem;
  color: #6c757d;
}

.userprofile__resource-stats i {
  margin-right: 0.125rem;
}

.userprofile__btn-open {
  color: #5B2B6B;
  white-space: nowrap;
}

.userprofile__btn-open:hover {
  color: #4A2258;
}

/* About tab */
.userprofile__about-bio {
  font-size: 0.95rem;
  color: #495057;
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 767.98px) {
  .userprofile__banner {
    height: 80px;
  }

  .userprofile__header {
    margin-top: -35px;
  }

  .userprofile__avatar {
    width: 80px;
    height: 80px;
  }

  .userprofile__avatar-initials {
    font-size: 1.5rem;
  }

  .userprofile__name {
    font-size: 1.35rem;
  }

  .userprofile__actions {
    width: 100%;
    justify-content: flex-start;
    padding-top: 0.5rem;
  }

  .userprofile__tags {
    gap: 1rem;
  }

  .userprofile__stats {
    gap: 1rem;
    font-size: 0.875rem;
  }
}
