/*
 * Momo Review — Profile + edit profile styles.
 */

.profile-page,
.edit-profile-page {
  max-width: 1080px;
  padding-top: 40px;
  padding-bottom: 80px;
}

.edit-profile-page {
  max-width: 720px;
}

/* Profile header */
.profile-header {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 32px 36px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .profile-header {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto;
    padding: 24px;
    gap: 16px;
  }
  .profile-actions {
    grid-column: 1 / -1;
    flex-direction: row;
  }
}

.profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--background);
  border: 3px solid var(--surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .profile-avatar { width: 80px; height: 80px; }
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-circle {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.avatar-circle--lg {
  font-size: 2.5rem;
}

.profile-info {
  min-width: 0;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--text);
  line-height: 1.2;
}

.profile-email {
  font-size: 0.875rem;
  color: var(--text-light);
  margin: 0 0 10px;
}

.profile-bio {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.55;
  margin: 10px 0;
  max-width: 540px;
}

.profile-joined {
  font-size: 0.78rem;
  color: var(--text-light);
  margin: 6px 0 0;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 180px;
}

.profile-actions .btn {
  text-decoration: none;
  text-align: center;
  font-size: 0.9rem;
  padding: 12px 22px;
  font-weight: 600;
}

/* My reviews section header override (smaller than default section-title) */
.my-reviews .section-title {
  font-size: 1.25rem !important;
  margin-bottom: 4px;
}

.my-reviews .section-subtitle {
  font-size: 0.875rem;
  margin-bottom: 24px;
}

.my-reviews-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.my-review-card {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.my-review-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light, #ffb8c5);
}

@media (max-width: 640px) {
  .my-review-card {
    grid-template-columns: 100px 1fr;
    grid-template-rows: auto auto;
    padding: 16px;
    gap: 12px;
  }
  .my-review-actions { grid-column: 1 / -1; }
}

.my-review-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--background);
  border-radius: var(--radius-sm, 10px);
}

.my-review-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.my-review-thumb--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.5;
}

.my-review-body {
  min-width: 0;
}

.my-review-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.status-publish { background: rgba(34, 197, 94, 0.15); color: #166534; }
.status-pending { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.status-draft   { background: rgba(107, 114, 128, 0.15); color: #374151; }
.status-future  { background: rgba(59, 130, 246, 0.15); color: #1e40af; }

.my-review-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.4;
}

.my-review-title a {
  color: var(--text);
  text-decoration: none;
}

.my-review-title a:hover {
  color: var(--primary);
}

.my-review-date {
  font-size: 0.78rem;
  color: var(--text-light);
  margin: 0 0 12px;
}

.my-review-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 110px;
}

.my-review-actions .btn {
  font-size: 0.8rem;
  padding: 8px 16px;
}

/* Edit form */
.edit-profile-form {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Form atoms (form-row, form-label, form-input, form-textarea, form-file,
 * form-actions, form-message) live in components/form-atoms.css — they are
 * registered globally and apply on every form-using page (write-review,
 * profile-edit, new-topic). Page-specific overrides below. */

.edit-profile-form .form-row--two {
  gap: 12px;
}

.form-row--avatar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.avatar-uploader {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.avatar-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--background);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.avatar-uploader-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.avatar-uploader-controls .hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin: 0;
}

.avatar-uploader-controls .form-file {
  width: auto;
  max-width: 100%;
}

.form-row--password {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 10px);
  padding: 16px;
  background: rgba(0, 0, 0, 0.02);
}

.form-row--password summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--primary);
  list-style: none;
  user-select: none;
}

.form-row--password summary::-webkit-details-marker { display: none; }

.form-row--password summary::before {
  content: '🔒 ';
  margin-right: 4px;
}

.form-row--password[open] summary::before { content: '🔓 '; }

.form-row--password-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row--password .form-row--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .form-row--password .form-row--two { grid-template-columns: 1fr; }
  .edit-profile-form { padding: 20px; }
}

/* Reuse write-review form styles for inputs/buttons */
