/* posts.css — X-style status feed (composer + cards) */

/* ===== Composer ===== */
.bb-composer {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 18px;
}
.bb-composer-input {
  width: 100%; min-height: 80px; resize: vertical;
  background: transparent;
  border: none; color: var(--text);
  font-family: inherit; font-size: 15px;
  padding: 0 0 8px 0;
  outline: none;
}
.bb-composer-input::placeholder { color: var(--muted); }
.bb-composer-attached {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.bb-attached-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,170,0,0.10);
  border: 1px solid rgba(255,170,0,0.35);
  color: var(--amber);
  border-radius: 16px;
  padding: 5px 10px;
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 700;
}
.bb-attached-pill button {
  background: transparent; border: none; color: var(--amber);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 0; margin-left: 4px;
}
.bb-composer-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.bb-composer-tools { display: flex; gap: 4px; }
.bb-composer-tool {
  background: transparent; border: none; cursor: pointer;
  font-size: 18px; padding: 6px 10px;
  border-radius: 6px;
  transition: background .15s;
}
.bb-composer-tool:hover { background: rgba(255,170,0,0.1); }
.bb-composer-meta { display: flex; gap: 14px; align-items: center; }
.bb-composer-count { color: var(--muted); font-size: 12px; }
.bb-composer-post {
  background: var(--amber); color: #000;
  border: none; padding: 8px 22px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 900;
  font-size: 13px; letter-spacing: 0.5px;
  cursor: pointer; transition: opacity .15s;
}
.bb-composer-post:disabled { opacity: 0.45; cursor: not-allowed; }
.bb-composer-post:hover:not(:disabled) { opacity: 0.9; }

.bb-post-signin {
  background: rgba(255,255,255,0.03);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 22px;
  text-align: center;
  margin-bottom: 18px;
}

