/* The Discord post preview, at Discord's desktop sizes. */

/* Discord post preview, at Discord's desktop sizes: 40px avatar, 16px gap,
   embeds up to 520px wide, 14px text and three inline fields per row. */
.raid-post-preview {
  padding: 16px 16px 18px;
  background: #313338;
  border-color: #3f4147;
}

.raid-post-preview .discord-channel {
  font-size: 16px;
  padding-bottom: 14px;
  border-bottom-color: #3f4147;
}

.raid-post-preview .discord-message {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.raid-post-preview .discord-message > img {
  width: 40px;
  height: 40px;
}

.raid-post-preview .discord-author {
  font-size: 16px;
  font-weight: 500;
  color: #f2f3f5;
  gap: 6px;
}

.raid-post-preview .discord-author > span {
  font-size: 10px;
  font-weight: 600;
  line-height: 15px;
  padding: 0 4px;
  border-radius: 3px;
  background: #5865f2;
}

.discord-rich-embed {
  display: grid;
  gap: 8px;
  max-width: 520px;
  margin-top: 4px;
  padding: 8px 16px 16px 12px;
  background: #2b2d31;
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  container-type: inline-size;
}

.discord-rich-embed.is-muted {
  border-left-color: #5f5a54;
}

.discord-rich-embed h3 {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.375;
  color: #f2f3f5;
  overflow-wrap: anywhere;
}

.discord-embed-description,
.discord-field > div {
  font-size: 14px;
  line-height: 1.375;
  color: #dbdee1;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.discord-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.discord-field {
  grid-column: 1 / -1;
  min-width: 0;
}

.discord-field.is-inline {
  grid-column: auto;
}

@container (max-width: 420px) {
  .discord-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* The blank third column the bot adds to pair the roles. */
  .discord-field.is-spacer {
    display: none;
  }
}

@container (max-width: 260px) {
  .discord-fields {
    grid-template-columns: 1fr;
  }
}

.discord-field > strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.375;
  color: #f2f3f5;
}

.discord-emoji {
  display: inline-block;
  width: 1.375em;
  height: 1.375em;
  margin: 0 1px;
  vertical-align: bottom;
  object-fit: contain;
  border-radius: 3px;
}

.discord-time {
  padding: 0 2px;
  border-radius: 3px;
  background: #3c3f45;
}

.discord-mention {
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 500;
  color: #c9cdfb;
  background: rgb(88 101 242 / 30%);
}

.discord-rich-embed .discord-embed-footer {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
  font-size: 12px;
  font-weight: 500;
  color: #dbdee1;
}

.discord-components {
  display: grid;
  gap: 8px;
  max-width: 520px;
  margin-top: 8px;
}

.discord-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.discord-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  min-width: 60px;
  padding: 2px 16px;
  justify-content: center;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: #4e5058;
}

.discord-button .discord-emoji {
  width: 18px;
  height: 18px;
  margin: 0;
}

.discord-button.is-primary {
  background: #5865f2;
}

.discord-button.is-success {
  background: #248046;
}

.discord-button.is-danger {
  background: #da373c;
}

/* Discord draws link buttons grey, with an arrow for "opens a website". */
.discord-button-link {
  opacity: 0.8;
}
