/* Community, cleaner and more real (community-clean.js, eventme-africa.js, community-plus.js).
   Nothing here adds effects: it takes away what looked like a demo. */

/* opened from a /community link: the page shows at once, without fading in over the home page */
html.boot-comm #communityPage { display: block !important; animation: none !important; }
html.boot-comm body { overflow: hidden; }
#communityPage.cc-noanim { animation: none !important; }

/* photos in posts open on click: no "Click to view" chip on every picture */
#communityPage .fpost .img-hint, #communityPage .cpx-gal-item .img-hint, #profPostsFeed .fpost .img-hint { display: none !important; }
#communityPage .fpost img.fpost-image-expand, #communityPage .cpx-gal-item img { cursor: zoom-in; }

/* the member's account type stays, quietly: no glow, no gradient */
#communityPage .fpost .fpost-name-badge .acct-badge:not(.acct-badge-official) {
  background: rgba(255,255,255,.06) !important; border: 1px solid rgba(255,255,255,.1) !important; box-shadow: none !important;
  color: var(--text-2, rgba(255,255,255,.75)) !important; font-weight: 600; letter-spacing: .02em;
}
#communityPage .fpost .fpost-name-badge .acct-badge:not(.acct-badge-official)::before { display: none !important; }
[data-theme="light"] #communityPage .fpost .fpost-name-badge .acct-badge:not(.acct-badge-official) { background: rgba(0,0,0,.04) !important; border-color: rgba(0,0,0,.1) !important; color: #444 !important; }

