/* User Profile Page Styles */

.user-profile {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
}

@media (max-width: 768px) {
  .user-profile {
    padding: 16px 12px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .user-profile {
    padding: 20px;
    max-width: 100%;
  }
}

.user-profile__header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  padding: 24px;
}

@media (max-width: 768px) {
  .user-profile__header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 20px;
  }
}

.user-profile__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2, #10b981));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 600;
  color: white;
  flex-shrink: 0;
}

.user-profile__avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .user-profile__avatar {
    width: 64px;
    height: 64px;
    font-size: 24px;
  }
}

.user-profile__info {
  flex: 1;
  min-width: 0;
}

.user-profile__name {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text);
}

@media (max-width: 768px) {
  .user-profile__name {
    font-size: 24px;
  }
}

.user-profile__meta {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px 0;
}

.user-profile__review-button {
  margin-top: 16px;
}

.user-profile__stats {
  margin-bottom: 24px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 24px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 32px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .stat-value {
    font-size: 24px;
  }
}

.stat-label {
  font-size: 14px;
  color: var(--muted);
}

.user-profile__apartments,
.user-profile__reviews-written,
.user-profile__reviews-received,
.user-profile__reviews-section {
  margin-bottom: 24px;
}

.user-profile__apartments h3,
.user-profile__reviews-written h3,
.user-profile__reviews-received h3 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.user-profile__apartment-item {
  margin-bottom: 0;
}

.user-profile__review-item {
  margin-bottom: 16px;
}

.user-profile__review-item:last-child {
  margin-bottom: 0;
}

.user-profile__loading,
.user-profile__error {
  text-align: center;
  padding: 40px 20px;
}

.user-profile__error h2 {
  margin: 0 0 16px 0;
  color: var(--text);
}

.user-profile__error p {
  margin: 0 0 24px 0;
  color: var(--muted);
}

.user-profile__reviews-written a,
.user-profile__reviews-written .link-underline {
  color: var(--text);
  text-decoration: underline;
}

.user-profile__reviews-written a:hover,
.user-profile__reviews-written .link-underline:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Reviews Pagination and Sorting */
.reviews-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 16px;
}

.reviews-section__header h3 {
  margin: 0;
}

.reviews-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.reviews-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reviews-sort label {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.reviews-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reviews-pagination__info {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .reviews-section__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .reviews-controls {
    width: 100%;
    justify-content: space-between;
  }
}

