/* Lexy styles the editor, galleries, and .lexxy-content.
   The measure below applies everywhere. Lists, quotes, code, and links apply
   only when the rich text is not Lexy content, such as markdown. */

.rich-text {
  max-inline-size: 65ch;
  color: var(--color-ink-light);
  font-size: 1rem;
  line-height: 1.75;
}

.rich-text--small {
  font-size: 0.875rem;
}

.rich-text--large {
  font-size: 1.125rem;
}

.rich-text--full {
  max-inline-size: none;
}

.rich-text > * + * {
  margin-block-start: 1rem;
}


.rich-text:not(:has(.lexxy-content)) a {
  color: var(--color-link);
  text-decoration: underline;
}

.rich-text:not(:has(.lexxy-content)) :where(ul, ol) {
  padding-inline-start: 1.5rem;
}

.rich-text:not(:has(.lexxy-content)) ul {
  list-style: disc;
}

.rich-text:not(:has(.lexxy-content)) ol {
  list-style: decimal;
}

.rich-text:not(:has(.lexxy-content)) :where(blockquote) {
  border-inline-start: 0.25rem solid var(--color-border);
  padding-inline-start: 1rem;
  color: var(--color-ink-light);
  font-style: italic;
}

.rich-text:not(:has(.lexxy-content)) :where(pre) {
  overflow-x: auto;
  border-radius: var(--radius-md);
  background-color: var(--color-ink);
  padding: 0.875rem 1rem;
  color: var(--color-ink-inverted);
}

.youtube-embed {
  margin-block: 1rem;
}

.youtube-embed__link {
  display: block;
}

.youtube-embed__media {
  position: relative;
  cursor: pointer;
}

.youtube-embed__thumbnail {
  inline-size: 100%;
  block-size: 12rem;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: box-shadow 300ms ease;
}

.youtube-embed__link:hover .youtube-embed__thumbnail,
.youtube-embed__link:focus-visible .youtube-embed__thumbnail {
  box-shadow: var(--shadow-lg);
}

.youtube-embed__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.youtube-embed__play {
  border-radius: var(--radius-pill);
  padding: 1rem;
  background-color: rgb(var(--palette-black) / 0.7);
  transition: background-color 300ms ease;
}

.youtube-embed__link:hover .youtube-embed__play,
.youtube-embed__link:focus-visible .youtube-embed__play {
  background-color: rgb(var(--palette-black) / 0.8);
}

.youtube-embed__play-icon {
  inline-size: 2rem;
  block-size: 2rem;
  color: var(--color-ink-inverted);
}

.attachment-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.attachment-preview__placeholder {
  inline-size: 9rem;
}

.attachment-preview__actions {
  margin-block-start: 0.5rem;
}

.attachment-preview__delete {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background-color: rgb(var(--palette-red-100));
  color: rgb(var(--palette-red-700));
  padding-block: 0.25rem;
  padding-inline: 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.attachment-preview__delete:hover {
  background-color: rgb(var(--palette-red-50));
}

.attachment-preview__delete:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.attachment-preview__delete:focus-visible {
  border-color: rgb(var(--palette-red-300));
  box-shadow: 0 0 0 3px rgb(var(--palette-red-300) / 0.5);
}

.attachment-preview__delete:active {
  background-color: rgb(var(--palette-red-200));
}

.attachment-preview__delete-icon {
  inline-size: 1rem;
  block-size: 1rem;
  margin-inline-start: -0.25rem;
  margin-inline-end: 0.5rem;
}
