/* ============================================================
   The Wall — 2010 Facebook aesthetic
   Facebook blue: #3b5998  |  page bg: #e9ebee  |  link: #3b5998
   ============================================================ */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: #e9ebee;
  color: #1d2129;
  font-family: "lucida grande", tahoma, verdana, arial, sans-serif;
  font-size: 13px;
  line-height: 1.4;
}

a { color: #3b5998; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- top bar ---------- */

.topbar {
  background: #3b5998;
  border-bottom: 1px solid #29447e;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.topbar-inner {
  max-width: 980px;
  margin: 0 auto;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
}

.logo {
  color: #fff;
  font-size: 22px;
  font-weight: bold;
  letter-spacing: -0.5px;
  font-family: tahoma, arial, sans-serif;
  text-decoration: none !important;
}

.topbar-user { display: flex; align-items: center; gap: 8px; }

.identity-input {
  border: 1px solid #1d3a76;
  border-radius: 3px;
  padding: 4px 8px;
  font-size: 12px;
  width: 170px;
  background: #fff;
}
.identity-input:focus { outline: none; border-color: #fff; }

/* ---------- layout ---------- */

.page { padding: 16px 12px 60px; }

.layout {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}

.sidebar { position: sticky; top: 58px; }

.side-card {
  background: #fff;
  border: 1px solid #ccd0d5;
  border-radius: 3px;
  padding: 12px;
}
.side-title { margin: 0 0 8px; font-size: 14px; color: #3b5998; }
.side-note { color: #616161; margin: 0 0 10px; }
.side-stats { list-style: none; padding: 0; margin: 0; color: #616161; }
.side-stats li { padding: 3px 0; border-top: 1px solid #eee; }
.side-stats span { font-weight: bold; color: #333; }

/* ---------- cards ---------- */

.card {
  background: #fff;
  border: 1px solid #ccd0d5;
  border-radius: 3px;
}

/* ---------- composer ---------- */

.composer {
  display: flex;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
}

.composer-avatar,
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 3px;
  background: #3b5998;
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: 18px;
  text-transform: uppercase;
  border: 1px solid #29447e;
}

.composer-body { flex: 1; }

#post-body {
  width: 100%;
  border: 1px solid #bdc7d8;
  border-radius: 2px;
  padding: 8px;
  font-family: inherit;
  font-size: 13px;
  resize: vertical;
  min-height: 44px;
}
#post-body:focus { outline: none; border-color: #3b5998; }

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.composer-who { color: #90949c; font-size: 12px; }

/* ---------- buttons ---------- */

.btn {
  font-family: inherit;
  font-size: 12px;
  font-weight: bold;
  border: 1px solid #999;
  border-radius: 3px;
  background: #f5f6f7;
  color: #333;
  padding: 5px 12px;
  cursor: pointer;
}
.btn:hover { background: #ebecee; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: #3b5998;
  border-color: #29447e;
  color: #fff;
}
.btn-primary:hover { background: #30487b; }
.btn-primary:disabled { opacity: 0.5; cursor: default; }

/* ---------- sort bar ---------- */

.sortbar {
  display: flex;
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid #ccd0d5;
  border-radius: 3px;
  overflow: hidden;
  background: #fff;
}

.sort-btn {
  flex: 1;
  padding: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  border: none;
  border-right: 1px solid #ccd0d5;
  background: #f5f6f7;
  color: #3b5998;
  cursor: pointer;
}
.sort-btn:last-child { border-right: none; }
.sort-btn:hover { background: #ebecee; }
.sort-btn.active {
  background: #3b5998;
  color: #fff;
}

/* ---------- feed / posts ---------- */

.feed-list { display: flex; flex-direction: column; gap: 12px; }

.post { padding: 12px; }
.post.hot-flame { border-left: 3px solid #f05a28; }

.post-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.post-meta { display: flex; flex-direction: column; line-height: 1.25; }
.post-author { font-weight: bold; color: #3b5998; font-size: 13px; }
.post-time { color: #90949c; font-size: 11px; }

.post-body {
  font-size: 13px;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0 0 10px;
  padding-left: 50px;
}

.post-actions {
  display: flex;
  gap: 14px;
  padding-left: 50px;
  border-top: 1px solid #e9ebee;
  padding-top: 8px;
  font-size: 12px;
}

.action-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  color: #616161;
  cursor: pointer;
  padding: 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.action-btn:hover { color: #3b5998; text-decoration: underline; }
.action-btn.liked { color: #3b5998; font-weight: bold; }
.action-btn.disliked { color: #d0021b; font-weight: bold; }

/* ---------- comments ---------- */

.comments {
  margin: 10px 0 0 50px;
  padding-top: 8px;
  border-top: 1px solid #e9ebee;
}
.comment {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.comment-avatar {
  width: 28px; height: 28px; font-size: 13px;
}
.comment-bubble {
  background: #f5f6f7;
  border: 1px solid #e9ebee;
  border-radius: 10px;
  padding: 6px 10px;
  flex: 1;
}
.comment-author { font-weight: bold; color: #3b5998; }
.comment-body { color: #1d2129; word-wrap: break-word; }
.comment-time { color: #90949c; font-size: 11px; margin-top: 2px; }

.comment-form {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.comment-form input {
  flex: 1;
  border: 1px solid #bdc7d8;
  border-radius: 3px;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 12px;
}
.comment-form input:focus { outline: none; border-color: #3b5998; }

/* ---------- misc ---------- */

.loading, .empty {
  text-align: center;
  color: #90949c;
  padding: 40px 12px;
  background: #fff;
  border: 1px solid #ccd0d5;
  border-radius: 3px;
}

.pager { text-align: center; margin-top: 16px; }

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 18px;
  border-radius: 4px;
  font-size: 13px;
  z-index: 100;
  opacity: 0.95;
}
.toast.error { background: #d0021b; }

/* ---------- responsive ---------- */

@media (max-width: 700px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .post-body, .post-actions { padding-left: 0; }
  .comments { margin-left: 0; }
}
