/* 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; }

/* My Network > Communities: the lists. The cards are My Network's own (network/community_card.php, whose
 * my-network.css rules and tokens are scoped to .mn-page): this area is an .mn-page without the page's width
 * and margins, so it sits inside the profile's Network tab or any other host. */
.mn-page.net-cm { max-width: none; margin: 0; padding: 0; 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; }
}
