.post .cover-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.post section img {
  display: block;
  width: 100%;
  height: auto;
}

.post article {
  font-size: clamp(1rem, 2.5vw, 1.0625rem);
}

body.blog-has-tokens .post article {
  font-family: var(--blog-body-font);
}

body.blog-has-tokens .post h1 {
  font-family: var(--blog-heading-font);
}

.post h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.1;
}

.post a,
.post button,
.post .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.post .header-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.youtube-embed-lazy .youtube-embed-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

.share-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem;
}

.post-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 4rem);
  overflow: hidden;
}

body.post-editor-page {
  overflow: hidden;
}

body.post-editor-page main.container-fluid {
  --bs-gutter-x: 0;
  padding-inline: 0;
  max-width: none;
}

body.post-editor-page #flash .alert {
  margin: 0.75rem 1rem 0;
}

.post-layout--with-sidebar {
  width: 100%;
  height: 100dvh;
}

.post-scrollable {
  flex: 1;
  overflow-y: auto;
}

.post-editor-form {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.post-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17.5rem;
  flex: 1;
  min-height: 0;
}

.post-editor-main {
  min-width: 0;
  overflow-y: auto;
  padding: 1rem 1.25rem 1.5rem;
}

.post-editor-title {
  font-weight: 650;
  letter-spacing: -0.03em;
  border: 0;
  box-shadow: none;
  padding-inline: 0;
}

.post-editor-title:focus {
  box-shadow: none;
  border-color: transparent;
}

.post-editor-sidebar {
  min-height: 0;
  background-color: var(--bs-tertiary-bg) !important;
  border-left: 1px solid var(--bs-border-color) !important;
}

.post-editor-sidebar .offcanvas-body {
  display: flex;
  flex-direction: column;
}

.post-editor-section {
  padding: 0.85rem 1rem;
  margin: 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.post-editor-section:last-of-type {
  flex: 1;
  border-bottom: 0;
}

.post-editor-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
  margin-bottom: 0.5rem;
}

.post-editor-section .form-label {
  font-size: 0.75rem;
  margin-bottom: 0.15rem;
}

.post-editor-section .form-text {
  font-size: 0.7rem;
}

.post-editor-cover img {
  width: 100%;
  max-height: 7.5rem;
  object-fit: cover;
}

.post-editor-seo-preview {
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
}

.post-editor-seo-preview-url {
  font-size: 0.7rem;
  color: var(--bs-secondary-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-editor-seo-preview-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1a0dab;
  line-height: 1.3;
}

.post-editor-seo-preview-description {
  font-size: 0.7rem;
  color: var(--bs-secondary-color);
  line-height: 1.35;
}

[data-bs-theme="dark"] .post-editor-seo-preview-title {
  color: #8ab4f8;
}

.post-editor-actions {
  position: sticky;
  bottom: 0;
  padding: 0.85rem 1rem 1rem;
  margin-top: auto;
  background: var(--bs-tertiary-bg);
  border-top: 1px solid var(--bs-border-color);
}

.post-layout lexxy-toolbar {
  position: sticky;
  top: 0;
}

.lexxy-editor-shell {
  position: relative;
  min-height: 16rem;
}

.lexxy-editor-shell lexxy-editor:not(:defined) {
  display: none;
}

.lexxy-editor-shell:has(lexxy-editor:defined) .lexxy-editor-skeleton {
  display: none;
}

.lexxy-editor-skeleton {
  min-height: 16rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
  overflow: hidden;
}

.lexxy-editor-skeleton-toolbar {
  height: 2.75rem;
  border-bottom: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}

.lexxy-editor-skeleton-body {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  color: var(--bs-secondary-color);
}

.post-editor-mode-bar .form-text {
  max-width: 28rem;
}

.post-editor-markdown {
  min-height: 16rem;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
}

.is-markdown-mode .lexxy-editor-shell {
  display: none;
}

@media (max-width: 576px) {
  .post .cover-image {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .post footer .row {
    row-gap: 1rem;
  }

  .post footer .col {
    flex: 0 0 100%;
  }

  .post footer .justify-content-end {
    justify-content: flex-start !important;
  }

  .post-layout,
  body.post-editor-page .post-layout--with-sidebar {
    min-height: calc(100dvh - 4rem);
    height: auto;
  }

  body.post-editor-page {
    overflow: auto;
  }

  .post-scrollable,
  .post-editor-main {
    overflow-y: visible;
  }

  .post-layout footer {
    position: sticky;
    bottom: 0;
    background: var(--bs-body-bg);
    z-index: 10;
  }
}

@media (min-width: 992px) {
  .post-editor-sidebar.offcanvas-lg {
    width: 17.5rem !important;
    height: 100%;
    max-height: 100%;
    visibility: visible !important;
    overflow: hidden;
  }

  .post-editor-sidebar.offcanvas-lg .offcanvas-body {
    padding: 0;
    height: 100%;
    overflow-y: auto;
    background-color: var(--bs-tertiary-bg) !important;
  }
}

@media (max-width: 991.98px) {
  .post-editor-grid {
    grid-template-columns: 1fr;
  }

  .post-editor-sidebar.offcanvas-lg {
    background-color: var(--bs-body-bg) !important;
  }

  .post-editor-actions {
    background: var(--bs-body-bg);
  }
}