/* ============================================================================
   PIONEER — PACK feature styles (Kudos + Squads)
   Navy #0a1628 / #0f1a2e / #16223c  +  Gold #c8a03c  +  white.
   No emoji — inline stroke SVG only. Minimal, reuses existing community theme.
   ========================================================================== */

/* ── KUDOS one-tap reaction (lives in .pc-actions next to like/comment) ───── */
.pc-action.kudos-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    color: inherit;
    transition: color .15s ease, transform .12s ease;
}
.pc-action.kudos-btn svg { display: block; }
.pc-action.kudos-btn:hover { color: #c8a03c; }
.pc-action.kudos-btn:active { transform: scale(.92); }
/* Active = the current user has given kudos */
.pc-action.kudos-btn.kudos-on { color: #c8a03c; }
.pc-action.kudos-btn.kudos-on svg { fill: rgba(200, 160, 60, 0.18); }
.pc-action.kudos-btn .kudos-count { font-variant-numeric: tabular-nums; }

/* Reaction pills (e.g. the gold flame) sit on the SAME line as a media thumbnail, not below it.
   Full-width media (video / expanded image) drops to its own row; reactions then wrap under it. */
.pc-media-reactions-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.25rem; }
.pc-media-reactions-row:empty { display: none; margin: 0; }
.pc-media-reactions-row > .pc-media-full,
.pc-media-reactions-row > .pc-media-video { flex-basis: 100%; }
.pc-media-reactions-row > .pc-reactions { margin: 0 !important; }

/* ── SQUADS panel (right sidebar of the community page) ───────────────── */
.sq-panel { margin-top: 1.25rem; }
.sq-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .5rem;
}
.sq-head .dc-right-label { margin: 0; }
.sq-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(200, 160, 60, 0.12);
    color: #c8a03c;
    border: 1px solid rgba(200, 160, 60, 0.35);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .02em;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.sq-new-btn:hover { background: rgba(200, 160, 60, 0.22); border-color: #c8a03c; }
.sq-new-btn svg { display: block; }

.sq-list { display: flex; flex-direction: column; gap: 6px; }
.sq-empty {
    font-size: .78rem;
    color: rgba(255, 255, 255, 0.45);
    padding: 6px 2px;
}

.sq-item {
    background: #16223c;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 10px;
    transition: border-color .15s ease, background .15s ease;
}
.sq-item:hover { border-color: rgba(200, 160, 60, 0.4); }
.sq-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.sq-item-name {
    font-size: .85rem;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sq-item-count {
    font-size: .7rem;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}
.sq-item-actions { display: flex; gap: 6px; margin-top: 6px; }
.sq-btn {
    flex: 1;
    font-size: .72rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.sq-btn-join {
    background: #c8a03c;
    color: #0a1628;
    border-color: #c8a03c;
}
.sq-btn-join:hover { background: #d8b04c; }
.sq-btn-leave {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.18);
}
.sq-btn-leave:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.sq-btn-members {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.12);
}
.sq-btn-members:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* Video "open in viewer" button — was an unstyled (blue) block sitting below the
   clip. Re-theme it as a subtle gold-on-navy overlay in the video's top-right. */
.pc-media-video { position: relative; }
.pc-media-video .pc-media-expand {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    background: rgba(13, 22, 41, 0.72);
    border: 1px solid rgba(200, 160, 60, 0.5);
    color: var(--gold, #c8a03c);
    cursor: pointer;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    transition: background 0.15s ease;
}
.pc-media-video .pc-media-expand:hover {
    background: rgba(200, 160, 60, 0.18);
}

/* Inline post media — shown full-width and visible by default (no tap-to-reveal
   chip). Images tap to open the fullscreen viewer; videos play in place. */
.pc-media-inline {
    position: relative;
    margin-top: 6px;
}
.pc-media-inline-img {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}
.pc-media-video .pc-media-inline-img {
    object-fit: contain;
    background: #000;
    max-height: 380px;
    cursor: default;
}
.pc-media-label--corner {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}

/* Per-squad member list (expands under an item) */
.sq-members {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.sq-member {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .78rem;
    color: rgba(255, 255, 255, 0.8);
}
.sq-member-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #0f1a2e;
    border: 1px solid rgba(200, 160, 60, 0.4);
    color: #c8a03c;
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.sq-member-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sq-members-empty { font-size: .74rem; color: rgba(255, 255, 255, 0.4); }

/* Inline "create squad" form */
.sq-create {
    margin-top: 6px;
    display: flex;
    gap: 6px;
}
.sq-create input {
    flex: 1;
    background: #0a1628;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    color: #fff;
    font-size: .8rem;
    padding: 6px 8px;
}
.sq-create input:focus { outline: none; border-color: #c8a03c; }
.sq-create button {
    background: #c8a03c;
    color: #0a1628;
    border: none;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 700;
    padding: 0 12px;
    cursor: pointer;
}
.sq-create button:hover { background: #d8b04c; }

/* ============================================================================
   Community composer: icon tool buttons (Photo / Video / Audio / GIF) — compact,
   square, centred. Icons inherit the button text colour.
   ============================================================================ */
.dc-ic-tool-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-width: 36px;
}
/* SVGs must not eat clicks meant for the button (the voice/record button stopped
   firing in the browser because the click landed on the <svg>, not the <button>). */
.dc-ic-tool-btn svg { display: block; pointer-events: none; }

/* ============================================================================
   Desktop (browser) community: posts as ONE continuous list of flat rows (divider
   lines) instead of separate floating bubbles. Mobile keeps its own card layout.
   ============================================================================ */
@media (min-width: 769px) {
    .dc-feed .post-card, .dc-main .post-card, #posts-feed .post-card {
        background: transparent !important;
        border: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        border-radius: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        padding: 0.7rem 1rem !important;
    }
    .dc-feed .post-card:hover, .dc-main .post-card:hover, #posts-feed .post-card:hover {
        background: rgba(255,255,255,0.025) !important;
    }
    .dc-main .pc-header, #posts-feed .pc-header { margin-bottom: 0.1rem !important; }
    /* Match the sidebar channel text (general / military = 0.82rem) — feed was bigger. */
    .dc-main .pc-name, #posts-feed .pc-name { font-size: 0.82rem !important; }
    .dc-main .pc-text, #posts-feed .pc-text { margin: 0.2rem 0 0 !important; font-size: 0.82rem !important; line-height: 1.45 !important; }
    .dc-main .pc-action, #posts-feed .pc-action,
    .dc-main .pc-action-label, #posts-feed .pc-action-label,
    .dc-main .like-btn span, #posts-feed .like-btn span { font-size: 0.8rem !important; }
    .dc-main .pc-time, #posts-feed .pc-time { font-size: 0.7rem !important; }
    .dc-main .pc-more-btn, #posts-feed .pc-more-btn { font-size: 0.54rem !important; padding: 1px 6px !important; }
    .dc-main .pc-avatar, #posts-feed .pc-avatar { width: 34px !important; height: 34px !important; }
    .dc-main .pc-reactions, #posts-feed .pc-reactions { margin-top: 0.35rem !important; }
    .dc-main .dc-inline-composer { padding: 0.5rem 0.75rem !important; }
    .dc-ic-tool-btn { padding: 0.4rem 0.5rem !important; }
}

/* Channel scope icons (padlock = private gym, globe = global). styles.css sizes the
   text version but not the SVG on desktop, so without this the icons render huge. */
.dc-channel-hash svg,
.dc-channel-scope svg { width: 13px; height: 13px; display: block; flex-shrink: 0; }
.dc-channel-hash { width: 16px; display: inline-flex; align-items: center; justify-content: center; }
.dc-channel-muted-ic svg { width: 12px; height: 12px; display: block; }

/* Channel ("general" + other groups) rows the same size/weight as DM (private
   message) rows — channels were font-weight 500 + slightly more padding, so they
   read as bigger. Match the DM item (0.82rem / weight 400 / 0.4rem padding). */
.dc-sidebar .dc-channel-item { font-size: 0.82rem !important; font-weight: 400 !important; padding: 0.4rem 0.6rem !important; }
.dc-sidebar .dc-channel-item.active { font-weight: 600 !important; }
.dc-sidebar .dc-channel-name { font-size: 0.82rem !important; }

/* Feed voice-note label: a small mic icon before "Voice note" (matches the composer). */
.pc-voice-note-label { display: inline-flex; align-items: center; gap: 5px; font-size: 0.78rem; }
.pc-voice-note-label .pc-voice-mic { width: 13px; height: 13px; flex-shrink: 0; }
/* Voice-note player: thinner (small play button + slim track) and wider (fills the
   post width — no narrow cap). */
.pc-voice-note .aud-play { width: 22px !important; height: 22px !important; }
.pc-voice-note .aud-play svg { width: 11px !important; height: 11px !important; }
.pc-voice-note .aud-track { height: 3px !important; }
.pc-voice-note .aud-time { font-size: 0.64rem !important; }
.pc-voice-note .aud { padding: 2px 12px 2px 4px !important; gap: 8px !important; }
.pc-voice-note { padding: 3px 8px !important; gap: 6px !important; max-width: none !important; width: 100%; }

/* App must fill the screen width — kill any horizontal-overflow buffer on the right. */
@media (max-width: 768px) {
    html, body { overflow-x: hidden !important; max-width: 100% !important; }
    #page-content, .main-content, .app-main, .page-content { max-width: 100% !important; }
}
/* Challenge header: wrap on narrow screens (so "Log today" isn't cut off) + no boxes
   around the Join / Log buttons (plain gold). */
.challenge-card-head { flex-wrap: wrap; gap: 0.5rem; }
.challenge-card-actions { flex-wrap: wrap; }
.btn-challenge-join, .btn-challenge-submit {
    background: transparent !important; border: none !important; box-shadow: none !important;
    color: var(--gold, #c8a03c) !important; padding: 0.3rem 0.5rem !important; font-weight: 700;
}
/* Chat media: no bubble/background around gifs, images, video. */
.pc-media-thumb, .pc-media-full { background: transparent !important; border: none !important; box-shadow: none !important; }
/* Voice note: thinner still. */
.pc-voice-note { background: transparent !important; border: none !important; padding: 0 !important; }
.pc-voice-note .aud { padding: 1px 10px 1px 2px !important; }
.pc-voice-note .aud-play { width: 18px !important; height: 18px !important; }
.pc-voice-note .aud-play svg { width: 10px !important; height: 10px !important; }

/* "X new posts" divider in the feed (where you left off). */
.dc-unread-divider { display: flex; align-items: center; gap: 10px; margin: 10px 4px; color: var(--gold, #c8a03c); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.dc-unread-divider::before, .dc-unread-divider::after { content: ""; flex: 1; height: 1px; background: rgba(200,160,60,0.4); }

/* ── Community sidebar polish ─────────────────────────────────────────────── */
/* Uniform name size across DMs, squads and channels. */
.dc-sidebar .dc-dm-item-name,
.dc-sidebar .dc-squad-item .dc-dm-item-name,
.dc-sidebar .dc-channel-name { font-size: 0.9rem !important; font-weight: 500 !important; }
/* No box around the + (new DM) or the squad "New" button — just the icon/text. */
.dc-new-dm-btn { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; }
.sq-panel .sq-new-btn { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0.1rem 0.3rem !important; }

/* ── Mobile community feed: smaller + more compact (more posts per screen) ─── */
@media (max-width: 768px) {
    .page-community .post-card { padding: 0.45rem 0.7rem !important; margin-bottom: 0.1rem !important; }
    .page-community .pc-text { font-size: 0.85rem !important; line-height: 1.3 !important; margin-top: 0.1rem !important; }
    .page-community .pc-avatar { width: 30px !important; height: 30px !important; }
    .page-community .pc-name { font-size: 0.82rem !important; }
    .page-community .pc-header { margin-bottom: 0.05rem !important; }
    .page-community .pc-reactions { margin-top: 0.2rem !important; }
    /* Compact the Like / Comment / Kudos row (it was spread too wide). */
    .page-community .pc-actions { gap: 0.85rem !important; margin-top: 0.1rem !important; }
    .page-community .pc-action, .page-community .pc-action-label, .page-community .pc-action-count { font-size: 0.74rem !important; }
    .page-community .pc-time { font-size: 0.66rem !important; }
    .page-community .pc-more-btn { font-size: 0.6rem !important; padding: 1px 6px !important; }
    /* Gold rank / military badge pushed to the far right of the header row, out of the way. */
    .page-community .pc-ranktags { margin-left: auto !important; display: inline-flex !important; align-items: center !important; gap: 4px !important; flex-shrink: 0 !important; }
    .page-community .pc-mil-tag { font-size: 0.54rem !important; padding: 1px 5px !important; }
}
