/**
 * editor.php — fully scoped styles (no header/search rules; header.php owns #header)
 * Every rule is under body.wp-editor-screen so global Bootstrap / css/style.css cannot leak in.
 */

body.wp-editor-screen {
  --wp-brand-dark: #056636;
  --wp-brand-mid: #27ae60;
  --wp-brand-accent: #fce268;
  --wp-brand-gradient: linear-gradient(135deg, #056636 0%, #27ae60 45%, #fce268 100%);
  --wp-brand-gradient-hover: linear-gradient(135deg, #044d2a 0%, #219a52 45%, #f5d84e 100%);
}

/* ─── Page layout ─── */
body.wp-editor-screen .wp-editor-page {
  max-width: 760px;
  margin: 0 auto 100px;
  margin-top: 12px !important;
  padding: 0 16px;
  box-sizing: border-box !important;
}

body.wp-editor-screen .wp-editor-card {
  background: var(--wp-white);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border: 1px solid #eaeaea;
  overflow: visible;
}

body.wp-editor-screen .wp-editor-card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--wp-border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--wp-white);
}

body.wp-editor-screen .wp-editor-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wp-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 16px;
}

body.wp-editor-screen .wp-editor-card-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--wp-text);
  line-height: 1.2;
}

body.wp-editor-screen .wp-editor-card-sub {
  font-size: 13px;
  color: var(--wp-muted);
  margin-top: 2px;
}

body.wp-editor-screen .wp-editor-card-body {
  padding: 22px;
}

/* ─── Form fields (scoped to editor card only) ─── */
body.wp-editor-screen .wp-editor-page .wp-ed-group {
  margin-bottom: 16px;
}

body.wp-editor-screen .wp-editor-page .wp-ed-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--wp-text);
  margin-bottom: 5px;
}

body.wp-editor-screen .wp-editor-page .wp-ed-label .req {
  color: #e74c3c;
}

body.wp-editor-screen .wp-editor-page .wp-ed-label .hint {
  font-weight: 400;
  color: var(--wp-muted);
  font-size: 12px;
}

body.wp-editor-screen .wp-editor-page .wp-ed-input,
body.wp-editor-screen .wp-editor-page .wp-ed-select,
body.wp-editor-screen .wp-editor-page .wp-ed-textarea {
  width: 100% !important;
  max-width: 100% !important;
  padding: 9px 16px !important;
  border: 1.5px solid var(--wp-border) !important;
  border-radius: 24px !important;
  font-size: 14px !important;
  color: var(--wp-text) !important;
  background: var(--wp-bg) !important;
  outline: none !important;
  font-family: inherit !important;
  transition: var(--wp-transition) !important;
  height: 38px !important;
  box-shadow: none !important;
  margin: 0 !important;
  float: none !important;
  position: static !important;
  box-sizing: border-box !important;
}

body.wp-editor-screen .wp-editor-page .wp-ed-textarea {
  border-radius: var(--wp-radius) !important;
  height: auto !important;
  min-height: 70px;
  resize: vertical;
}

body.wp-editor-screen .wp-editor-page .wp-ed-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236c757d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 34px !important;
}

body.wp-editor-screen .wp-editor-page .wp-ed-input:focus,
body.wp-editor-screen .wp-editor-page .wp-ed-select:focus,
body.wp-editor-screen .wp-editor-page .wp-ed-textarea:focus {
  border-color: var(--wp-green-light) !important;
  background: var(--wp-white) !important;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.12) !important;
}

body.wp-editor-screen .wp-editor-page .wp-ed-input::placeholder,
body.wp-editor-screen .wp-editor-page .wp-ed-textarea::placeholder {
  color: var(--wp-muted) !important;
}

body.wp-editor-screen .wp-editor-page .wp-ed-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

body.wp-editor-screen .wp-editor-page .wp-ed-row3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

@media (max-width: 600px) {
  body.wp-editor-screen .wp-editor-page .wp-ed-row2,
  body.wp-editor-screen .wp-editor-page .wp-ed-row3 {
    grid-template-columns: 1fr;
  }
}

body.wp-editor-screen .wp-editor-page .wp-ed-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 16px;
  font-size: 11px;
  font-weight: 700;
  color: var(--wp-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

body.wp-editor-screen .wp-editor-page .wp-ed-divider::before,
body.wp-editor-screen .wp-editor-page .wp-ed-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--wp-border);
}

/* ─── Cover image ─── */
body.wp-editor-screen .wp-editor-page .wp-ed-cover-zone {
  border: 2px dashed var(--wp-border);
  border-radius: var(--wp-radius);
  padding: 28px 20px;
  text-align: center;
  background: var(--wp-bg);
  cursor: pointer;
  transition: var(--wp-transition);
  position: relative;
}

