/* Main Container */
.user-profile-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem 2rem;
}

/* Profile Header Section */
.profile-header-section {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 2rem;
}

.profile-pic-wrapper {
  flex-shrink: 0;
  position: relative;
  cursor: pointer;
}

.profile-pic-wrapper:hover {
  border: 2px dashed #0073aa;
  border-radius: 50%;
  padding: 2px;
}

.profile-pic-wrapper:hover .profile-pic-overlay {
  opacity: 1;
}

.profile-pic-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
}

.profile-pic {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #f0f0f0;
}

.profile-info {
  flex: 1;
}

.profile-name {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.25rem 0;
}

.profile-username {
  color: #666;
  font-size: 1rem;
  margin: 0 0 1rem 0;
}

/* Edit Profile Button */
.edit-profile-button {
  background-color: #0073aa;
  color: #fff;
  font-size: 0.9rem;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  font-weight: 600;
}

.edit-profile-button:hover {
  background-color: #005f8d;
}

.claimed-properties-button {
  &:hover {
    color: #1f8fff;
  }
}

/* Profile Sections */
.profile-section {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.profile-section h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f0f0f0;
}

/* Bio Section */
.bio-section .profile-bio {
  color: #444;
  line-height: 1.6;
  margin: 0;
}

/* Content Grid Layout */
.profile-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media screen and (min-width: 900px) {
  .profile-content-grid {
    grid-template-columns: 2fr 1fr;
  }
}

/* Claimed Property Section */
.claimed-property-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.2s ease;
}

.claimed-property-card:hover {
  transform: translateY(-2px);
}

.claimed-property-card .property-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  font-size: 1.1rem;
}

.property-icon {
  font-size: 2rem;
}

/* Posts List */
.posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-item {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.post-item:last-child {
  border-bottom: none;
}

.post-type-badge {
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.post-item a {
  color: #0073aa;
  text-decoration: none;
  font-weight: 500;
  flex: 1;
  min-width: 200px;
}

.post-item a:hover {
  text-decoration: underline;
  color: #005f8d;
}

.post-date {
  color: #999;
  font-size: 0.85rem;
  margin-left: auto;
}

/* Comments List */
.comments-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 600px;
  overflow-y: auto;
}

.comment-item {
  padding: 1rem;
  border-bottom: 1px solid #f0f0f0;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.comment-meta a {
  color: #0073aa;
  text-decoration: none;
  font-weight: 500;
}

.comment-meta a:hover {
  text-decoration: underline;
}

.comment-date {
  color: #999;
  font-size: 0.85rem;
}

.comment-excerpt {
  color: #555;
  line-height: 1.5;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.comment-attachment {
  margin-top: 0.75rem;
}

.comment-attachment img {
  max-width: 200px;
  height: auto;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.comment-attachment-file {
  margin-top: 0.75rem;
}

.comment-attachment-file a {
  display: inline-block;
  color: #0073aa;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.comment-attachment-file a:hover {
  background: #e8e8e8;
}

/* Followed Properties Sidebar */
.followed-properties-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 400px;
  overflow-y: auto;
}

.followed-properties-list li {
  margin-bottom: 0.5rem;
}

.followed-properties-list li a {
  display: block;
  padding: 0.75rem;
  background: #fafafa;
  border-radius: 6px;
  color: #0073aa;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease;
}

.followed-properties-list li a:hover {
  background: #f0f0f0;
  color: #005f8d;
}

.empty-message {
  color: #999;
  font-style: italic;
  text-align: center;
  padding: 1rem;
}

/* MODAL OVERLAY */
.upp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.upp-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* MODAL BOX */
.upp-modal {
  background: #fff;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  animation: uppModalFade 0.2s ease-out;
  overflow-y: auto;
}

.profile-pic-modal {
  max-width: 700px;
}

@keyframes uppModalFade {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.upp-modal h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  color: #1a1a1a;
}

/* Profile Picture Upload Modal */
.profile-pic-upload-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.upload-input-section {
  display: flex;
  flex-direction: column;
}

.upload-divider {
  text-align: center;
  margin: 1.5rem 0;
  position: relative;
}

.upload-divider::before,
.upload-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: #ddd;
}

.upload-divider::before {
  left: 0;
}

.upload-divider::after {
  right: 0;
}

.upload-divider span {
  background: #fff;
  padding: 0 1rem;
  color: #999;
  font-size: 0.9rem;
}

.upload-preview-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.preview-label {
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
  align-self: flex-start;
}

.profile-pic-preview {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid #e0e0e0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.profile-pic-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* FORM */
#editProfileForm label,
.upload-input-section label {
  display: block;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.4rem;
  color: #333;
}

#editProfileForm input,
#editProfileForm textarea,
.upload-input-section input {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

#editProfileForm input:focus,
#editProfileForm textarea:focus,
.upload-input-section input:focus {
  outline: none;
  border-color: #0073aa;
}

#editProfileForm textarea {
  resize: vertical;
  font-family: inherit;
}

.upp-hint {
  display: block;
  font-size: 0.8rem;
  color: #777;
  margin-top: 0.3rem;
}

/* BUTTON ROW */
.upp-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 2rem;
  gap: 0.75rem;
}

.upp-modal-actions button {
  padding: 0.65rem 1.5rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-weight: 600;
}

#closeEditModal,
#closeProfilePicModal {
  background: #e0e0e0;
  color: #333;
}

#closeEditModal:hover,
#closeProfilePicModal:hover {
  background: #d0d0d0;
}

#upp-save-btn,
#saveProfilePic {
  background: #0073aa;
  color: #fff;
}

#upp-save-btn:hover,
#saveProfilePic:hover {
  background: #005f8d;
}

#upp-save-btn:disabled,
#saveProfilePic:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
  .user-profile-container {
    padding: 0 1rem 1rem;
  }
  
  .profile-header-section {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  
  .profile-pic {
    width: 100px;
    height: 100px;
  }
  
  .profile-name {
    font-size: 1.5rem;
  }
  
  .profile-section {
    padding: 1rem;
  }
  
  .post-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-date {
    margin-left: 0;
  }
  
  .profile-pic-upload-container {
    grid-template-columns: 1fr;
  }
}