/* =============================================================================
 * erp-community.css — the source's community bar / pills / cards.
 *
 * Lifted VERBATIM from the source's `/vendor/community/community.css?v=1796020390`
 * (captured 2026-11-21). Only this header is added.
 *
 * ⚠️ On OUR store the community surfaces render ONLY when the client's own
 * group invites are set in the Customizer ("ERP — Contact & community"). The
 * source's markup hard-codes ITS OPERATOR's Telegram/WhatsApp/Discord invites;
 * republishing those would send our customers into a third party's groups.
 * See erp_procure_community_links().
 *
 * @package erppeptide
 * ========================================================================== */

:root {
  --community-bar-height: 40px;
  --community-navy: #0a1a3b;
  --community-telegram: #1d84b5;
  --community-whatsapp: #128c7e;
  --community-discord: #5865f2;
}

/* Top banner */
.community-bar {
  background: var(--community-navy);
  color: #fff;
  font-size: 13px;
  line-height: 1.3;
}

.community-bar__inner {
  width: min(1320px, 100%);
  min-height: var(--community-bar-height);
  margin: 0 auto;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.community-bar__icon {
  font-size: 16px;
  color: #f6db7b;
  flex: 0 0 auto;
}

.community-bar__messages {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 18px;
  overflow: hidden;
}

.community-bar__message {
  position: absolute;
  inset: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}

.community-bar__message.is-active {
  opacity: 1;
  transform: none;
}

.community-bar__links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.community-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  color: #fff !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  white-space: nowrap;
  transition: filter .15s ease, transform .15s ease;
}

.community-pill:hover,
.community-pill:focus-visible {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.community-pill--telegram { background: var(--community-telegram); }
.community-pill--whatsapp { background: var(--community-whatsapp); }
.community-pill--discord { background: var(--community-discord); }

.community-bar__join {
  display: none;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--community-telegram) !important;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none !important;
  white-space: nowrap;
}

.community-bar__close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .75);
  font-size: 20px;
  line-height: 1;
}

.community-bar__close:hover { color: #fff; background: rgba(255, 255, 255, .12); }

.community-bar-spacer { display: none; }

html.community-bar-dismissed .community-bar,
html.community-bar-dismissed .community-bar-spacer { display: none !important; }

/* primepeptide: the header floats (position: fixed), so the banner is fixed above it */
html.community-bar-fixed.has-community-bar:not(.community-bar-dismissed) .community-bar {
  position: fixed;
  top: var(--site-banner-height, 0px);
  left: 0;
  right: 0;
  z-index: 1000;
}

html.community-bar-fixed.has-community-bar:not(.community-bar-dismissed) .community-bar-spacer {
  display: block;
  height: var(--community-bar-height);
}

html.community-bar-fixed.has-community-bar:not(.community-bar-dismissed) body header .header-content,
html.community-bar-fixed.has-community-bar:not(.community-bar-dismissed) body header .header-mobile {
  top: calc(var(--site-banner-height, 0px) + var(--community-bar-height));
}

@media (max-width: 767.98px) {
  :root { --community-bar-height: 44px; }
  .community-bar { font-size: 12px; }
  .community-bar__inner { padding: 6px 10px 6px 14px; gap: 8px; }
  .community-bar__messages { height: 30px; }
  .community-bar__message { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; line-height: 15px; inset: auto 0; top: 50%; translate: 0 -50%; }
  .community-bar__icon,
  .community-bar__links { display: none; }
  .community-bar__join { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  .community-bar__message,
  .community-pill { transition: none; }
}

/* Platform sheet */
.community-sheet {
  width: min(420px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--community-navy);
  box-shadow: 0 24px 60px rgba(10, 26, 59, .28);
}

.community-sheet::backdrop { background: rgba(10, 26, 59, .45); }

.community-sheet__panel {
  position: relative;
  padding: 22px 20px 20px;
}

.community-sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #f1f4f8;
  color: var(--community-navy);
  font-size: 22px;
  line-height: 1;
}

.community-sheet__title {
  margin: 0 40px 6px 0;
  font-size: 20px;
  font-weight: 700;
}

.community-sheet__lead {
  margin: 0 0 16px;
  color: #5b6473;
  font-size: 13px;
  line-height: 1.55;
}

.community-sheet__list { display: grid; gap: 8px; }

.community-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e3e7ee;
  border-radius: 14px;
  color: var(--community-navy) !important;
  text-decoration: none !important;
  transition: border-color .15s ease, background .15s ease;
}

.community-option:hover,
.community-option:focus-visible { border-color: #b8c3d6; background: #f7f9fc; }

.community-option > .bi:first-child { font-size: 24px; }
.community-option--telegram > .bi:first-child { color: var(--community-telegram); }
.community-option--whatsapp > .bi:first-child { color: var(--community-whatsapp); }
.community-option--discord > .bi:first-child { color: var(--community-discord); }

.community-option__text { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }
.community-option__text strong { font-size: 14px; }
.community-option__text small { color: #667085; font-size: 12px; }

.community-option__badge {
  padding: 2px 8px;
  border-radius: 6px;
  background: #e6f1fb;
  color: #0c447c;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.community-option__arrow { color: #98a2b3; font-size: 13px; }

@media (max-width: 767.98px) {
  .community-sheet {
    width: 100%;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Support panel block and contextual cards */
.community-block {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  background: #eef6ff;
}

.community-block__title {
  display: block;
  color: var(--community-navy);
  font-size: 14px;
}

.community-block__text {
  display: block;
  margin: 2px 0 10px;
  color: #5b6473;
  font-size: 12px;
  line-height: 1.5;
}

.community-block__links { display: flex; flex-wrap: wrap; gap: 6px; }

.community-card {
  margin-top: 20px;
  padding: 18px 20px;
  border: 1.5px dashed #85b7eb;
  border-radius: 14px;
  background: #f5f9ff;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.community-card__icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--community-navy);
  color: #fff;
  font-size: 20px;
}

.community-card__copy { flex: 1 1 260px; min-width: 0; }
.community-card__copy strong { display: block; color: var(--community-navy); font-size: 16px; }
.community-card__copy p { margin: 3px 0 0; color: #5b6473; font-size: 13px; line-height: 1.55; }
.community-card .community-block__links { flex: 0 0 auto; }

.community-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: #185fa5 !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}

.community-inline-link:hover { text-decoration: underline !important; }
