/* COMMUNITIES IN MY NETWORK - the community Follow button (theme_includes/network/community_follow.php: the
 * Townsquare directory cards and each community's own home header) and My Network's Communities area
 * (network/communities.php: the lists and a community opened in place with its members).
 * Behaviour: themes/shared/js/follow.js, themes/shared/js/network-communities.js.
 * Colours from the page's variables (--site_color_g ...), white pills so the button reads on a photo, a dark
 * hero or a white card alike. 14px minimum. */

.net-cf { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; vertical-align: middle; }
/* .net-cf-prefixed: a theme's own link / button rules in a hero (Kindr's, HomeSquare's) must not restyle it */
.net-cf .net-cf-btn, .net-cf a.net-cf-btn:is(:link, :visited) {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; text-decoration: none;
  min-height: 44px; padding: 0 20px; border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1;
  background: var(--site_color_g, #1326F3); color: #fff; border: 2px solid var(--site_color_g, #1326F3);
  box-shadow: 0 10px 22px -14px rgba(8, 15, 84, .6); transition: background .15s, color .15s;
}
.net-cf .net-cf-btn:hover, .net-cf a.net-cf-btn:is(:hover, :focus) { filter: brightness(1.06); color: #fff; text-decoration: none; }
.net-cf .net-cf-btn[aria-pressed="true"] { background: #fff; color: var(--site_color_g, #1326F3); }
.net-cf .net-cf-btn[aria-pressed="true"]:hover { color: var(--site_color_g, #1326F3); }
.net-cf .net-cf-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--site_color_g, #1326F3); }
.net-cf .net-cf-btn[disabled] { opacity: .7; cursor: default; }
.net-cf-n {
  display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--site_font_color_g, #080F54); font-family: inherit; font-weight: 600; font-size: 14px; line-height: 1;
  border: 1px solid rgba(8, 15, 84, .12);
}
.net-cf-bar { margin: 16px 0 6px; }
/* on a Townsquare directory card (townsquare sections/ts_place_list.php): a row of its own, above the card's
   stretched Visit link and its hover layer, so Follow is always in view and clickable */
.tq-tsl-card .net-cf-bar { position: relative; z-index: 3; margin: 0; padding: 0 16px 16px; }
.net-cf.net-cf--sm .net-cf-btn { min-height: 36px; padding: 0 14px; font-size: 14px; }
.net-cf--sm .net-cf-n { min-height: 28px; padding: 0 10px; }

/* The community card (network/community_card.php) and its tokens, every rule scoped to .mn-page (the
 * Communities area's root, network/communities.php) so nothing reaches the host page. Moved here from my-network.css when the
 * My Network page went (owner 2026-11-02). Accent var(--site_color_g), text var(--site_font_color_g). */
.mn-page {
  --mn-accent: var(--site_color_g, #1b2de6);
  --mn-ink: var(--site_font_color_g, #202020);
  --mn-on-accent: #fff;
  --mn-muted: color-mix(in srgb, var(--mn-ink) 64%, #fff);
  --mn-line: color-mix(in srgb, var(--mn-ink) 11%, #fff);
  --mn-tint: color-mix(in srgb, var(--mn-accent) 12%, #fff);
  --mn-tint-ink: color-mix(in srgb, var(--mn-accent) 70%, var(--mn-ink));
  --mn-hi: var(--secondary-color, #2ecc71);
  --mn-radius: 16px;
  --mn-shadow: 0 1px 2px color-mix(in srgb, var(--mn-ink) 6%, transparent), 0 12px 28px -18px color-mix(in srgb, var(--mn-ink) 40%, transparent);
  color: var(--mn-ink);
  line-height: 1.5;
}
.mn-page *, .mn-page *::before, .mn-page *::after { box-sizing: border-box; }
.mn-page [hidden] { display: none !important; }
.mn-page a { color: inherit; }
.mn-page a.mn-btn-line { color: var(--mn-ink); }
.mn-page a.mn-btn-line:hover { color: var(--mn-accent); }
.mn-page .mn-btn-line, .mn-page .mn-follow {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 18px; border-radius: 10px;
  font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.mn-page .mn-btn-line { border: 1px solid var(--mn-line); background: #fff; color: var(--mn-ink); }
.mn-page .mn-btn-line:hover, .mn-page .mn-btn-line:focus-visible { border-color: var(--mn-accent); color: var(--mn-accent); text-decoration: none; }
.mn-page .mn-follow { border: 1px solid var(--mn-accent); background: var(--mn-accent); color: var(--mn-on-accent); }
.mn-page .mn-follow:hover { background: color-mix(in srgb, var(--mn-accent) 86%, #000); }
.mn-page .mn-follow[aria-pressed="true"] { background: var(--mn-tint); border-color: var(--mn-tint); color: var(--mn-tint-ink); }
.mn-page :is(.mn-btn-line, .mn-follow):focus-visible { outline: 2px solid var(--mn-accent); outline-offset: 2px; }
.mn-page .mn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 16px; }
.mn-page .mn-community {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border-radius: var(--mn-radius); background: #fff; border: 1px solid var(--mn-line); box-shadow: var(--mn-shadow);
  padding: 0; overflow: hidden; transition: box-shadow .25s, transform .25s, border-color .25s;
}
.mn-page .mn-community:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--mn-accent) 35%, #fff); }
.mn-page .mn-pal-0 { background: var(--mn-accent); }
.mn-page .mn-pal-1 { background: color-mix(in srgb, var(--mn-accent) 60%, #000); }
.mn-page .mn-pal-2 { background: color-mix(in srgb, var(--mn-accent) 55%, var(--mn-hi)); }
.mn-page .mn-pal-3 { background: color-mix(in srgb, var(--mn-ink) 80%, var(--mn-accent)); }
.mn-page .mn-pal-4 { background: color-mix(in srgb, var(--mn-hi) 75%, #000); }
.mn-page .mn-pal-5 { background: color-mix(in srgb, var(--mn-ink) 55%, var(--mn-accent)); }
.mn-page .mn-community .mn-thumb { display: grid; place-items: center; height: 120px; background-size: cover; background-position: center; font-size: 34px; font-weight: 800; text-decoration: none !important; }
.mn-page a.mn-thumb { color: #fff; }
.mn-page .mn-community-tx { min-width: 0; flex: 1 1 auto; margin: 16px 20px 14px; }
.mn-page .mn-name { margin: 0 0 2px; font-size: 17px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.mn-page .mn-name a { text-decoration: none; color: var(--mn-ink); }
.mn-page .mn-name a:hover { color: var(--mn-accent); }
.mn-page .mn-sub { margin: 0 0 6px; font-size: 15px; color: var(--mn-muted); overflow-wrap: anywhere; }
.mn-page .mn-sub--clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mn-page .mn-meta { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--mn-muted); }
.mn-page .mn-meta svg { flex: 0 0 auto; }
.mn-page .mn-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.mn-page .mn-tag { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; background: var(--mn-tint); color: var(--mn-tint-ink); font-size: 14px; font-weight: 700; }
.mn-page .mn-community-act { display: flex; gap: 8px; padding: 0 20px 20px; }
.mn-page .mn-community-act > * { flex: 1 1 0; }
@media (max-width: 640px) {
  .mn-page .mn-grid { grid-template-columns: minmax(0, 1fr); }
}

/* My Network > Communities: the lists (the cards above), inside the profile's Network tab or any other host. */
.mn-page.net-cm { display: grid; gap: 22px; font-size: 15px; }
.net-cm-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; font-size: 18px; font-weight: 800; color: var(--site_font_color_g, #080F54); }
.net-cm-h small { font-size: 14px; font-weight: 600; opacity: .7; }
.net-cm-empty { font-size: 14px; opacity: .75; margin: 0; }
.net-cm-open {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 14px; line-height: 1; background: #fff; color: var(--site_color_g, #1326F3);
  border: 1px solid var(--site_color_g, #1326F3);
}
.net-cm-open[aria-expanded="true"] { background: var(--site_color_g, #1326F3); color: #fff; }

/* a community opened in place: its members */
.net-cmm { border: 1px solid rgba(8, 15, 84, .12); border-radius: 16px; padding: 18px; background: #fff; display: grid; gap: 14px; }
.net-cmm[hidden] { display: none; }
.net-cmm-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.net-cmm-top h4 { margin: 0; font-size: 17px; font-weight: 800; color: var(--site_font_color_g, #080F54); }
.net-cmm-top h4 small { display: block; font-size: 14px; font-weight: 600; opacity: .7; margin-top: 2px; }
.net-cmm-close { min-height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(8, 15, 84, .15); background: #fff; font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--site_font_color_g, #080F54); }
.net-cmm-q { display: flex; gap: 8px; }
.net-cmm-q input {
  flex: 1; min-width: 0; min-height: 42px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(8, 15, 84, .18);
  font-family: inherit; font-weight: 500; font-size: 14px; color: var(--site_font_color_g, #080F54);
}
.net-cmm-q input:focus { outline: 2px solid var(--site_color_g, #1326F3); outline-offset: 1px; }
.net-cmm-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.net-cmm-list.is-loading { opacity: .55; }
.net-cmm-list.pv2 { background: none; padding: 0; font-size: 15px; }
/* the card's actions (Follow, Members, Visit) wrap instead of running out of a narrow card */
.mn-page.net-cm .mn-community-act { flex-wrap: wrap; }
.mn-page.net-cm .mn-community-act > * { flex: 1 1 auto; }
.net-cmm-none { font-size: 14px; opacity: .75; margin: 0; }
.net-cmm-none[hidden], .net-cmm-more[hidden] { display: none; }
.net-cmm-more { justify-self: center; }
@media (max-width: 600px) {
  .net-cmm { padding: 14px; }
  .net-cmm-list { grid-template-columns: 1fr; }
}
