.meetup-chat-shell {
  display: grid;
  gap: 10px;
  margin: 14px 0 4px;
  padding: 12px;
  border: 1px solid rgba(151, 135, 255, 0.24);
  border-radius: 14px;
  background: rgba(15, 20, 31, 0.88);
}

.meetup-directions-link,
.meetup-chat-toggle,
.meetup-chat-close,
.meetup-chat-send {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(151, 135, 255, 0.42);
  border-radius: 10px;
  background: rgba(151, 135, 255, 0.12);
  color: #ded8ff;
  font: inherit;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}

.meetup-directions-link,
.meetup-chat-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 0 14px;
  text-align: left;
}

.meetup-chat-toggle-label {
  min-width: 0;
  flex: 1 1 auto;
}

.meetup-chat-unread-badge,
.meetup-chat-nav-badge {
  display: inline-flex;
  min-width: 21px;
  height: 21px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  border: 1px solid rgba(232, 218, 255, 0.52);
  border-radius: 999px;
  background: #b516ff;
  box-shadow: 0 0 12px rgba(181, 22, 255, 0.42);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.meetup-chat-unread-badge {
  flex: 0 0 auto;
}

.meetup-chat-nav-badge {
  flex: 0 0 auto;
  margin: 0 8px 0 10px;
}

.meetup-chat-unread-badge[hidden],
.meetup-chat-nav-badge[hidden],
.mobile-bottom-nav-meetup-badge[hidden] {
  display: none !important;
}

.mobile-bottom-nav-meetup-badge {
  display: none;
}

.meetup-chat-thread[hidden] {
  display: none !important;
}

.meetup-chat-thread {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 0;
}

.meetup-chat-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meetup-chat-heading h4 {
  margin: 0;
  color: #f4f2ff;
  font-size: 15px;
}

.meetup-chat-close {
  min-height: 40px;
  padding: 0 14px;
  background: transparent;
}

.meetup-chat-messages {
  box-sizing: border-box;
  display: flex;
  max-height: 280px;
  min-height: 58px;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 9px;
  border: 1px solid rgba(151, 135, 255, 0.16);
  border-radius: 11px;
  background: rgba(4, 8, 15, 0.58);
  overscroll-behavior: contain;
}

.meetup-chat-message {
  align-self: flex-start;
  max-width: min(88%, 440px);
  padding: 8px 10px;
  border: 1px solid rgba(134, 151, 181, 0.2);
  border-radius: 11px 11px 11px 4px;
  background: rgba(32, 40, 56, 0.9);
}

.meetup-chat-message-own {
  align-self: flex-end;
  border-color: rgba(151, 135, 255, 0.3);
  border-radius: 11px 11px 4px 11px;
  background: rgba(94, 80, 170, 0.24);
}

.meetup-chat-message-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  color: #c4bbff;
  font-size: 11px;
  font-weight: 750;
}

.meetup-chat-message-header time {
  flex: none;
  color: #98a2b4;
  font-size: 10px;
  font-weight: 500;
}

.meetup-chat-message-body {
  margin: 4px 0 0;
  color: #f0f2f7;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.meetup-chat-status {
  min-height: 16px;
  color: #aeb9c9;
  font-size: 12px;
  line-height: 1.35;
}

.meetup-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
}

.meetup-chat-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  max-height: 132px;
  resize: vertical;
  padding: 10px 11px;
  border: 1px solid rgba(151, 135, 255, 0.3);
  border-radius: 10px;
  outline: none;
  background: rgba(6, 10, 18, 0.8);
  color: #f5f5fa;
  font: inherit;
  font-size: 14px;
}

.meetup-chat-form textarea:focus-visible,
.meetup-chat-toggle:focus-visible,
.meetup-chat-close:focus-visible,
.meetup-chat-send:focus-visible,
.meetup-directions-link:focus-visible {
  outline: 2px solid #a99aff;
  outline-offset: 2px;
}

.meetup-chat-send {
  min-width: 68px;
  padding: 0 14px;
  background: linear-gradient(135deg, #6655cf, #8170ed);
  color: #fff;
}

.meetup-chat-send:disabled,
.meetup-chat-form textarea:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 600px) {
  .mobile-bottom-nav-meetup-badge {
    position: absolute;
    top: 3px;
    right: auto;
    left: 22%;
    display: flex;
    min-width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 1px solid rgba(232, 218, 255, 0.58);
    border-radius: 999px;
    background: #b516ff;
    box-shadow: 0 0 9px rgba(181, 22, 255, 0.4);
    color: #ffffff;
    font-size: 9px;
    line-height: 1;
  }

  .meetup-chat-shell {
    margin-top: 12px;
    padding: 10px;
  }

  .meetup-chat-messages {
    max-height: 34vh;
    min-height: 54px;
  }

  .meetup-chat-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .meetup-chat-send {
    width: 100%;
  }
}