/* Profile-specific layout adjustments */
.profile-page .container{
	max-width: 1120px; /* wider on profile pages */
}

/* Wider bio area */
#bio-input{ width: 100%; }
.profile-card{ background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 16px; overflow: hidden; display: flex; flex-direction: column; gap: 12px; }
.profile-cover{ width: 100%; height: 160px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); margin-bottom: 12px; overflow: hidden; display:block; }
.profile-cover img{ width: 100%; height: 100%; object-fit: cover; display:block; }
.profile-cover.placeholder{ background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 10px, var(--surface) 10px, var(--surface) 20px); }
.profile-cover.editable{ cursor: default; outline: none; }
/* No hover highlight to avoid implying clickability */
/* .profile-cover.editable:hover{ box-shadow: 0 0 0 2px var(--attention) inset; } */
.profile-cover.editable.drag{ border-color: var(--attention); box-shadow: 0 0 0 2px var(--attention) inset; background: rgba(255,204,0,0.08); }
.profile-cover { position: relative; }
.profile-cover .cover-action{
	position: absolute;
	right: 10px;
	bottom: 10px;
	padding: 6px 10px;
	background: rgba(0,0,0,0.35);
	border-color: rgba(255,255,255,0.2);
	backdrop-filter: blur(2px);
}
.profile-header{ display: flex; align-items: center; gap: 14px; }
.profile-avatar{ width: 56px; height: 56px; border-radius: 50%; background: var(--surface); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text); border: 1px solid var(--border); }
.profile-avatar.editable{ cursor: default; outline: none; }
/* Remove hover cue to avoid implying clickability */
/* .profile-avatar.editable:hover{ box-shadow: 0 0 0 2px var(--attention) inset; } */
.profile-avatar.editable.drag{ border-color: var(--attention); box-shadow: 0 0 0 2px var(--attention) inset; background: rgba(255,204,0,0.08); }
.profile-title h1{ font-size: 22px; }
.badge{ display:inline-block; padding:2px 6px; border-radius:999px; border:1px solid var(--border); font-size:12px; color: var(--text); background: var(--surface); margin-left:8px; vertical-align:middle; }
.badge-admin{ background:#1f6feb; color:#fff; border-color:#1f6feb; }
.profile-actions{ margin-left: auto; }
.profile-meta{ display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
.meta-item{ background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px; }
.meta-label{ display:block; color: var(--text-muted); font-size:12px; margin-bottom:6px; }
.meta-value{ font-weight:600; }
.profile-sections{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.section{ background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)), var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 700px){ .profile-sections{ grid-template-columns: 1fr; } }

/* Preserve newlines and wrap aggressively so long posts/links don't break layout */
.bio-text{
	white-space: pre-wrap;         /* keep newlines */
	word-wrap: break-word;         /* legacy alias */
	overflow-wrap: anywhere;       /* break very long strings */
	word-break: break-word;        /* break long words when needed */
}

/* Links inside posts should also wrap instead of forcing horizontal scroll */
.bio-text a{
	overflow-wrap: anywhere;
	word-break: break-all;
}

/* Friend cards: contain inner overflow within rounded borders */
.friend-card{ overflow: hidden; }
