/* Forum-specific styles. Loaded on top of ../style.css */

.forum-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  min-height: 70vh;
}

.forum-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.forum-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.forum-head .btn { margin-top: 0.5rem; }

.crumb { margin-bottom: 1rem; }
.crumb a { color: var(--ink-dim); text-decoration: none; font-size: 0.9rem; }
.crumb a:hover { color: var(--ink); }

/* ---------- topic list ---------- */

.topic-list { display: flex; flex-direction: column; gap: 0.6rem; }

.topic-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 0.9rem 1.1rem;
  text-decoration: none;
  transition: border-color 0.15s;
}

.topic-row:hover { border-color: var(--ink-dim); }

.topic-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }

.topic-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-meta { color: var(--ink-dim); font-size: 0.8rem; }

.topic-replies {
  color: var(--ink-dim);
  font-size: 0.9rem;
  text-align: right;
  white-space: nowrap;
}

/* ---------- avatars ---------- */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid;
  background: #0b0a0a;
  font-size: 0.7rem;
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
}

.avatar-lg { width: 3.2rem; height: 3.2rem; font-size: 0.85rem; }

/* ---------- posts ---------- */

.post-list { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 2.5rem; }

.post {
  display: flex;
  gap: 1.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  padding: 1.25rem;
}

.post-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 6.5rem;
  flex-shrink: 0;
  text-align: center;
}

.post-author { font-size: 0.85rem; font-weight: 600; word-break: break-word; }
.post-author small { color: var(--ink-dim); font-weight: 400; }

.post-content { flex: 1; min-width: 0; }

.post-meta {
  display: flex;
  justify-content: space-between;
  color: var(--ink-dim);
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}

.post-body { overflow-wrap: break-word; }

.topic-page-title { font-size: clamp(1.5rem, 4vw, 2.2rem); }

/* ---------- forms ---------- */

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 420px;
  margin-top: 1.5rem;
}

.stack-form-wide { max-width: 100%; }

.stack-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
}

.stack-form input[type="text"],
.stack-form input[type="email"],
.stack-form input[type="password"],
.stack-form textarea {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
}

.stack-form input:focus, .stack-form textarea:focus {
  outline: none;
  border-color: var(--ink-dim);
}

.stack-form .btn { align-self: flex-start; cursor: pointer; background: none; font-family: var(--font-body); }

.form-note { color: var(--ink-dim); font-size: 0.85rem; text-transform: none; letter-spacing: 0; }

.reply-form { margin-top: 1rem; }

/* icon / color pickers */

.picker {
  border: 1px solid var(--line);
  padding: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.picker legend {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
  padding: 0 0.4rem;
}

.pick input { position: absolute; opacity: 0; }

.pick-face, .pick-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 2.4rem;
  border: 1px solid var(--line);
  background: #0b0a0a;
  font-size: 0.75rem;
  cursor: pointer;
}

.pick input:checked + .pick-face,
.pick input:checked + .pick-swatch { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

/* ---------- bits ---------- */

.inline-form { display: inline; }

.linklike {
  background: none;
  border: none;
  color: var(--ink-dim);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav-links .linklike { margin-left: 1.5rem; }
.linklike:hover { color: var(--ink); }
.linklike.danger:hover { color: #bc8f8f; }

.admin-actions { display: flex; gap: 1.25rem; align-items: center; margin-top: 0.8rem; }

.errors {
  border: 1px solid #bc8f8f;
  color: #d8b3b3;
  padding: 0.9rem 1.1rem 0.9rem 2.2rem;
  margin: 1rem 0;
}

.saved-note {
  border: 1px solid #5a7a5a;
  color: #8fbc8f;
  padding: 0.9rem 1.1rem;
  margin: 1rem 0;
}

@media (max-width: 600px) {
  .post { flex-direction: column; gap: 0.8rem; }
  .post-side { flex-direction: row; width: auto; }
  .nav-links .linklike { margin-left: 1rem; font-size: 0.8rem; }
}