/* ===== Post card ===== */
.bb-post {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}
.bb-post-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  overflow: hidden;
  background: rgba(255,170,0,0.12);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber); font-family: var(--font-display); font-weight: 900;
  font-size: 18px;
  text-decoration: none;
  flex-shrink: 0;
}
.bb-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bb-post-head {
  display: flex; align-items: baseline; gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.bb-post-name {
  font-family: var(--font-display); font-weight: 900;
  color: var(--text); text-decoration: none;
  font-size: 15px;
}
.bb-post-name:hover { color: var(--amber); }
.bb-post-verified { color: #1da1f2; font-size: 13px; }
.bb-post-handle { color: var(--muted); font-size: 13px; }
.bb-post-time { color: var(--muted); font-size: 12px; }
.bb-post-text {
  color: var(--text); font-size: 15px; line-height: 1.45;
  word-wrap: break-word;
}
.bb-post-text a { color: var(--amber); text-decoration: none; }
.bb-post-text a:hover { text-decoration: underline; }
.bb-post-mention { color: var(--amber); font-weight: 600; }
.bb-post-img {
  width: 100%; max-height: 480px; object-fit: cover;
  border-radius: 10px;
  margin-top: 10px;
  border: 1px solid var(--border);
}

/* ===== Attached ticket pill (inside a post) ===== */
.bb-post-ticket {
  display: block;
  background: rgba(255,170,0,0.05);
  border: 1px solid rgba(255,170,0,0.3);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 10px;
  text-decoration: none;
  color: var(--text);
  transition: background .15s, border-color .15s;
}
.bb-post-ticket:hover {
  background: rgba(255,170,0,0.10);
  border-color: rgba(255,170,0,0.5);
}
.bb-post-ticket.won  { border-color: rgba(40,214,112,0.45); background: rgba(40,214,112,0.06); }
.bb-post-ticket.lost { border-color: rgba(255,80,80,0.4);   background: rgba(255,80,80,0.05); }
.bb-post-ticket-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px;
}
.bb-post-ticket-row + .bb-post-ticket-row { margin-top: 4px; }
.bb-post-ticket-legs {
  font-family: var(--font-display); font-weight: 900;
  color: var(--text); font-size: 13px;
}
.bb-post-ticket-sport, .bb-post-ticket-stake { color: var(--muted); font-size: 11px; }
.bb-post-ticket-status {
  font-family: var(--font-display); font-weight: 900;
  font-size: 10px;
  padding: 2px 8px; border-radius: 4px;
  letter-spacing: 1px;
}
.bb-post-ticket-status.won  { background: var(--green); color: #000; }
.bb-post-ticket-status.lost { background: #ff5050; color: #000; }
.bb-post-ticket-status.open { background: rgba(255,170,0,0.18); color: var(--amber); }

/* ===== Reaction rail ===== */
.bb-post-actions {
  display: flex; align-items: center; gap: 14px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.bb-post-reactions { display: flex; gap: 4px; }
.bb-post-rx {
  background: transparent; border: 1px solid transparent;
  cursor: pointer; padding: 4px 8px;
  border-radius: 6px;
  font-size: 16px; line-height: 1;
  transition: background .12s, border-color .12s, transform .15s;
}
.bb-post-rx:hover { background: rgba(255,170,0,0.10); border-color: rgba(255,170,0,0.25); }
.bb-post-rx.pulsed { transform: scale(1.35); }
.bb-post-stat { color: var(--muted); font-size: 11px; }
.bb-post-reply-btn {
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; font-size: 12px; padding: 4px 6px;
  border-radius: 6px;
}
.bb-post-reply-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.bb-post-delete {
  margin-left: auto;
  background: transparent; border: none; color: var(--muted);
  cursor: pointer; font-size: 18px; line-height: 1; padding: 0 6px;
  border-radius: 4px;
}
.bb-post-delete:hover { color: #ff5050; background: rgba(255,80,80,0.08); }

/* ===== Replies panel ===== */
.bb-post-replies {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.18);
  border-radius: 8px;
}
.bb-reply {
  display: flex; gap: 8px; align-items: baseline;
  font-size: 13px; padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bb-reply:last-child { border-bottom: none; }
.bb-reply-handle { color: var(--amber); text-decoration: none; font-weight: 600; }
.bb-reply-body { color: var(--text); flex: 1; }
.bb-reply-time { color: var(--muted); font-size: 11px; }
.bb-reply-composer {
  display: flex; gap: 8px; margin-top: 10px;
}
.bb-reply-composer input {
  flex: 1; background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); color: var(--text);
  padding: 7px 10px; border-radius: 6px;
  font-size: 13px;
}
.bb-reply-composer button {
  background: var(--amber); color: #000;
  border: none; padding: 7px 14px; border-radius: 6px;
  font-family: var(--font-display); font-weight: 800;
  font-size: 12px; cursor: pointer;
}

/* ===== Ticket picker modal ===== */
.bb-ticket-picker-modal {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.bb-ticket-picker {
  background: #131210;
  border: 1px solid var(--amber);
  border-radius: 12px;
  padding: 20px;
  max-width: 500px; width: 100%;
  max-height: 85vh; overflow-y: auto;
}
.bb-ticket-picker h3 {
  margin: 0 0 14px 0;
  font-family: var(--font-display); font-size: 16px;
}
.bb-ticket-picker-list { display: flex; flex-direction: column; gap: 6px; }
.bb-ticket-pick {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer; color: var(--text);
  transition: background .12s;
}
.bb-ticket-pick:hover { background: rgba(255,170,0,0.08); border-color: rgba(255,170,0,0.4); }
.bb-ticket-pick .muted { font-size: 11px; }
.bb-ticket-picker-cancel {
  margin-top: 14px; width: 100%;
  background: transparent; border: 1px solid var(--border); color: var(--text);
  padding: 10px; border-radius: 6px; cursor: pointer;
}

/* ===== Mobile (≤600px) ===== */
@media (max-width: 600px) {
  /* Composer — tighter padding so it doesn't crowd the screen */
  .bb-composer { padding: 12px; }
  .bb-composer-input { font-size: 15px; min-height: 64px; }
  .bb-composer-tool { font-size: 17px; padding: 6px 9px; }
  .bb-composer-post { padding: 8px 18px; font-size: 12px; }
  .bb-composer-count { font-size: 11px; }
  .bb-attached-pill { font-size: 11px; padding: 4px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Post cards */
  .bb-post { grid-template-columns: 40px 1fr; padding: 12px; gap: 10px; }
  .bb-post-avatar { width: 36px; height: 36px; font-size: 15px; }
  .bb-post-name { font-size: 14px; }
  .bb-post-handle, .bb-post-time { font-size: 12px; }
  .bb-post-text { font-size: 14px; }
  .bb-post-img { max-height: 320px; }

  /* Actions — let them wrap so they don't push the delete x offscreen */
  .bb-post-actions { gap: 8px; flex-wrap: wrap; }
  .bb-post-stat { font-size: 10px; }
  .bb-post-reply-btn { font-size: 11px; }
  .bb-post-rx { padding: 4px 7px; font-size: 15px; }
  .bb-post-delete { margin-left: 4px; }

  /* Ticket picker modal — full-screen on phones */
  .bb-ticket-picker { max-width: 100%; padding: 16px; max-height: 95vh; }
  .bb-ticket-picker h3 { font-size: 14px; }
  .bb-ticket-pick { padding: 9px 10px; font-size: 13px; }
}

/* Very narrow phones */
@media (max-width: 380px) {
  .bb-post-reactions { flex-wrap: wrap; }
}
