/* Trashtok Community — feed, climate journal, hazard reports, drainage
   watch, petitions. Shares tokens/spacing feel with trashtok.css. */

.tc-header {
  display:flex; align-items:center; gap:14px; padding:16px 20px;
  background:#0f3a3f; color:#fff; position:sticky; top:0; z-index:10;
}
.tc-header .logo { display:flex; align-items:center; }
.tc-header .brand-logo-img { height:56px; width:auto; background:#fff; border-radius:10px; padding:4px 8px; }
.tc-header h1 { font-size:1.05rem; margin:0; }
.tc-header .tc-subtitle { font-size:.75rem; opacity:.75; margin:2px 0 0; }

.tc-tabs {
  display:flex; overflow-x:auto; gap:4px; padding:10px 12px;
  background:#fff; border-bottom:1px solid #e5e7eb; position:sticky; top:76px; z-index:9;
}
.tc-tab {
  flex:0 0 auto; padding:9px 14px; border-radius:999px; border:1px solid #e5e7eb;
  background:#f5f7f6; color:#374151; font-size:.85rem; font-weight:600; cursor:pointer; white-space:nowrap;
}
.tc-tab.active { background:#0f3a3f; border-color:#0f3a3f; color:#fff; }

.tc-wrap { max-width:640px; margin:0 auto; padding:16px 16px 80px; }
.tc-panel { display:none; }
.tc-panel.active { display:block; }

.tc-identity-bar {
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:#f0fdf4; border:1px solid #bbf7d0; border-radius:12px;
  padding:10px 14px; margin-bottom:14px; font-size:.85rem; color:#15803d;
}
.tc-identity-bar button {
  background:none; border:none; color:#0f766e; font-weight:700; cursor:pointer; font-size:.82rem;
}

/* Composer */
.tc-composer {
  background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:14px; margin-bottom:16px;
}
.tc-composer textarea, .tc-composer input, .tc-composer select {
  width:100%; box-sizing:border-box; padding:10px; border-radius:10px; border:1px solid #ddd;
  font-size:.95rem; font-family:inherit; margin-top:8px;
}
.tc-composer-row { display:flex; gap:8px; align-items:center; margin-top:10px; }
.tc-composer-row select { flex:0 0 auto; width:auto; margin-top:0; }
.tc-btn {
  border:none; border-radius:10px; padding:10px 16px; font-weight:700; cursor:pointer; font-size:.9rem;
}
.tc-btn-primary { background:#22c55e; color:#fff; }
.tc-btn-primary:hover { background:#16a34a; }
.tc-btn-primary:disabled { opacity:.6; cursor:not-allowed; }
.tc-btn-ghost { background:#f5f7f6; color:#374151; }
.tc-btn-gold { background:#eab308; color:#3f2d00; }
.tc-btn-gold:hover { background:#ca8a04; }
.tc-btn-danger-ghost { background:#fef2f2; color:#991b1b; }

/* Post cards */
.tc-post { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:14px; margin-bottom:12px; }
.tc-post-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.tc-post-badge {
  font-size:.68rem; font-weight:800; text-transform:uppercase; letter-spacing:.03em;
  padding:3px 8px; border-radius:999px; background:#e0f2fe; color:#075985;
}
.tc-post-badge.alert { background:#fee2e2; color:#991b1b; }
.tc-post-badge.system { background:#0f3a3f; color:#fff; }
.tc-post-meta { font-size:.75rem; color:#9ca3af; }
.tc-post-title { font-weight:700; margin:4px 0 2px; font-size:.98rem; }
.tc-post-body { font-size:.9rem; color:#374151; white-space:pre-wrap; }
.tc-post-tags { margin-top:8px; display:flex; gap:6px; flex-wrap:wrap; }
.tc-tag { font-size:.72rem; background:#f5f7f6; color:#6b7280; padding:3px 8px; border-radius:999px; }
.tc-post-actions { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.tc-post-actions button {
  border:none; background:#f5f7f6; color:#374151; padding:7px 12px; border-radius:999px;
  font-size:.8rem; font-weight:600; cursor:pointer;
}
.tc-post-actions button.liked { background:#fee2e2; color:#991b1b; }
.tc-tokens-pill { font-size:.78rem; font-weight:700; color:#92600a; background:#fef9c3; padding:5px 10px; border-radius:999px; }

.tc-comments { margin-top:10px; border-top:1px dashed #e5e7eb; padding-top:8px; }
.tc-comment { font-size:.85rem; padding:6px 0; border-bottom:1px solid #f3f4f6; }
.tc-comment b { color:#0f3a3f; }
.tc-comment-input-row { display:flex; gap:6px; margin-top:8px; align-items:center; flex-wrap:wrap; }
.tc-comment-input-row input { flex:1 1 140px; padding:8px 10px; border-radius:8px; border:1px solid #ddd; }
.tc-comment-input-row [data-action="comment-photo"],
.tc-comment-input-row [data-action="comment-location"] { flex:0 0 auto; padding:8px 10px; font-size:1rem; }

/* Photo attachments — composer + comment picker preview */
.tc-img-preview { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.tc-img-preview:empty { display:none; }
.tc-img-thumb { position:relative; width:64px; height:64px; border-radius:10px; overflow:hidden; }
.tc-img-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.tc-img-thumb button {
  position:absolute; top:2px; right:2px; width:18px; height:18px; border-radius:50%;
  border:none; background:rgba(0,0,0,.65); color:#fff; font-size:.65rem; line-height:1; cursor:pointer;
}

.tc-post-images {
  display:grid; grid-template-columns:repeat(auto-fill, minmax(90px, 1fr)); gap:6px; margin-top:8px;
}
.tc-post-images-img { width:100%; aspect-ratio:1; object-fit:cover; border-radius:10px; cursor:pointer; }

.tc-comment-images {
  display:flex; gap:6px; flex-wrap:wrap; margin-top:6px;
}
.tc-comment-images-img { width:52px; height:52px; object-fit:cover; border-radius:8px; cursor:pointer; }

/* Location attachments */
.tc-location-chip {
  display:inline-flex; align-items:center; gap:6px; font-size:.78rem; color:#0f3a3f;
  background:#f0fdf4; border:1px solid #bbf7d0; padding:5px 10px; border-radius:999px; margin-top:8px;
}
.tc-location-chip button {
  border:none; background:rgba(0,0,0,.1); color:#166534; width:16px; height:16px; border-radius:50%;
  font-size:.6rem; line-height:1; cursor:pointer;
}
.tc-location-line {
  display:inline-block; margin-top:8px; font-size:.8rem; color:#0f766e; text-decoration:none;
}
.tc-location-line:hover { text-decoration:underline; }

.tc-empty { text-align:center; color:#9ca3af; padding:40px 10px; font-size:.9rem; }

/* Journal */
.tc-news-card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:14px; margin-bottom:12px; border-left:4px solid #0f766e; }
.tc-news-card.warning { border-left-color:#eab308; }
.tc-news-card.critical { border-left-color:#dc2626; }
.tc-news-head { display:flex; justify-content:space-between; font-size:.72rem; color:#9ca3af; text-transform:uppercase; letter-spacing:.03em; }
.tc-news-headline { font-weight:700; margin:4px 0; }
.tc-news-summary { font-size:.88rem; color:#374151; }
.tc-news-link { font-size:.8rem; }

.tc-subscribe-box { background:#f0fdf4; border:1px solid #bbf7d0; border-radius:14px; padding:16px; margin-bottom:18px; }
.tc-subscribe-box h3 { margin:0 0 6px; font-size:.98rem; color:#15803d; }
.tc-subscribe-box p { margin:0 0 10px; font-size:.82rem; color:#166534; }
.tc-topic-chips { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
.tc-topic-chip { padding:7px 12px; border-radius:999px; border:1px solid #bbf7d0; background:#fff; font-size:.8rem; cursor:pointer; }
.tc-topic-chip.selected { background:#22c55e; color:#fff; border-color:#22c55e; }

/* Drainage cameras */
.tc-camera-card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:14px; margin-bottom:12px; display:flex; gap:12px; align-items:center; }
.tc-camera-dot { width:12px; height:12px; border-radius:50%; flex:0 0 auto; background:#22c55e; }
.tc-camera-dot.warning { background:#eab308; }
.tc-camera-dot.critical { background:#dc2626; }
.tc-camera-info b { display:block; font-size:.92rem; }
.tc-camera-info span { font-size:.8rem; color:#6b7280; }

/* Petitions */
.tc-petition-card { background:#fff; border:1px solid #e5e7eb; border-radius:14px; padding:14px; margin-bottom:12px; }
.tc-vote-row { display:flex; gap:10px; margin-top:10px; align-items:center; }
.tc-vote-row button { border:1px solid #e5e7eb; background:#fff; border-radius:999px; padding:6px 14px; font-size:.82rem; cursor:pointer; }
.tc-lawyer-card { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:12px 14px; margin-bottom:8px; font-size:.88rem; }

/* Report a hazard */
.tc-report-form label { display:block; font-size:.85rem; font-weight:600; color:#374151; margin-bottom:14px; }
.tc-report-form input, .tc-report-form select, .tc-report-form textarea {
  width:100%; box-sizing:border-box; margin-top:6px; padding:11px; border-radius:10px; border:1px solid #ddd; font-family:inherit; font-size:1rem;
}
.tc-report-form textarea { min-height:70px; resize:vertical; }

.tc-modal-backdrop {
  position:fixed; inset:0; background:rgba(0,0,0,.55); display:none;
  align-items:center; justify-content:center; padding:20px; z-index:999;
}
.tc-modal-backdrop.active { display:flex; }
.tc-modal-card { width:100%; max-width:400px; background:#fff; border-radius:16px; padding:22px; }
.tc-modal-card h3 { margin-top:0; }
.tc-modal-card input, .tc-modal-card select { width:100%; box-sizing:border-box; padding:10px; border-radius:10px; border:1px solid #ddd; margin-top:10px; font-size:1rem; }
.tc-modal-actions { display:flex; gap:8px; margin-top:16px; }
.tc-hint { font-size:.78rem; color:#9ca3af; margin-top:6px; }
.tc-toast {
  position:fixed; bottom:20px; left:50%; transform:translateX(-50%);
  background:#0f3a3f; color:#fff; padding:10px 18px; border-radius:999px; font-size:.85rem;
  z-index:1000; opacity:0; pointer-events:none; transition:opacity .25s;
}
.tc-toast.show { opacity:1; }

.tc-extlink { display:flex; gap:10px; align-items:center; margin:8px 0; padding:10px 12px; border:1px solid #d1d5db; border-radius:10px; background:#f9fafb; color:#0f3a3f; font-weight:600; font-size:.9rem; text-decoration:none; }

.tc-extlink img { width:72px; height:72px; object-fit:cover; border-radius:8px; flex:none; background:#e5e7eb; }
.tc-xacts { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0; }
.tc-xacts button { border:1px solid #d1d5db; background:#fff; border-radius:999px; padding:6px 10px; font-size:.78rem; font-weight:600; color:#0f3a3f; cursor:pointer; }
.tc-cats { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.tc-cat { font-size:.72rem; padding:2px 8px; border-radius:999px; background:#ecfdf5; color:#047857; font-weight:600; }
.tc-chips { display:flex; gap:8px; overflow-x:auto; padding:2px 0 12px; scrollbar-width:none; }
.tc-chip { flex:none; border:1px solid #d1d5db; background:#fff; border-radius:999px; padding:7px 14px; font-size:.85rem; font-weight:600; color:#374151; cursor:pointer; }
.tc-chip.active { background:#0f3a3f; border-color:#0f3a3f; color:#fff; }
.tc-eco { background:#f0fdf4; border:1px solid #bbf7d0; color:#14532d; border-radius:12px; padding:10px 14px; font-size:.9rem; margin-bottom:12px; }
.tc-eco-hint { display:block; font-size:.74rem; color:#4b7a5c; margin-top:2px; }
.tc-watch { display:block; width:100%; margin:6px 0; border:0; border-radius:10px; padding:11px; background:#0f3a3f; color:#fff; font-weight:700; font-size:.92rem; cursor:pointer; }
.tc-watch-close { background:#e5e7eb; color:#374151; }
.tc-embed { margin:8px auto; border-radius:12px; overflow:hidden; background:#000; }
.tc-embed iframe { width:100%; height:100%; border:0; display:block; }
.tc-embed.tall { height:640px; max-width:380px; }
.tc-embed.wide { aspect-ratio:16/9; }
.tc-embed.mid { height:480px; max-width:520px; }
