/* ── Editor wrapper ──────────────────────────────────────────────── */
.bk-editor-wrapper {
  border: 1px solid #ced4da;
  border-radius: 8px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Top bar ─────────────────────────────────────────────────────── */
.bk-editor-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}

.bk-editor-topbar-left,
.bk-editor-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bk-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  cursor: pointer;
}

.bk-select {
  padding: 5px 10px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  font-size: 13px;
  background: #fff;
  color: #333;
  cursor: pointer;
  max-width: 260px;
}
.bk-select:focus {
  outline: 2px solid #4a90e2;
  border-color: #4a90e2;
}

.bk-wordcount {
  font-size: 12px;
  color: #888;
  background: #e9ecef;
  padding: 4px 10px;
  border-radius: 12px;
}

.bk-btn-html {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1.5px solid #4a90e2;
  border-radius: 5px;
  background: #fff;
  color: #4a90e2;
  cursor: pointer;
  transition: all 0.2s;
}
.bk-btn-html:hover {
  background: #4a90e2;
  color: #fff;
}
.bk-btn-html.active {
  background: #4a90e2;
  color: #fff;
}

/* ── CKEditor overrides ──────────────────────────────────────────── */
.bk-editor-wrapper .ck-editor__editable {
  min-height: 520px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.8;
  color: #222;
  padding: 20px 28px;
}

.bk-editor-wrapper .ck-editor__editable h1 { font-size: 2rem;   margin: 24px 0 12px; }
.bk-editor-wrapper .ck-editor__editable h2 { font-size: 1.5rem; margin: 20px 0 10px; }
.bk-editor-wrapper .ck-editor__editable h3 { font-size: 1.25rem;margin: 16px 0 8px; }
.bk-editor-wrapper .ck-editor__editable blockquote {
  border-left: 4px solid #e67e22;
  margin: 16px 0;
  padding: 12px 20px;
  background: #fffbea;
  color: #666;
  font-style: italic;
}
.bk-editor-wrapper .ck-editor__editable figure.image {
  margin: 16px 0;
}
.bk-editor-wrapper .ck-editor__editable figure.image img {
  max-width: 100%;
  border-radius: 6px;
}
.bk-editor-wrapper .ck-editor__editable table {
  border-collapse: collapse;
  width: 100%;
}
.bk-editor-wrapper .ck-editor__editable table td,
.bk-editor-wrapper .ck-editor__editable table th {
  border: 1px solid #ddd;
  padding: 8px 12px;
}
.bk-editor-wrapper .ck-editor__editable table th {
  background: #f0f4f8;
  font-weight: 600;
}

.bk-editor-wrapper .ck.ck-toolbar {
  border-radius: 0 !important;
  border-left: none;
  border-right: none;
  border-top: none;
  background: #fff;
  padding: 4px 8px;
}

/* ── Raw HTML textarea ───────────────────────────────────────────── */
.bk-html-editor {
  display: flex;
  flex-direction: column;
  background: #1e1e2e;
}

.bk-html-editor-header {
  padding: 8px 16px;
  font-size: 12px;
  color: #a0aec0;
  background: #2d2d44;
  border-bottom: 1px solid #3d3d5c;
  font-family: monospace;
}

.bk-html-textarea {
  width: 100%;
  min-height: 560px;
  padding: 20px;
  font-family: "Fira Code", "Cascadia Code", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #cdd6f4;
  background: #1e1e2e;
  border: none;
  outline: none;
  resize: vertical;
  tab-size: 2;
  box-sizing: border-box;
}
.bk-html-textarea::selection {
  background: #3d5a80;
}

/* ── Blog modal — sticky footer buttons ─────────────────────────── */

/* Make the modal body scroll so the footer never gets pushed off screen */
.modal.show .modal-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 56px);
}

.modal.show .modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 56px);
  overflow: hidden;
}

.modal.show .modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
}

/* Footer always sticks to the bottom, never scrolls away */
.modal.show .modal-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 2px solid #dee2e6;
  padding: 12px 16px;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}

/* Button styling inside the modal footer */
.modal.show .modal-footer .btn {
  min-width: 100px;
  font-weight: 600;
}

/* ── Full screen modal ───────────────────────────────────────────── */
.modal.show .modal-dialog {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  max-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

.modal.show .modal-content {
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
}

.modal.show .modal-body {
  overflow-y: auto;
  flex: 1 1 auto;
}

.modal.show .modal-footer {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 2px solid #dee2e6;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}
