/* Post editor: a borderless Trix canvas with a toolbar pinned while scrolling. */

.post-editor trix-toolbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 0 -0.5rem 1rem;
  padding: 0.75rem 0.5rem 0.25rem;
  background: white;
  border-bottom: 1px solid #e2e8f0;
}

.post-editor trix-toolbar .trix-button-group {
  border-color: #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
}

.post-editor trix-toolbar .trix-button {
  border-bottom: 0;
}

.post-editor trix-editor {
  min-height: 24rem;
  border: 0;
  padding: 0;
  font-size: 1.0625rem;
}

.post-editor trix-editor:empty:not(:focus)::before {
  color: #94a3b8;
}

/* Block editor (Editor.js): let blocks use the full card width. */

.block-editor .ce-block__content,
.block-editor .ce-toolbar__content {
  max-width: none;
}

.block-editor .codex-editor__redactor {
  padding-bottom: 12rem !important;
}

.block-editor .ce-paragraph,
.block-editor .ce-header {
  margin: 0;
}

.block-editor .ce-block + .ce-block {
  margin-top: 0.5rem;
}

/* Video block */

.video-tool__player {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 0.75rem;
  background: #000;
}

.video-tool__player--embed {
  aspect-ratio: 16 / 9;
}

.video-tool__caption {
  margin-top: 0.5rem;
  padding: 0.375rem 0.625rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
  outline: none;
}

.video-tool__caption:empty::before {
  content: attr(data-placeholder);
  color: #94a3b8;
}

.video-tool__picker {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.video-tool__upload {
  justify-self: start;
  padding: 0.5rem 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  background: white;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
}

.video-tool__upload:hover {
  background: #f1f5f9;
}

.video-tool__link {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.625rem;
  background: white;
  font-size: 0.875rem;
}

.video-tool__status:not(:empty) {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
}
