/* Community hub — chat + voice rooms (2026-10-05, Phases 2 & 3). */

.community-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; border-bottom: 2px solid #eee; }
.community-tab {
    background: none; border: none; padding: 0.6rem 1.1rem; font-weight: 600;
    color: #6c757d; border-bottom: 3px solid transparent; margin-bottom: -2px; cursor: pointer;
}
.community-tab.active { color: #0d6efd; border-bottom-color: #0d6efd; }

/* --- chat --- */
#community-chat { display: flex; gap: 1rem; min-height: 420px; }
.cc-channels { width: 220px; flex-shrink: 0; border-right: 1px solid #eee; padding-right: 0.75rem; }
.cc-channel {
    display: block; width: 100%; text-align: left; background: none; border: none;
    padding: 0.5rem 0.6rem; border-radius: 0.4rem; cursor: pointer; color: #333; font-size: 0.95rem;
}
.cc-channel:hover { background: #f5f5f5; }
.cc-channel.active { background: #e7f1ff; color: #0d6efd; font-weight: 600; }
.cc-hash { color: #999; margin-right: 0.25rem; }
.cc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cc-header { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0; border-bottom: 1px solid #eee; margin-bottom: 0.5rem; }
.cc-online { font-size: 0.85rem; color: #28a745; }
.cc-online-list { display: inline-flex; gap: 0.25rem; margin-left: 0.5rem; vertical-align: middle; }
.cc-online-user {
    width: 26px; height: 26px; border-radius: 50%; background: #28a745; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700;
}
#cc-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 0.5rem 0; }
.cc-message { display: flex; gap: 0.6rem; padding: 0.35rem 0; }
/* Durable outbox (2026-10-08): sending / failed-send affordances. */
.cc-message.cc-pending { opacity: 0.75; }
.cc-message .cc-sending { font-size: 0.75rem; color: #6c757d; }
.cc-message .cc-retry-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    font-size: 0.75rem; font-weight: 600; color: #c0392b;
}
.cc-avatar {
    width: 34px; height: 34px; border-radius: 50%; background: #6c757d; color: #fff; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.cc-meta { font-size: 0.85rem; }
.cc-text { font-size: 0.95rem; word-break: break-word; }
.cc-composer { display: flex; gap: 0.5rem; padding-top: 0.6rem; border-top: 1px solid #eee; }
.cc-composer input { flex: 1; }
.cc-join-cta { text-align: center; padding: 2rem; }

/* --- voice --- */
.cv-room .card-body { padding: 0.6rem 0.9rem; }
#cv-stage { border: 1px solid #eee; border-radius: 0.5rem; padding: 1rem; }
#cv-participants { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0; }
.cv-participant {
    width: 150px; border: 1px solid #eee; border-radius: 0.5rem; overflow: hidden;
    background: #111; color: #fff; position: relative; min-height: 110px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.cv-ptile-avatar {
    width: 52px; height: 52px; border-radius: 50%; background: #0d6efd;
    display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 700;
}
.cv-ptile-name { font-size: 0.8rem; padding: 0.3rem; text-align: center; }
.cv-ptile-media video.cv-video { width: 100%; max-height: 110px; object-fit: cover; }
.cv-controls { display: flex; gap: 0.5rem; flex-wrap: wrap; }

@media (max-width: 768px) {
    #community-chat { flex-direction: column; }
    .cc-channels { width: 100%; border-right: none; border-bottom: 1px solid #eee; padding-bottom: 0.5rem; display: flex; overflow-x: auto; }
    .cc-channel { white-space: nowrap; }
}
