/* profile.css – Version 3.6
   Scoped to .profile-page only.
   • No :root edits (won’t change your site’s colors)
   • No .layout overrides (won’t fight your homepage layout)
   • Keeps main column exactly 900px and centered
*/

/* Keep the main column identical to homepage.
   We only scope to .profile-page so other pages stay untouched. */
.profile-page .container.profile-container,
.profile-page main.container {
  max-width: 900px !important;
  width: 100%;
  margin: 0 auto;
  /* If your global layout uses flex, this prevents “pushed right” behavior */
  flex: 1 1 auto;
}

/* Cover banner lives inside the main column */
.profile-page .profile-cover{
  position: relative;
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  border: 1px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  margin: 16px 0 8px;
}
.profile-page .profile-cover::after{
  content:'';
  position:absolute; inset:auto 0 0 0; height:60px;
  background: linear-gradient(transparent, rgba(0,0,0,.15));
}

/* Action bar (Edit / Friend / Message) */
.profile-page .action-bar{
  display:flex; justify-content:flex-end; gap:8px;
  margin: 8px 0 16px;
}
.profile-page .action-buttons{ display:flex; gap:8px; }
.profile-page .edit-profile-link{ text-align:right; }

/* Buttons inherit your site colors; only add subtle shape */
.profile-page .edit-profile-link a,
.profile-page .btn-follow,
.profile-page .btn-unfriend,
.profile-page .btn-message,
.profile-page .btn-pending,
.profile-page .btn-block{
  display:inline-block;
  border:0; cursor:pointer;
  padding:8px 14px;
  border-radius:8px;
  font-weight:600;
  text-decoration:none;
  color: inherit;                 /* use your theme text color */
  background: currentColor;       /* rely on link color set by your theme */
  opacity: .95;
}
.profile-page .btn-pending{ opacity:.6; cursor:default; }
.profile-page .edit-profile-link a:hover,
.profile-page .btn-follow:hover,
.profile-page .btn-message:hover,
.profile-page .btn-block:hover{
  opacity: 1;
}

/* Profile header/info */
.profile-page .profile-info{
  background: var(--container-bg, #fff);
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.profile-page .profile-avatar{
  width:120px; height:120px; border-radius:50%; object-fit:cover;
  border:4px solid #fff; background:#fff;
  margin-top:-60px; box-shadow:0 6px 18px rgba(0,0,0,.08);
}
.profile-page .profile-name{
  margin:10px 0 6px;
  /* Use your theme’s heading/link color; fall back to inherit */
  color: var(--heading-color, inherit);
  font-size:1.5rem;
}
.profile-page .profile-location{
  margin:4px 0; font-style:italic;
  color: var(--muted-color, inherit);
}
.profile-page .profile-bio{
  margin:8px 0 0; color: inherit; line-height:1.5;
}

/* Recent posts */
.profile-page .profile-posts{ margin-top:24px; }
.profile-page .profile-posts h2{
  margin:0 0 8px 0;
  color: var(--heading-color, inherit);
  border-bottom:1px solid #ddd;
  padding-bottom:6px;
}
.profile-page .profile-posts .post{
  background: var(--container-bg, #fff);
  border:1px solid #ddd; border-radius:10px;
  margin:12px 0; overflow:hidden;
}
.profile-page .profile-posts .post time{
  display:block; font-size:.85em; color: var(--muted-color, #666);
  margin:10px 14px 0;
}
.profile-page .profile-posts .post-photo{
  display:block; width:100%; max-height:320px; object-fit:cover; margin:8px 0;
}
.profile-page .profile-posts .post-content{
  padding:10px 14px; color: inherit; line-height:1.55;
}

/* Sidebar avatars (do not affect global sidebar styles, just sizes) */
.profile-page .sidebar-avatar{
  width:32px; height:32px; border-radius:50%;
  object-fit:cover; vertical-align:middle; margin-right:8px;
}

/* Small devices */
@media (max-width: 600px){
  .profile-page .profile-avatar{ width:96px; height:96px; margin-top:-48px; }
  .profile-page .action-bar{ justify-content:center; flex-wrap:wrap; }
}

/* --- Relationship buttons (scoped to profile page) --- */
.profile-page .btn-delete {
  background: #b91c1c;          /* deep red */
  color: #fff;
}
.profile-page .btn-delete:hover { background: #991b1b; }

.profile-page .btn-block {
  background: #4b5563;          /* gray */
  color: #fff;
}
.profile-page .btn-block:hover { background: #374151; }

.profile-page .btn-edit {
  background: #2563eb;          /* blue */
  color: #fff;
}
.profile-page .btn-edit:hover { background: #1d4ed8; }

.profile-page .btn-unfriend {
  background: #dc2626;          /* red */
  color: #fff;
}
.profile-page .btn-unfriend:hover { background: #b91c1c; }

.profile-page .btn-follow {
  background: #16a34a;          /* green */
  color: #fff;
}
.profile-page .btn-follow:hover { background: #15803d; }

.profile-page .btn-message {
  background: #0284c7;          /* teal-blue */
  color: #fff;
}
.profile-page .btn-message:hover { background: #0369a1; }

/* --- Fix avatar/action-bar overlap --- */
.profile-page .action-bar{
  margin: 8px 0 24px;   /* more space below the buttons */
}

.profile-page .profile-info{
  margin-top: 32px;     /* push the card down so the -60px avatar clears the buttons */
  position: relative;   /* (layout hint; no visual change) */
}

/* Optional: tighten on small screens */
@media (max-width: 600px){
  .profile-page .action-bar{ margin: 8px 0 20px; }
  .profile-page .profile-info{ margin-top: 28px; }
}
