/* Community-only layout refinements complement the Coalition JomSocial theme. */
#community-wrap {
  padding-block: clamp(24px, 3vw, 40px);
}

#community-wrap .jomsocial {
  width: min(var(--container), calc(100% - 48px));
  max-width: none;
  margin-inline: auto;
}

#community-wrap .joms-page {
  padding: clamp(20px, 3vw, 36px);
}

#community-wrap .joms-page,
#community-wrap .joms-module__wrapper,
#community-wrap .joms-focus,
#community-wrap .joms-postbox,
#community-wrap .joms-stream__container > .joms-stream {
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

#community-wrap .joms-module__wrapper .joms-page {
  padding: 0;
  box-shadow: none;
}

#community-wrap .joms-toolbar--desktop,
#community-wrap .joms-toolbar--mobile {
  margin-bottom: 18px;
  border-radius: 4px;
}

#community-wrap :is(.joms-toolbar, .joms-toolbar--desktop, .joms-toolbar--mobile) a:is([href*="/courses"], [href*="view=courses"]) {
  text-transform: uppercase;
}

#community-wrap .joms-sortings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

#community-wrap .joms-sortings .joms-select--wrapper {
  flex: 1 1 220px;
  width: auto;
  margin: 0;
}

#community-wrap .joms-sidebar .joms-list--group {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#community-wrap .joms-sidebar .joms-list--group > li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
}

#community-wrap .joms-sidebar .joms-list--group .joms-popover__avatar,
#community-wrap .joms-sidebar .joms-list--group .joms-popover__content {
  display: block;
  width: auto;
  min-width: 0;
  padding: 0;
}

#community-wrap .joms-sidebar .joms-list--group .joms-avatar {
  display: block;
  width: 48px;
}

#community-wrap .joms-sidebar .joms-list--group .joms-avatar img {
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}

#community-wrap .joms-sidebar .joms-list--group h5 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

#community-wrap .joms-sidebar .joms-list--group .joms-list--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0;
}

#community-wrap .joms-sidebar .joms-list--group .joms-list--inline > li {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  font-size: 12px;
  line-height: 1.5;
}

#community-wrap .joms-sidebar .joms-list--group .joms-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

#community-wrap .joms-sidebar .joms-list--group a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

#community-wrap .nc-community-sidebar-toggle {
  display: none;
}

@media (max-width: 767px) {
  #community-wrap .jomsocial {
    width: calc(100% - 32px);
  }

  #community-wrap .nc-community-sidebar-toggle {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    padding: 10px 14px;
    text-align: left;
    cursor: pointer;
  }

  #community-wrap .nc-community-sidebar-toggle:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  #community-wrap .nc-community-sidebar-toggle__indicator {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }

  #community-wrap .nc-community-sidebar-toggle[aria-expanded="true"]
    .nc-community-sidebar-toggle__indicator {
    transform: rotate(225deg);
  }

  #community-wrap .joms-sidebar[hidden] {
    display: none !important;
  }
}