/* links in a post: a short address, clickable */
.fpost-url { color: #ff6b84; text-decoration: none; font-weight: 600; word-break: break-all; }
.fpost-url:hover { text-decoration: underline; }
[data-theme="light"] .fpost-url { color: #c8102e; }

/* one tap way in to comment */
.fpost-quick-cmt { display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 2px 16px 14px; padding: 8px 14px 8px 8px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.035); color: var(--muted, rgba(255,255,255,.55)); font: 500 .84rem/1.2 var(--font-body, Inter, sans-serif); text-align: left; cursor: text; }
.fpost-quick-cmt:hover { border-color: rgba(255,255,255,.2); color: var(--text-2, rgba(255,255,255,.8)); }
.fpost-quick-av { flex: none; width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; overflow: hidden; color: #fff; font-size: .66rem; font-weight: 700; }
.fpost-quick-av img { width: 100%; height: 100%; object-fit: cover; }
[data-theme="light"] .fpost-quick-cmt { background: rgba(0,0,0,.025); border-color: rgba(0,0,0,.1); color: #666; }

/* the best answer, pinned by the post's author */
.fcomm-pinned { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 4px; font-size: .68rem; font-weight: 700; letter-spacing: .03em; color: #f0b44c; }
.fcomm-row.fcomm-is-pinned > .fcomm-right-col > .fcomm-bubble { border: 1px solid rgba(240,180,76,.35); }
.fcomm-pin-btn { border: 0; background: transparent; color: var(--muted, rgba(255,255,255,.55)); font: 600 .72rem/1 var(--font-body, Inter, sans-serif); padding: 2px 4px; cursor: pointer; }
.fcomm-pin-btn:hover, .fcomm-pin-btn.on { color: #f0b44c; }

/* just added on EventMe: real events and profiles that went live, inside the feed */
.cc-act { position: relative; margin: 0 0 16px; padding: 14px 0 14px 16px; border-radius: 16px; border: 1px solid rgba(255,255,255,.08); background: var(--card, #1d1a1c); }
/* rows of cards that slide sideways (community-clean.js): arrows and soft edges on a computer only */
.cc-slide { position: relative; }
.cc-nav { position: absolute; top: calc(var(--cc-top, 50px) + var(--cc-h, 120px) / 2); transform: translateY(-50%); z-index: 3; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; padding: 0;
  border: 1px solid rgba(255,255,255,.18); background: rgba(20,16,18,.9); color: #fff; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.45); transition: background .15s ease, border-color .15s ease; }
.cc-nav:hover { background: #c8102e; border-color: #c8102e; }
.cc-nav:active { transform: translateY(-50%) scale(.94); }
.cc-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.cc-nav[hidden] { display: none; }
.cc-nav.prev { left: 8px; } .cc-nav.next { right: 8px; }
.cc-fade { position: absolute; top: var(--cc-top, 50px); height: var(--cc-h, 120px); width: 44px; pointer-events: none; z-index: 2; opacity: 0; transition: opacity .2s ease; }
.cc-fade.l { left: 0; background: linear-gradient(90deg, var(--card, #1d1a1c), transparent); }
.cc-fade.r { right: 0; background: linear-gradient(270deg, var(--card, #1d1a1c), transparent); }
.cc-slide.more-left > .cc-fade.l, .cc-slide.more-right > .cc-fade.r { opacity: 1; }
[data-theme="light"] .cc-fade.l { background: linear-gradient(90deg, #fff, transparent); }
[data-theme="light"] .cc-fade.r { background: linear-gradient(270deg, #fff, transparent); }
[data-theme="light"] .cc-nav { background: #fff; color: #222; border-color: rgba(0,0,0,.12); box-shadow: 0 4px 14px rgba(0,0,0,.15); }
/* phones and tablets swipe: no arrows, no edges */
@media (hover: none), (max-width: 600px) { .cc-nav, .cc-fade { display: none !important; } }
.cc-act-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-right: 16px; margin-bottom: 10px; }
.cc-act-h b { font-size: .92rem; }
.cc-act-h small { font-size: .74rem; color: var(--muted, rgba(255,255,255,.5)); }
.cc-act-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-right: 16px; scroll-snap-type: x proximity; }
.cc-act-row::-webkit-scrollbar { display: none; }
.cc-act-it { flex: 0 0 168px; scroll-snap-align: start; display: flex; flex-direction: column; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03); color: inherit; text-align: left; padding: 0; cursor: pointer; font: inherit; }
.cc-act-it:hover { border-color: rgba(255,84,112,.4); }
.cc-act-img { aspect-ratio: 16/10; background: rgba(255,255,255,.05) center/cover no-repeat; position: relative; }
.cc-act-it.talent .cc-act-img { aspect-ratio: 16/10; display: grid; place-items: center; background: linear-gradient(180deg, rgba(200,16,46,.16), rgba(255,255,255,.02)); }
.cc-act-av { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.08) center/cover no-repeat; border: 2px solid rgba(255,255,255,.15); display: grid; place-items: center; font-weight: 800; color: #fff; }
.cc-act-tag { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: .64rem; font-weight: 700; letter-spacing: .03em; }
.cc-act-it.talent .cc-act-tag { background: rgba(0,0,0,.45); }
.cc-act-b { padding: 9px 10px 10px; display: grid; gap: 3px; }
.cc-act-b b { font-size: .8rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-act-b small { font-size: .7rem; color: var(--muted, rgba(255,255,255,.55)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
[data-theme="light"] .cc-act { background: #fff; border-color: rgba(0,0,0,.08); }
[data-theme="light"] .cc-act-it { background: #fafafa; border-color: rgba(0,0,0,.08); }

/* phones: the view tabs scroll with a soft edge instead of a cut word, and sort says what it does */
@media (max-width: 600px) {
  #communityPage.cv2 .cv2-bar #cpxTabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent) !important; mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent) !important; padding-right: 24px !important; }
  #communityPage.cv2 .cv2-bar .comm-sort-toggle svg, #communityPage.cv2 .cv2-bar .comm-sort-toggle i { display: none !important; }
  #communityPage.cv2 .cv2-bar .comm-sort-toggle #commSortLabel { display: inline !important; font-size: .78rem; font-weight: 650; }
  #communityPage.cv2 .cv2-bar .comm-sort-toggle { width: auto !important; min-width: 0 !important; padding: 0 12px !important; }
  .cc-act-h { flex-direction: column; align-items: flex-start; gap: 2px; }
  .fpost-quick-cmt { width: calc(100% - 24px); margin: 2px 12px 12px; }
  .cc-act-it { flex-basis: 150px; }
}
@media (prefers-reduced-motion: reduce) { .cc-act-row { scroll-behavior: auto; } }

/* Past events across the continent: the whole tile is the event, no "Click to view" chip on the picture */
.media-tile .img-hint { display: none !important; }
.media-tile .media-tile-img { cursor: pointer; }
.media-tile-event .media-tile-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.media-tile-going { color: var(--text-2, rgba(255,255,255,.75)); font-weight: 600; }
/* the label on the picture shows in full ("Ended · 5 photos"), and hovering a tile no longer lifts it out of line */
.media-tile .media-tile-type { white-space: nowrap; max-width: none !important; width: auto !important; z-index: 3; }
.media-tile:hover { transform: none !important; }
.media-tile:hover .media-tile-img img, .media-tile:hover .media-tile-img video { transform: scale(1.03) !important; }

/* Photo and video viewer (#mediaLightbox): the page behind stays dark instead of showing through,
   and Like, Comment, Share always fit side by side on a phone */
.mlb-overlay { background: rgba(8,6,7,.97) !important; }
.mlb-actions { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.mlb-actions .mlb-btn { min-width: 0 !important; width: 100% !important; justify-content: center; overflow: hidden; }
@media (max-width: 480px) {
  .mlb-overlay { padding: 64px 12px 12px !important; }
  .mlb-actions .mlb-btn { height: 42px !important; padding: 0 8px !important; gap: 5px !important; font-size: .82rem !important; }
  .mlb-actions .mlb-btn svg, .mlb-actions .mlb-btn i { width: 16px !important; height: 16px !important; font-size: 16px !important; flex: none; }
  .mlb-content-box { padding: 12px 14px !important; }
}

/* visitors: the feed already opens with "New on EventMe", so the sidebar does not list the same people again */
#communityPage:has(#cmpStrip.cmp-strip-new:not([hidden])) #cmpNew { display: none !important; }
