/* ================================================================
   profile.css — CPH Food Guide
================================================================ */

/* ─── HERO ───────────────────────────────────────────────────── */
.profile-hero {
  background: linear-gradient(150deg, var(--ink) 0%, #2A1E14 100%);
  padding: var(--sp-10) 0 var(--sp-8);
}
.profile-hero-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-avatar-lg {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.15);
  background: var(--cream-deep);
}
.profile-avatar-change-btn {
  position: absolute;
  bottom: 0; right: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  transition: background var(--t-fast), transform var(--t-fast);
  cursor: pointer;
}
.profile-avatar-change-btn:hover { background: var(--terracotta-dark); transform: scale(1.1); }
.profile-avatar-change-btn svg { width: 13px; height: 13px; }

.profile-username {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: var(--sp-1);
}
.profile-meta {
  font-size: 0.875rem;
  color: rgba(245,240,232,0.5);
}
.profile-banned-badge {
  display: inline-block;
  margin-top: var(--sp-2);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--error);
  background: var(--error-tint);
  padding: 2px var(--sp-3);
  border-radius: var(--radius-pill);
}

/* ─── BODY LAYOUT ────────────────────────────────────────────── */
.profile-container {
  padding-top: var(--sp-10);
  padding-bottom: var(--sp-20);
}
.profile-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: var(--sp-10);
  align-items: start;
}

/* ─── SETTINGS PANEL ─────────────────────────────────────────── */
.profile-settings { position: sticky; top: calc(var(--nav-h) + var(--sp-4)); }

.settings-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.settings-card-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.settings-form { display: flex; flex-direction: column; gap: var(--sp-3); }
.settings-form-actions { display: flex; justify-content: flex-end; }
.settings-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--sp-1) 0;
}
.settings-success {
  font-size: 0.8125rem;
  color: var(--success);
  font-weight: 500;
}
.settings-readonly-field {
  font-size: 0.9375rem;
  color: var(--ink-mid);
  padding: 0.625rem var(--sp-4);
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
}
.settings-avatar-hint { display: flex; flex-direction: column; gap: var(--sp-1); }
.avatar-upload-status {
  font-size: 0.8125rem;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  margin-top: var(--sp-1);
}
.avatar-upload-status--success { background: var(--success-tint); color: var(--success); }
.avatar-upload-status--error   { background: var(--error-tint);   color: var(--error); }
.avatar-upload-status--info    { background: var(--cream-deep);   color: var(--ink-muted); }

/* ─── DANGER ZONE ────────────────────────────────────────────── */
.settings-danger-zone {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.danger-zone-title {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--error);
}
.danger-zone-desc {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  line-height: 1.6;
}
.delete-confirm-inline {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-3);
  background: var(--error-tint);
  border: 1px solid var(--error);
  border-radius: var(--radius-md);
  animation: fadeIn var(--t-fast) both;
}
.delete-confirm-inline p { font-size: 0.8125rem; color: var(--error); }
.delete-confirm-row { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.delete-confirm-row .form-input { flex: 1; min-width: 0; }

/* ─── COMMENT HISTORY ────────────────────────────────────────── */
.profile-section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--sp-5);
}
.profile-no-comments {
  color: var(--ink-faint);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.0625rem;
}
.profile-no-comments a { color: var(--terracotta); text-decoration: underline; }

.profile-comment-list { display: flex; flex-direction: column; gap: var(--sp-3); }

.profile-comment-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-4) var(--sp-5);
  transition: border-color var(--t-fast);
}
.profile-comment-card:hover { border-color: var(--border-strong); }

.profile-comment-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
  flex-wrap: wrap;
}
.profile-comment-post-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  transition: color var(--t-fast);
}
.profile-comment-post-link:hover { color: var(--terracotta); }

.profile-comment-type-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px var(--sp-2);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}
.profile-comment-type-badge--review { background: var(--terracotta); color: #fff; }
.profile-comment-type-badge--recipe { background: var(--forest);     color: #fff; }

.profile-comment-date {
  font-size: 0.75rem;
  color: var(--ink-faint);
  margin-left: auto;
}
.profile-comment-stars { flex-shrink: 0; }

.profile-comment-text {
  font-size: 0.9375rem;
  color: var(--ink-mid);
  line-height: 1.65;
}

/* ─── GATE ───────────────────────────────────────────────────── */
.profile-gate-card {
  text-align: center;
  padding: var(--sp-24) var(--sp-4);
  max-width: 440px;
  margin: 0 auto;
}
.profile-gate-icon { font-size: 3rem; display: block; margin-bottom: var(--sp-4); }
.profile-gate-card h1 { font-family: var(--font-serif); font-size: 1.75rem; margin-bottom: var(--sp-3); }
.profile-gate-card p  { color: var(--ink-muted); margin-bottom: var(--sp-6); }

/* ─── SKELETONS ──────────────────────────────────────────────── */
.profile-hero-skeleton {
  height: 180px;
  background: linear-gradient(90deg, var(--cream-deep) 25%, var(--cream) 50%, var(--cream-deep) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
.profile-body-skeleton {
  height: 300px;
  margin: var(--sp-10) 0;
  border-radius: var(--radius-xl);
  background: linear-gradient(90deg, var(--cream-deep) 25%, var(--cream) 50%, var(--cream-deep) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 960px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-settings { position: static; }
}