body.wp-editor-screen .wp-editor-page .wp-ed-cover-zone:hover {
  border-color: var(--wp-green);
  background: var(--wp-green-pale);
}

body.wp-editor-screen .wp-editor-page .wp-ed-cover-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
}

body.wp-editor-screen .wp-editor-page .wp-ed-cover-zone .cz-icon {
  font-size: 28px;
  color: var(--wp-green);
  margin-bottom: 6px;
}

body.wp-editor-screen .wp-editor-page .wp-ed-cover-zone .cz-text {
  font-size: 14px;
  color: var(--wp-muted);
}

body.wp-editor-screen .wp-editor-page .wp-ed-cover-zone .cz-text strong {
  color: var(--wp-green);
}

body.wp-editor-screen .wp-editor-page .wp-ed-cover-preview {
  display: none;
  margin-top: 10px;
  border-radius: var(--wp-radius);
  overflow: hidden;
  border: 2px solid var(--wp-green);
  position: relative;
}

body.wp-editor-screen .wp-editor-page .wp-ed-cover-preview img {
  width: 100%;
  display: block;
  aspect-ratio: 550 / 250;
  object-fit: cover;
}

body.wp-editor-screen .wp-editor-page .wp-ed-cover-recrop {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--wp-transition);
}

body.wp-editor-screen .wp-editor-page .wp-ed-cover-recrop:hover {
  background: var(--wp-green);
}

/* ─── CKEditor ─── */
body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck-editor__editable {
  min-height: 280px;
  font-size: 15px;
  line-height: 1.7;
}

body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck-toolbar,
body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck.ck-toolbar,
body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck-sticky-panel__content.ck-sticky-panel__content_sticky {
  top: var(--wp-header-h, 64px) !important;
  z-index: 1200;
  background: var(--wp-white) !important;
  border-color: var(--wp-border) !important;
  border-radius: var(--wp-radius) var(--wp-radius) 0 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* CKEditor branding — hide inside wrap AND anywhere on editor screen (balloon may sit outside wrap) */
body.wp-editor-screen .ck-powered-by,
body.wp-editor-screen .ck.ck-powered-by,
body.wp-editor-screen .ck-powered-by-balloon,
body.wp-editor-screen a.ck-powered-by,
body.wp-editor-screen a[href*="ckeditor.com"][class*="powered"],
body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck-powered-by,
body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck.ck-powered-by,
body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck-powered-by-balloon {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  position: absolute !important;
  left: -9999px !important;
}

body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck-editor__main > .ck-editor__editable {
  border-color: var(--wp-border) !important;
  border-radius: 0 0 var(--wp-radius) var(--wp-radius) !important;
}

body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck-editor__main > .ck-editor__editable.ck-focused {
  border-color: var(--wp-green-light) !important;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.12) !important;
}

/* Code blocks inside the editor surface */
body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck-content pre,
body.wp-peditor-screen .wp-editor-page .wp-ck-wrap .ck-content pre {
  background: #f4f8f6;
  border: 1px solid #dce8e2;
  border-left: 4px solid var(--wp-brand-mid, #27ae60);
  border-radius: 8px;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  color: #1e2d28;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck-content pre code,
body.wp-peditor-screen .wp-editor-page .wp-ck-wrap .ck-content pre code {
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ─── Tags ─── */
body.wp-editor-screen .wp-editor-page .wp-ed-tag-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--wp-border);
  border-radius: 24px;
  background: var(--wp-bg);
  min-height: 42px;
  cursor: text;
  transition: var(--wp-transition);
}

body.wp-editor-screen .wp-editor-page .wp-ed-tag-container:focus-within {
  border-color: var(--wp-green-light);
  background: var(--wp-white);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.12);
}

body.wp-editor-screen .wp-editor-page .wp-ed-tag-input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 14px !important;
  color: var(--wp-text) !important;
  flex: 1;
  min-width: 80px;
  height: 26px !important;
  font-family: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.wp-editor-screen .wp-editor-page .wp-ed-tag-input::placeholder {
  color: var(--wp-muted);
}

body.wp-editor-screen .wp-editor-page .wp-ed-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--wp-brand-gradient);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  animation: wpEdTagSlideIn 0.18s ease-out;
  user-select: none;
}

