html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.content-editor {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  overflow: hidden;
}

.content-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
}

.content-editor__surface {
  min-height: 220px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow-y: auto;
}

.content-editor__surface:focus {
  box-shadow: none;
}

.content-editor__surface p,
.content-editor__surface ul,
.content-editor__surface ol,
.content-editor__surface blockquote {
  margin-bottom: 0.75rem;
}

.content-editor__surface :last-child {
  margin-bottom: 0;
}

.content-editor__textarea {
  display: none;
}

.content-editor__hint {
  padding: 0.5rem 0.75rem;
  border-top: 1px solid #dee2e6;
  background: #ffffff;
}

.content-editor--plain {
  border: 0;
  overflow: visible;
}

.content-editor--plain .content-editor__toolbar,
.content-editor--plain .content-editor__surface {
  display: none;
}

.content-settings [hidden],
.media-picker[hidden] {
  display: none !important;
}

.media-picker {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #ffffff;
}

.media-picker__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem;
  border-bottom: 1px solid #dee2e6;
}

.media-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  padding: 0.75rem;
}

.media-picker__empty {
  padding: 0.75rem;
}

.media-picker__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 72px;
  padding: 0.75rem;
  text-align: left;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #f8f9fa;
}

.media-picker__item small {
  color: #6c757d;
}

.content-live-preview__surface {
  min-height: 140px;
  padding: 1rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #fbfbfb;
}

.preview-block h3 {
  margin-top: 0;
}

.preview-block img,
.content-editor__surface img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.75rem 0;
  border-radius: 0.375rem;
}

.preview-block a {
  display: inline-flex;
  margin-top: 0.75rem;
  font-weight: 700;
}

.preview-block footer {
  margin-top: 0.75rem;
  color: #6c757d;
}

.content-checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.content-checklist__item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid #dee2e6;
  background: #f8f9fa;
}

.content-checklist__item--done {
  border-color: #badbcc;
  color: #0f5132;
  background: #d1e7dd;
}

.content-checklist__item--warning {
  border-color: #ffecb5;
  color: #664d03;
  background: #fff3cd;
}

.cms-preview {
  max-width: 960px;
  margin: 0 auto 4rem;
}

.cms-preview__hero,
.cms-preview__block {
  padding: 2rem 0;
  border-bottom: 1px solid #dee2e6;
}

.cms-preview__hero h2 {
  font-size: 2.5rem;
}

.cms-preview__block img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.cms-preview__image-text {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 1.5rem;
  align-items: start;
}

.cms-preview__image-text--reverse {
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
}

.cms-preview__image-text--reverse img {
  order: 2;
}

.media-thumb {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #f8f9fa;
}

.media-current {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #f8f9fa;
}

.media-current code {
  white-space: normal;
  word-break: break-all;
}

@media (max-width: 720px) {
  .cms-preview__image-text,
  .cms-preview__image-text--reverse {
    grid-template-columns: 1fr;
  }

  .cms-preview__image-text--reverse img {
    order: 0;
  }
}
