.agenda-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px) minmax(0, 1fr);
  gap: 24px;
}

.agenda-topbar .top-actions {
  justify-self: end;
}

.team-message-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.team-message {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 17px 18px 14px;
  background: #fff1a8;
  box-shadow: 3px 5px 11px #6c66341f;
  transform: rotate(-0.5deg);
  flex: 1;
}

.waitlist-notice {
  position: relative;
  border: 1px solid #d9e2dd;
  border-radius: 10px;
  background: var(--paper);
  color: var(--green);
  padding: 11px 34px 11px 13px;
  font: 700 13px 'DM Sans', sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.waitlist-notice:hover,
.waitlist-notice:focus-visible {
  border-color: var(--green);
}

.waitlist-count {
  position: absolute;
  top: -9px;
  right: -9px;
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 23px;
  padding: 0 6px;
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: #c8443d;
  color: #fff;
  font-size: 12px;
}

.waitlist-items {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.waitlist-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.waitlist-item strong,
.waitlist-item span {
  display: block;
}

.waitlist-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.waitlist-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-message::before {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 74px;
  height: 16px;
  background: #f3d987b8;
  content: '';
  transform: translateX(-50%) rotate(1deg);
}

.team-message label {
  display: grid;
  gap: 5px;
  color: #77661d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.1px;
}

.team-message textarea {
  min-height: 45px;
  max-height: 92px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #4c482e;
  font: 500 14px/1.35 'DM Sans', sans-serif;
  resize: vertical;
}

.team-message textarea:focus {
  outline: 2px solid #d4b743;
  outline-offset: 3px;
}

.team-message textarea::placeholder {
  color: #9a8e54;
}

.team-message-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-message-status {
  color: #82753b;
  font-size: 10px;
}

.team-message .primary-button {
  padding: 7px 12px;
  background: #766827;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .agenda-topbar {
    grid-template-columns: 1fr auto;
  }

  .team-message {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .team-message-area {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 520px) {
  .agenda-topbar {
    grid-template-columns: 1fr;
  }

  .agenda-topbar .top-actions {
    justify-self: start;
  }

  .team-message-area {
    align-items: stretch;
    flex-direction: column;
  }

  .waitlist-notice {
    align-self: flex-end;
  }

  .waitlist-items {
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
    padding-right: 4px;
  }

  .waitlist-item {
    grid-template-columns: 1fr;
  }

  .waitlist-item-actions {
    justify-content: flex-end;
  }
}