@keyframes wpEdTagSlideIn {
  from { opacity: 0; transform: scale(0.82) translateY(2px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

body.wp-editor-screen .wp-editor-page .wp-ed-tag-pill .tag-remove {
  cursor: pointer;
  font-size: 15px;
  opacity: 0.75;
  line-height: 1;
  transition: opacity 0.15s, transform 0.15s;
  margin-left: 2px;
  flex-shrink: 0;
}

body.wp-editor-screen .wp-editor-page .wp-ed-tag-pill .tag-remove:hover {
  opacity: 1;
  transform: scale(1.2);
}

/* ─── SEO keyword pills ─── */
body.wp-editor-screen .wp-editor-page .wp-ed-kw-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1.5px solid var(--wp-border);
  border-radius: 24px;
  background: var(--wp-bg);
  min-height: 42px;
  cursor: text;
  transition: var(--wp-transition);
}

body.wp-editor-screen .wp-editor-page .wp-ed-kw-container:focus-within {
  border-color: var(--wp-green-light);
  background: var(--wp-white);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.12);
}

body.wp-editor-screen .wp-editor-page .wp-ed-kw-input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 14px !important;
  color: var(--wp-text) !important;
  flex: 1;
  min-width: 100px;
  height: 26px !important;
  font-family: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

body.wp-editor-screen .wp-editor-page .wp-ed-kw-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 14px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--wp-green);
  color: #fff;
  white-space: nowrap;
  user-select: none;
}

body.wp-editor-screen .wp-editor-page .wp-ed-kw-pill .kw-remove {
  cursor: pointer;
  font-size: 15px;
  opacity: 0.8;
  line-height: 1;
}

body.wp-editor-screen .wp-editor-page .wp-ed-meta-box {
  background: var(--wp-green-pale);
  border: 1px solid #c3e6cb;
  border-radius: var(--wp-radius);
  padding: 16px 18px;
}

/* ─── Footer ─── */
body.wp-editor-screen .wp-editor-page .wp-editor-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--wp-border);
  background: var(--wp-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

body.wp-editor-screen .wp-editor-page .wp-editor-footer .hint {
  font-size: 12px;
  color: var(--wp-muted);
}

body.wp-editor-screen .wp-editor-page .wp-ed-publish {
  height: 38px;
  padding: 0 24px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.22s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--wp-brand-gradient);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  text-decoration: none;
  letter-spacing: 0.2px;
}

body.wp-editor-screen .wp-editor-page .wp-ed-publish:hover {
  background: var(--wp-brand-gradient-hover);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(5, 102, 54, 0.35);
  color: #fff;
  text-decoration: none;
}

body.wp-editor-screen .wp-editor-page .wp-ed-publish--signin {
  animation: wpEdSigninPulse 2.2s ease-in-out infinite;
}

@keyframes wpEdSigninPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(5, 102, 54, 0.18); }
  50% { box-shadow: 0 4px 18px rgba(5, 102, 54, 0.44); }
}

/* ─── Modals (editor-only overlays) ─── */
body.wp-editor-screen .wp-crop-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2147483645;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.wp-editor-screen .wp-crop-overlay.active {
  display: flex;
}

body.wp-editor-screen .wp-crop-box {
  background: var(--wp-white);
  border-radius: 12px;
  max-width: 660px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

body.wp-editor-screen .wp-crop-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--wp-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: var(--wp-text);
}

body.wp-editor-screen .wp-crop-header span {
  color: var(--wp-green);
  font-weight: 600;
}

body.wp-editor-screen .wp-crop-close {
  background: none;
  border: none;
  color: var(--wp-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 0;
}

body.wp-editor-screen .wp-crop-close:hover {
  color: var(--wp-text);
}

body.wp-editor-screen .wp-crop-canvas {
  background: #000;
  max-height: 380px;
  overflow: hidden;
}

body.wp-editor-screen .wp-crop-canvas img {
  max-width: 100%;
  display: block;
}

body.wp-editor-screen .wp-crop-footer {
  padding: 12px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--wp-border);
}

body.wp-editor-screen .wp-crop-cancel {
  height: 36px;
  padding: 0 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: 1.5px solid var(--wp-border);
  color: var(--wp-muted);
  cursor: pointer;
  transition: var(--wp-transition);
}

body.wp-editor-screen .wp-crop-cancel:hover {
  border-color: var(--wp-green);
  color: var(--wp-green);
  background: var(--wp-green-pale);
}

body.wp-editor-screen .wp-crop-apply {
  height: 36px;
  padding: 0 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--wp-green);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: var(--wp-transition);
}

body.wp-editor-screen .wp-crop-apply:hover {
  background: var(--wp-green-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

body.wp-editor-screen .wp-success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 2147483647;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

body.wp-editor-screen .wp-success-overlay.active {
  display: flex;
}

body.wp-editor-screen .wp-success-box {
  background: var(--wp-white);
  border-radius: 12px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
  text-align: center;
  padding: 30px 24px;
  animation: wpEdModalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes wpEdModalPop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

body.wp-editor-screen .wp-success-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--wp-green-pale);
  color: var(--wp-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 14px;
}

body.wp-editor-screen .wp-success-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--wp-text);
  margin-bottom: 6px;
}

