
/* user_style.css - Dedicated styling for user.php
   Loaded LAST to override any existing site CSS that might hide buttons.
*/

:root{
  --bg:#0b1220;
  --card:#0f1a33;
  --text:#e7eefc;
  --muted:#a9b7d6;
  --line:rgba(255,255,255,.14);
  --accent:#2eb7e9;
  --accent2:#69e0ff;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* Hard overrides to prevent hidden buttons */
button, input[type="submit"]{
  display:inline-block !important;
  visibility:visible !important;
  opacity:1 !important;
}
/* prevent clipping */
form, .card, .postbox, .post, .replies, .reply-form{
  overflow: visible !important;
  height: auto !important;
}

.wrap{ max-width:1100px; margin:0 auto; padding:18px; }

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(255,255,255,.04);
}

.brand{
  color: var(--text);
  text-decoration:none;
  font-weight:700;
}
.topbar-right{ display:flex; align-items:center; gap:10px; }
.me{ color: var(--muted); }

.grid{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:16px;
  margin-top:16px;
}
@media (max-width: 900px){
  .grid{ grid-template-columns: 1fr; }
}

.card{
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(255,255,255,.04);
  padding:14px;
}

.profile-head{
  display:flex;
  gap:12px;
  align-items:flex-start;
}
.avatar img{
  width:90px;
  height:90px;
  object-fit:cover;
  border-radius:14px;
  border:1px solid var(--line);
  background:#000;
}
.title{ margin:0; font-size:22px; }
.meta{ display:flex; flex-direction:column; gap:4px; color: var(--muted); font-size:13px; margin-top:6px; }

.actions-row{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line);
}
.label{ font-size:12px; color: var(--muted); margin-bottom:6px; }
.hint{ display:inline-block; margin-left:10px; color: var(--muted); font-size:12px; }

.friends-strip{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line);
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.friends-strip img{ width:44px; height:44px; border-radius:12px; border:1px solid var(--line); object-fit:cover; }

.section-title{ margin:0 0 10px 0; font-size:18px; }

.notice{
  padding:12px;
  border:1px dashed var(--line);
  border-radius:12px;
  color: var(--muted);
}

.postbox{
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px;
  margin-bottom:12px;
  background: rgba(0,0,0,.12);
}

.post-form textarea,
.reply-form textarea{
  width:100%;
  padding:10px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.25);
  color: var(--text);
  outline:none;
}
.post-controls{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:10px;
}

.btn{
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 14px;
  background: rgba(255,255,255,.05);
  color: var(--text);
  cursor:pointer;
  text-decoration:none;
  font-weight:700;
}
.btn:hover{ border-color: rgba(255,255,255,.35); }

.btn-primary{
  background: var(--accent) !important;
  border-color: transparent !important;
  color:#06111f !important;
}
.btn-primary:hover{ background: var(--accent2) !important; }

.btn-ghost{ background: rgba(255,255,255,.03); }

.post{
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
  margin-bottom:12px;
  background: rgba(0,0,0,.10);
}
.post-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  margin-bottom:10px;
}
.user{ color: var(--accent2); text-decoration:none; font-weight:700; }
.user:hover{ text-decoration:underline; }
.date{ color: var(--muted); font-size:12px; }

.post-body{ line-height:1.45; color: var(--text); }

.media-wrap{ margin-top:10px; }
.media{ max-width:100%; border-radius:14px; border:1px solid var(--line); }

.post-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
}

.pill{
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color: var(--muted);
  font-size:12px;
}

.reply-form{ margin-top:10px; }
.reply-form button{ margin-top:8px; }

.replies{
  margin-top:12px;
  padding-top:10px;
  border-top:1px solid var(--line);
}
.replies-title{ font-weight:700; color: var(--muted); margin-bottom:8px; }
.reply-empty{ color: var(--muted); font-size:12px; margin-bottom:8px; }

.reply{
  border-left:3px solid rgba(255,255,255,.18);
  padding-left:10px;
  margin-bottom:10px;
}
.reply-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.reply-body{ color: var(--text); line-height:1.45; }

/* Friend request box */
.req-box{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--line);
}
.req-title{
  font-weight:700;
  color: var(--text);
  margin-bottom:10px;
}
.req-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid var(--line);
  border-radius:14px;
  background: rgba(0,0,0,.10);
  margin-bottom:10px;
}
.req-left{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.req-date{
  color: var(--muted);
  font-size:12px;
}
.req-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

/* Avatar upload form */
.avatar-form{
  margin-top:10px;
}
.avatar-form form{
  border:1px solid var(--line);
  border-radius:14px;
  padding:10px;
  background: rgba(0,0,0,.12);
}
.avatar-form h4{
  margin:0 0 8px 0;
  font-size:14px;
}
.avatar-form input[type="file"]{
  width:100%;
  color: var(--text);
}
.avatar-form input[type="submit"]{
  padding:10px 14px;
  border-radius:12px;
  border:0;
  background: var(--accent);
  color:#06111f;
  font-weight:700;
  cursor:pointer;
}

/* Owner edit/delete links */
.owner-actions{
  margin-top:8px;
  font-size:13px;
}
.owner-actions a{
  color: var(--accent2);
  text-decoration:none;
  font-weight:700;
}
.owner-actions a:hover{ text-decoration:underline; }

/* Like button */
.like-btn{
  cursor:pointer;
  display:inline-flex !important;
  align-items:center;
  gap:6px;
}
.reply-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:8px;
  flex-wrap:wrap;
}

/* Reply textarea visibility fix */
.reply-form textarea,
.post-form textarea{
  background: rgba(255,255,255,.10) !important;
  color: #e7eefc !important;
}
.reply-form textarea::placeholder,
.post-form textarea::placeholder{
  color: rgba(231,238,252,.75) !important;
}


/* FORCE reply textarea readability (override any global textarea styles) */
#profileWall form.reply-form textarea,
.reply-form textarea,
textarea.replytext,
textarea#replytext,
textarea[name="content"]{
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid rgba(0,0,0,.35) !important;
  caret-color: #000000 !important;
}
#profileWall form.reply-form textarea::placeholder,
.reply-form textarea::placeholder,
textarea.replytext::placeholder,
textarea[name="content"]::placeholder{
  color: rgba(0,0,0,.6) !important;
}


/* =========================================================
   Comment + Reply Backgrounds (High Specificity Overrides)
   ========================================================= */

/* Comment card (main comment/post container) */
#profileWall .post,
.post{
  background: rgba(255,255,255,.045) !important; /* comment background */
}

/* Replies */
#profileWall .replies .reply,
.replies .reply{
  margin-left: 0;
  padding: 10px 10px 10px 12px;
  border-left: 3px solid rgba(255,255,255,.28);
  border-radius: 12px;
  background: rgba(255,255,255,.075) !important; /* lighter than comment */
}

/* Nested replies */
#profileWall .replies .reply .reply,
.replies .reply .reply{
  margin-left: 18px;
  background: rgba(255,255,255,.090) !important;
  border-left-color: rgba(255,255,255,.36);
}

#profileWall .replies .reply .reply .reply,
.replies .reply .reply .reply{
  margin-left: 28px;
  background: rgba(255,255,255,.105) !important;
  border-left-color: rgba(255,255,255,.45);
}

/* Cap very deep threads */
#profileWall .replies .reply .reply .reply .reply,
.replies .reply .reply .reply .reply{
  margin-left: 38px;
}
