.community-chat-shell{border:1px solid #dfe5ea;border-radius:18px;overflow:hidden;background:#fff}
.community-chat-header{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:14px 16px;background:#eefaf1;border-bottom:1px solid #d8f3df;flex-wrap:wrap}
.community-chat-title{font-weight:900;color:#064e3b}
.community-chat-presence{font-size:13px;color:#475467}
.community-chat-list{height:430px;overflow-y:auto;padding:18px;background:#efeae2;scroll-behavior:smooth}
.community-chat-day{text-align:center;margin:10px 0;color:#667085;font-size:12px;font-weight:bold}
.community-chat-row{display:flex;gap:9px;margin:9px 0;align-items:flex-end}
.community-chat-row.own{justify-content:flex-end}
.community-chat-avatar{width:34px;height:34px;border-radius:50%;object-fit:cover;background:#fff;border:1px solid #d0d5dd;flex-shrink:0}
.community-chat-avatar-placeholder{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid #d0d5dd;flex-shrink:0;font-size:15px}
.community-chat-bubble{max-width:min(78%,620px);background:#fff;border-radius:12px 12px 12px 3px;padding:9px 11px;box-shadow:0 1px 2px rgba(0,0,0,.12);position:relative}
.community-chat-row.own .community-chat-bubble{background:#d9fdd3;border-radius:12px 12px 3px 12px}
.community-chat-name{font-size:12px;font-weight:900;color:#0b8f3d;margin-bottom:4px}
.community-chat-reply{border-left:3px solid #0b8f3d;background:rgba(255,255,255,.58);padding:6px 8px;border-radius:7px;margin-bottom:6px;font-size:12px;color:#475467}
.community-chat-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.4}
.community-chat-deleted{font-style:italic;color:#667085}
.community-chat-meta{display:flex;justify-content:flex-end;gap:7px;align-items:center;margin-top:5px;font-size:11px;color:#667085}
.community-chat-tools{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px}
.community-chat-tool{border:none;background:transparent;color:#475467;padding:2px 5px;font-size:11px;cursor:pointer;font-weight:bold}
.community-chat-load{display:flex;justify-content:center;margin-bottom:12px}
.community-chat-load button{padding:8px 12px;font-size:12px}
.community-chat-compose{border-top:1px solid #dfe5ea;padding:12px;background:#fff}
.community-chat-replying{display:none;background:#f8faf9;border-left:4px solid #0b8f3d;padding:9px 10px;margin-bottom:8px;border-radius:8px;font-size:13px}
.community-chat-replying.active{display:flex;justify-content:space-between;gap:10px;align-items:center}
.community-chat-compose-row{display:grid;grid-template-columns:1fr auto;gap:9px;align-items:end}
.community-chat-input{width:100%;min-height:48px;max-height:130px;resize:vertical;border:1px solid #d0d5dd;border-radius:14px;padding:12px;font:inherit;box-sizing:border-box}
.community-chat-send{min-height:48px;border-radius:14px!important}
.community-chat-footer{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-top:7px;color:#667085;font-size:12px;flex-wrap:wrap}
.community-chat-typing{min-height:18px;color:#0b8f3d;font-style:italic;font-size:12px;padding:0 16px 8px;background:#fff}
.community-chat-notice{padding:16px;border-radius:14px;background:#f8faf9;border:1px solid #e7ece8;color:#475467}
.community-chat-error{color:#b91c1c;font-weight:bold}
.community-chat-unread{display:none;background:#0b8f3d;color:#fff;border:none;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:bold;position:sticky;bottom:8px;margin:0 auto;z-index:2}
.community-chat-unread.show{display:block}
@media(max-width:700px){.community-chat-list{height:390px;padding:12px}.community-chat-bubble{max-width:88%}.community-chat-compose-row{grid-template-columns:1fr}.community-chat-send{width:100%}}

/* Community Chat v3 — emoji picker + attachments */
.community-chat-compose-row{grid-template-columns:auto minmax(0,1fr) auto;align-items:end}
.community-chat-compose-tools{display:flex;gap:5px;align-items:center;padding-bottom:3px}
.community-chat-compose-tool{width:40px;height:40px;border:1px solid #d0d5dd;border-radius:12px;background:#fff;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center}
.community-chat-compose-tool:hover{background:#f0fdf4;border-color:#86efac}
.community-chat-emoji-picker{display:flex;gap:4px;flex-wrap:wrap;padding:8px 0}
.community-chat-emoji-picker[hidden]{display:none}
.community-chat-emoji-picker button{border:1px solid #e4e7ec;background:#fff;border-radius:9px;padding:6px 8px;font-size:18px;cursor:pointer}
.community-chat-attachment-preview{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 8px}
.community-chat-selected-attachment{display:flex;align-items:center;gap:7px;max-width:280px;border:1px solid #d9eadf;background:#f8fff9;border-radius:10px;padding:6px 8px;font-size:12px}
.community-chat-selected-attachment img{width:42px;height:42px;border-radius:7px;object-fit:cover}
.community-chat-selected-attachment div{min-width:0}
.community-chat-selected-attachment strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.community-chat-selected-attachment span{display:block;color:#667085;font-size:11px}
.community-chat-selected-attachment button{border:none;background:transparent;font-size:20px;cursor:pointer;color:#667085;padding:1px 4px}
.community-chat-attachments{display:grid;gap:7px;margin-top:7px}
.community-chat-attachment-image{display:block;text-decoration:none;color:inherit}
.community-chat-attachment-image img{display:block;max-width:100%;max-height:300px;border-radius:10px;object-fit:contain;background:#f8faf9}
.community-chat-attachment-image span{display:block;font-size:11px;color:#667085;margin-top:4px;overflow-wrap:anywhere}
.community-chat-attachment-video video{display:block;width:min(100%,420px);max-height:300px;border-radius:10px;background:#111}
.community-chat-attachment-video a,.community-chat-attachment-file{display:flex;gap:7px;align-items:center;margin-top:4px;color:#075e35;text-decoration:none;overflow-wrap:anywhere}
.community-chat-attachment-file span{color:#667085;font-size:11px;margin-left:auto}
#communityChatUploadStatus.error{color:#b91c1c;font-weight:700}
.community-chat-send{min-width:68px;width:auto!important;padding-left:14px!important;padding-right:14px!important}
@media(max-width:700px){
  .community-chat-compose-row{grid-template-columns:auto minmax(0,1fr) auto;gap:6px}
  .community-chat-compose-tools{gap:3px}
  .community-chat-compose-tool{width:36px;height:42px;border-radius:11px;font-size:17px}
  .community-chat-input{min-height:44px;padding:10px}
  .community-chat-send{width:auto!important;min-width:58px;min-height:44px;border-radius:11px!important;padding:0 10px!important}
  .community-chat-attachment-image img,.community-chat-attachment-video video{max-height:230px}
}

/* Community Chat v4 — message reactions */
.community-chat-reactions{display:flex;gap:4px;flex-wrap:wrap;margin-top:7px}
.community-chat-reaction{display:inline-flex;align-items:center;gap:4px;border:1px solid #d8dee5;background:rgba(255,255,255,.72);border-radius:999px;padding:3px 7px;min-height:28px;cursor:pointer;font:inherit;line-height:1}
.community-chat-row.own .community-chat-reaction{background:rgba(255,255,255,.5)}
.community-chat-reaction:hover{border-color:#86efac;background:#f0fdf4}
.community-chat-reaction.active{border-color:#16a34a;background:#dcfce7;box-shadow:0 0 0 1px rgba(22,163,74,.08)}
.community-chat-reaction span{font-size:16px}
.community-chat-reaction small{font-size:11px;font-weight:800;color:#475467}
@media(max-width:700px){.community-chat-reaction{padding:3px 6px;min-height:27px}.community-chat-reaction span{font-size:15px}}

/* Community chat reported-attachment moderation */
.community-chat-report-attachments{
  display:grid;
  gap:8px;
  margin:10px 0;
}
.community-chat-report-attachment{
  display:flex;
  align-items:center;
  gap:9px;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:8px 10px;
  background:#f8fafc;
  text-decoration:none;
  color:inherit;
  overflow:hidden;
}
.community-chat-report-attachment.image{
  align-items:flex-start;
}
.community-chat-report-attachment.image img{
  width:110px;
  max-height:90px;
  object-fit:cover;
  border-radius:8px;
  display:block;
}
.community-chat-report-attachment.video{
  display:block;
}
.community-chat-report-attachment.video video{
  width:100%;
  max-height:220px;
  border-radius:8px;
  background:#111;
  display:block;
  margin-bottom:6px;
}
.community-chat-report-attachment.document span:first-child,
.community-chat-report-attachment.unavailable span:first-child{
  font-size:22px;
}
.community-chat-report-attachment.unavailable{
  opacity:.7;
}

/* Paid Upcoming Event protection for free Community Chat attachments */
.community-chat-event-guard-note{
  margin-top:7px;
  font-size:12px;
  line-height:1.4;
  color:#667085;
}
.community-chat-event-guard-note strong{
  color:#344054;
}

/* community-chat-hover-reactions-v1 */
/* Reaction choices are no longer a permanent line under every message. */
.community-chat-reactions{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  max-height:0;
  overflow:hidden;
  margin-top:0!important;
  transform:translateY(-3px);
  transition:
    opacity .14s ease,
    visibility .14s ease,
    max-height .14s ease,
    margin .14s ease,
    transform .14s ease;
}

.community-chat-row:hover .community-chat-reactions,
.community-chat-row:focus-within .community-chat-reactions{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  max-height:48px;
  overflow:visible;
  margin-top:7px!important;
  transform:none;
}

/* Keep reaction counts legible and consistent while visible. */
.community-chat-reaction small{
  display:inline-block;
  min-width:9px;
  text-align:center;
  font-weight:900;
}

/* A selected reaction keeps a clear count contrast. */
.community-chat-reaction.active small{
  color:#075e35!important;
}

/* Touch/keyboard users can reveal reactions by focusing/tapping the message. */
@media (hover:none), (pointer:coarse){
  .community-chat-row:focus-within .community-chat-reactions{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    max-height:48px;
    overflow:visible;
    margin-top:7px!important;
    transform:none;
  }
}

/* community-chat-floating-hover-reactions-v1-2-1 */

/* The message row is the positioning box. */
.community-chat-row{
  position:relative!important;
}

/* Override the earlier hover implementation that changed max-height
   and margin. The reaction strip now floats, so revealing it never
   makes the message itself taller. */
.community-chat-reactions{
  position:absolute!important;
  z-index:50!important;
  left:42px;
  top:calc(100% - 6px);
  width:max-content;
  max-width:min(430px,calc(100vw - 90px));
  max-height:none!important;
  overflow:visible!important;
  margin:0!important;
  padding:5px 7px!important;
  border:1px solid #cfe0d5;
  border-radius:999px;
  background:rgba(255,255,255,.98);
  box-shadow:0 7px 18px rgba(16,35,27,.16);
  transform:translateY(-3px)!important;
}

.community-chat-row.own .community-chat-reactions{
  left:auto;
  right:8px;
}

.community-chat-row:hover .community-chat-reactions,
.community-chat-row:focus-within .community-chat-reactions{
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
  max-height:none!important;
  margin:0!important;
  transform:none!important;
}

/* Keep the strip compact and its counts easy to read. */
.community-chat-reaction{
  white-space:nowrap;
}

.community-chat-reaction small{
  display:inline-block!important;
  min-width:9px;
  margin-left:2px;
  text-align:center;
  font-weight:900!important;
}

@media (max-width:680px){
  .community-chat-reactions{
    left:8px;
    max-width:calc(100vw - 42px);
    flex-wrap:wrap;
    border-radius:12px;
  }

  .community-chat-row.own .community-chat-reactions{
    left:auto;
    right:8px;
  }
}