body.wp-editor-screen .wp-success-text {
  font-size: 14px;
  color: var(--wp-muted);
  margin-bottom: 22px;
  line-height: 1.4;
}

body.wp-editor-screen .wp-success-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

body.wp-editor-screen .wp-btn-continue {
  height: 38px;
  padding: 0 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: 1.5px solid var(--wp-border);
  color: var(--wp-muted);
  cursor: pointer;
  transition: var(--wp-transition);
}

body.wp-editor-screen .wp-btn-continue:hover {
  border-color: var(--wp-green);
  color: var(--wp-green);
  background: var(--wp-green-pale);
}

body.wp-editor-screen .wp-btn-view {
  height: 38px;
  padding: 0 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  background: var(--wp-brand-gradient);
  color: #fff !important;
  border: none;
  cursor: pointer;
  transition: var(--wp-transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

body.wp-editor-screen .wp-btn-view:hover {
  background: var(--wp-brand-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 102, 54, 0.2);
  color: #fff;
}

body.wp-editor-screen .wp-success-icon--error {
  background: #fdf2f2 !important;
  color: #c0392b !important;
}

body.wp-editor-screen .wp-success-icon--warn {
  background: #fff8e6 !important;
  color: #d68910 !important;
}

body.wp-editor-screen .wp-btn-leave {
  background: #e74c3c !important;
  text-shadow: none !important;
}

body.wp-editor-screen .wp-btn-leave:hover {
  background: #c0392b !important;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.35) !important;
}

/* ─── Mobile layout ─── */
@media (max-width: 768px) {
  body.wp-editor-screen .wp-editor-page {
    margin-top: 8px !important;
    margin-bottom: calc(var(--wp-mobile-h, 60px) + 28px);
    padding: 0 10px;
  }

  body.wp-editor-screen .wp-editor-card-header {
    padding: 14px 16px;
    gap: 10px;
  }

  body.wp-editor-screen .wp-editor-card-title {
    font-size: 16px;
  }

  body.wp-editor-screen .wp-editor-card-body {
    padding: 16px 14px;
  }

  body.wp-editor-screen .wp-editor-page .wp-editor-footer {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 14px 16px;
  }

  body.wp-editor-screen .wp-editor-page .wp-ed-publish {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  body.wp-editor-screen .wp-editor-page .wp-ed-input,
  body.wp-editor-screen .wp-editor-page .wp-ed-select,
  body.wp-editor-screen .wp-editor-page .wp-ed-textarea {
    font-size: 16px !important;
  }

  body.wp-editor-screen .wp-editor-page .wp-ck-wrap .ck-editor__editable {
    min-height: 200px;
  }

  body.wp-editor-screen .wp-success-box,
  body.wp-editor-screen .wp-crop-box {
    max-width: calc(100vw - 24px);
    margin: 0 auto;
  }

  body.wp-editor-screen .wp-success-buttons {
    flex-direction: column;
    width: 100%;
  }

  body.wp-editor-screen .wp-success-buttons .wp-btn-continue,
  body.wp-editor-screen .wp-success-buttons .wp-btn-view {
    width: 100%;
    min-height: 44px;
  }

  body.wp-editor-screen .wp-crop-canvas {
    max-height: 50vh;
  }
}

/* ─── Publish / update progress overlay (editor.php & peditor.php) ─── */
.wp-publish-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: rgba(4, 40, 22, 0.78);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.wp-publish-overlay.active {
  display: flex;
}

body.wp-publish-locked {
  overflow: hidden;
}

.wp-publish-panel {
  width: min(420px, calc(100vw - 32px));
  background: var(--wp-white, #fff);
  border-radius: 14px;
  padding: 32px 28px 28px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  animation: wpEdModalPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.wp-publish-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--wp-green-pale, #e8f8ef);
  color: var(--wp-green, #27ae60);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.wp-publish-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--wp-text, #1a1a1a);
  margin-bottom: 8px;
}

.wp-publish-status {
  font-size: 14px;
  color: var(--wp-muted, #6b7280);
  margin-bottom: 22px;
  min-height: 1.4em;
  transition: opacity 0.2s ease;
}

.wp-publish-bar {
  height: 6px;
  border-radius: 999px;
  background: #e8ece9;
  overflow: hidden;
}

.wp-publish-bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #056636 0%, #27ae60 55%, #2ecc71 100%);
  transition: width 0.35s ease;
}

@media (max-width: 768px) {
  .wp-publish-panel {
    padding: 28px 22px 24px;
  }

  .wp-publish-title {
    font-size: 17px;
  }
}