:root{
  --sfpm-text: #0b1220;
  --sfpm-muted: #52606d;

  --sfpm-red-900: #3b0a0a;
  --sfpm-red-800: #5b0f0f;
  --sfpm-red-700: #991b1b;
  --sfpm-red-600: #dc2626;

  --sfpm-panel: #ffffff;
  --sfpm-border: rgba(11,18,32,0.18);
  --sfpm-border-2: rgba(11,18,32,0.14);

  --sfpm-radius: 13.5px;
  --sfpm-shadow: 0 22px 60px rgba(2,6,23,0.32);
  --sfpm-shadow-soft: 0 10px 25px rgba(2,6,23,0.14);

  --sfpm-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --sfpm-logo-url: url("/wp-content/uploads/logo_i.gif");

  --sfpm-accent-warm: #f59e0b;
  --sfpm-danger: #b91c1c;
}


/* ===== Header buttons ===== */
.sfpm-bhpm-login-open-btn,
.sfpm-bhpm-open-btn,
.sfpm-bhpm-logout-btn{
  font-family: var(--sfpm-font);
  border: 1px solid rgba(153,27,27,0.35);
  padding: 5px 9px;
  cursor: pointer;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(153,27,27,0.92), rgba(91,15,15,0.92));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1px;
  text-shadow: 0 1px 0 rgba(0,0,0,0.18);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sfpm-bhpm-login-open-btn:hover,
.sfpm-bhpm-open-btn:hover,
.sfpm-bhpm-logout-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 12px 22px rgba(153,27,27,0.20);
}
.sfpm-bhpm-login-open-btn:active,
.sfpm-bhpm-open-btn:active,
.sfpm-bhpm-logout-btn:active{
  transform: translateY(0);
}
.sfpm-bhpm-logout-btn{ margin-left: 6px; }

/* ===== Modal wrapper ===== */
.sfpm-bhpm-modal{ display:none; font-family: var(--sfpm-font); }
.sfpm-bhpm-modal.is-open{
  display:flex;
  position: fixed;
  inset: 0;
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.sfpm-bhpm-backdrop{
  position:absolute; inset:0;
  background:
    radial-gradient(1000px 700px at 20% 30%, rgba(153,27,27,0.16), transparent 60%),
    rgba(2,6,23,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.sfpm-bhpm-panel{
  position: relative;
  margin: 0;
  width: min(1040px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  background: var(--sfpm-panel);
  border-radius: var(--sfpm-radius);
  overflow: hidden;
  box-shadow: var(--sfpm-shadow);
  border: 1px solid rgba(255,255,255,0.14);
  transform: translateY(10px) scale(0.985);
  opacity: 0;
  animation: sfpmPop .18s ease forwards;

  display:flex;
  flex-direction: column;
}
@keyframes sfpmPop{ to{ transform: translateY(0) scale(1); opacity: 1; } }

.sfpm-bhpm-login-modal .sfpm-bhpm-panel{
  width: min(400px, calc(100% - 32px));
}

/* ===== Header ===== */
.sfpm-bhpm-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(135deg, rgba(153,27,27,0.96), rgba(91,15,15,0.92));
}
.sfpm-bhpm-title{
  display:flex;
  align-items:center;
  gap: 12px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .1px;
}
.sfpm-bhpm-title::before{
  content:"";
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--sfpm-logo-url) center/70% no-repeat, rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.26);
  box-shadow: 0 10px 18px rgba(0,0,0,.16);
}
.sfpm-bhpm-header-actions{
  display:flex;
  gap: 10px;
  align-items:center;
}
.sfpm-bhpm-wpbadge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.20);
}
.sfpm-bhpm-wpbadge .dashicons{
  color: #fff;
  font-size: 20px;
  width: 20px;
  height: 20px;
}
.sfpm-bhpm-close-btn{
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.18);
  width: 38px; height: 38px;
  border-radius: 9px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  transition: transform .12s ease, background .12s ease;
}
.sfpm-bhpm-close-btn:hover{ background: rgba(255,255,255,0.22); transform: translateY(-1px); }
.sfpm-bhpm-close-btn:active{ transform: translateY(0); }
.sfpm-bhpm-new-btn{
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.14);
  color: #fff;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* ===== Body ===== */
.sfpm-bhpm-body{
  padding: 14px;
  background: #d1eef4;
  overflow:auto;
  flex: 1 1 auto;
}
.sfpm-bhpm-field{ margin: 12px 0; }
.sfpm-bhpm-field label{
  display:block;
  font-weight: 600;
  color: var(--sfpm-text);
  margin-bottom: 7px;
  margin-left. 5px;
  font-size: 14px;
}
.sfpm-bhpm-help{
  color: var(--sfpm-muted);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.35;
}

/* Inputs */
.sfpm-bhpm-body input[type="text"],
.sfpm-bhpm-body input[type="password"],
.sfpm-bhpm-body input[type="search"],
.sfpm-bhpm-body select{
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--sfpm-border);
  border-radius: 9px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.97);
  color: var(--sfpm-text);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.sfpm-bhpm-body input:focus,
.sfpm-bhpm-body select:focus{
  border-color: rgba(153,27,27,0.55);
  box-shadow: 0 0 0 4px rgba(153,27,27,0.14);
}

/* PASSWORD TOGGLE */
.sfpm-bhpm-pass-wrap{ position: relative; }
.sfpm-bhpm-pass-wrap input[type="password"],
.sfpm-bhpm-pass-wrap input[type="text"]{ padding-right: 44px; }
.sfpm-bhpm-pass-toggle{
  position:absolute;
  right: 8px;
  width: 34px;
  height: 34px;
  top: 2px;
  border-radius: 7.5px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.2);
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 8px 14px rgba(2,6,23,0.06);
}
.sfpm-bhpm-pass-toggle svg{ width: 18px; height: 18px; fill: rgba(91,15,15,0.85); }

/* Buttons */
.sfpm-bhpm-body button{
  font-family: var(--sfpm-font);
  font-weight: 600;
}
.sfpm-bhpm-body button:not(.sfpm-bhpm-close-btn):not(.sfpm-bhpm-new-btn){
  border: 1px solid var(--sfpm-border);
  background: #e7e7e7;
  padding: 9px 12px;
  border-radius: 9px;
  cursor: pointer;
  color: #0f172a;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-shadow: 0 8px 16px rgba(2,6,23,0.06);
}
.sfpm-bhpm-body button:hover{
  transform: translateY(-1px);
  border-color: rgba(15,23,42,0.14);
  box-shadow: 0 12px 22px rgba(2,6,23,0.10);
}

/* Toolbar */
.sfpm-bhpm-toolbar{
  display:flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items:center;
  flex-wrap: wrap;
}
.sfpm-bhpm-search{ flex: 1 1 260px; min-width: 220px; }

.sfpm-bhpm-sort-wrap{
  display:flex;
  align-items:center;
  gap: 8px;
  flex: 0 0 auto;
}
.sfpm-bhpm-sort-label{
  font-size: 12px;
  color: var(--sfpm-muted);
  font-weight: 600;
  white-space: nowrap;
}
.sfpm-bhpm-sort-by,
.sfpm-bhpm-sort-dir{
  width: auto !important;
  min-width: 140px;
}

/* List cards */
.sfpm-bhpm-list{ display:flex; flex-direction: column; gap: 12px; }
.sfpm-bhpm-item{
  border: 1px solid var(--sfpm-border-2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.94);
  box-shadow: var(--sfpm-shadow-soft);
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
}
.sfpm-bhpm-item-title{ font-weight: 700; color: #0b1220; }
.sfpm-bhpm-item-meta{ color: var(--sfpm-muted); font-size: 12px; }
.sfpm-bhpm-item-actions{ display:flex; gap: 8px; align-items:center; justify-content:flex-end; }
.sfpm-bhpm-item-langs{ grid-column: 1 / -1; display:flex; flex-wrap: wrap; gap: 8px; }

/* indentation for hierarchical pages */
.sfpm-bhpm-item-title-indent{
  padding-left: var(--sfpm-indent, 0px);
  position: relative;
}
.sfpm-bhpm-item-title-indent::before{
  content:"";
  display:block;
  position:absolute;
  left: calc(var(--sfpm-indent, 0px) - 10px);
  top: 50%;
  width: 6px;
  height: 1px;
  background: rgba(15,23,42,0.18);
  transform: translateY(-50%);
}
.sfpm-bhpm-item[style*="--sfpm-indent:0px"] .sfpm-bhpm-item-title-indent::before{
  display:none;
}

.sfpm-bhpm-lang-chip{
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.75);
  color: #0f172a;
}
.sfpm-bhpm-lang-missing{ border-color: rgba(153,27,27,0.35); background: rgba(255,0,0,0.20); }
.sfpm-bhpm-lang-draft{ border-color: rgba(245,158,11,0.40); background: rgba(245,158,11,0.20); }
.sfpm-bhpm-lang-publish{ border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.20); }

/* Editor layout */
.sfpm-bhpm-grid{
  display:grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 12px;
  align-items:start;
}
@media (max-width: 860px){ .sfpm-bhpm-grid{ grid-template-columns: 1fr; } }

/* Featured preview */
.sfpm-bhpm-featured-preview{
  border: 1px dashed rgba(15,23,42,0.18);
  border-radius: 10.5px;
  padding: 10px;
  background: rgba(255,255,255,0.72);
  min-height: 110px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.sfpm-bhpm-featured-preview img{ max-width: 100%; height: auto; border-radius: 9px; }
.sfpm-bhpm-placeholder{ color: var(--sfpm-muted); font-size: 13px; }

/* Tabs */
.sfpm-bhpm-lang-tabs,
.sfpm-bhpm-mode-tabs,
.sfpm-bhpm-section-tabs{
  display:flex;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.85);
  box-shadow: 0 10px 18px rgba(2,6,23,0.05);
  flex-wrap: wrap;
}
.sfpm-bhpm-section-tabs{ margin-top: -4px; }

.sfpm-bhpm-tab{
  border: 1px solid rgba(15,23,42,0.12) !important;
  background: #fff !important;
  padding: 8px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700 !important;
  letter-spacing: .1px;
  color: #0f172a !important;
  box-shadow: 0 8px 14px rgba(2,6,23,0.05);
}
.sfpm-bhpm-tab.is-active{
  background: rgba(255,255,0,0.2) !important;
  border-color: rgba(0,0,0,0.5) !important;
  color: var(--sfpm-red-800) !important;
}

/* Context pill */
.sfpm-bhpm-context-row{ margin: 6px 0 10px; }
.sfpm-bhpm-context-pill{
  display:inline-flex;
  align-items:center;
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid rgba(153,27,27,0.25);
  background: rgba(153,27,27,0.08);
  color: var(--sfpm-red-800);
  font-size: 12px;
  font-weight: 600;
}

/* Actions */
.sfpm-bhpm-actions{
  display:flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,0.08);
}
.sfpm-bhpm-actions-right{ display:flex; gap: 10px; align-items:center; }
.sfpm-bhpm-save-btn{
  border: 1px solid rgba(153,27,27,0.25) !important;
  background: linear-gradient(180deg, rgba(153,27,27,0.96), rgba(91,15,15,0.92)) !important;
  color: #fff !important;
}

/* Status message */
.sfpm-bhpm-msg{
  margin-top: 10px;
  font-size: 13px;
  color: #0f172a;
  padding: 10px 12px;
  border-radius: 10.5px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(255,255,255,0.82);
}

/* Login form */
.sfpm-bhpm-login-form p{ margin: 10px 0; }
.sfpm-bhpm-login-form label{
  display:block;
  font-size: 12px;
  font-weight: 500;
  color: var(--sfpm-text);
  margin-bottom: 6px;
}
.sfpm-bhpm-login-form input[type="submit"]{
  border: 1px solid rgba(153,27,27,0.25);
  background: linear-gradient(180deg, rgba(153,27,27,0.96), rgba(91,15,15,0.92));
  color: #fff;
  padding: 9px 14px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* WP editor container */
.sfpm-bhpm-editor-wrap{
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 18px rgba(2,6,23,0.05);
  background: rgba(255,255,255,0.88);
}

/* Hide buttons under 1000px */
@media (max-width: 1000px){
  .sfpm-bhpm-header-widget,
  .sfpm-bhpm-login-open-btn,
  .sfpm-bhpm-open-btn,
  .sfpm-bhpm-logout-btn{
    display: none !important;
  }
}

/* ===== USTARCH-ish colorful refresh + editor layout (style-only) ===== */

/* Manager header: blue → teal */
.sfpm-bhpm-header{
  background: linear-gradient(135deg, rgba(153,27,27,0.96), rgba(220,38,38,0.92)) !important;
}

/* Backdrop glow: teal (no pink) */
.sfpm-bhpm-backdrop{
  background:
    radial-gradient(1000px 700px at 20% 30%, rgba(220,38,38,0.18), transparent 60%),
    rgba(2,6,23,0.58) !important;
}

/* Body subtle tint */
.sfpm-bhpm-body{
  background:
    radial-gradient(900px 520px at 12% 0%, rgba(220,38,38,0.10), transparent 62%),
    radial-gradient(900px 520px at 92% 20%, rgba(245,158,11,0.08), transparent 60%),
    #fbfdff !important;
}

/* Primary buttons (header + save/login submit) */
.sfpm-bhpm-login-open-btn,
.sfpm-bhpm-open-btn,
.sfpm-bhpm-logout-btn{
  border-color: rgba(220,38,38,0.40) !important;
  background: linear-gradient(180deg, rgba(153,27,27,0.96), rgba(91,15,15,0.92)) !important;
  box-shadow: 0 10px 18px rgba(153,27,27,0.18);
}
.sfpm-bhpm-login-open-btn:hover,
.sfpm-bhpm-open-btn:hover,
.sfpm-bhpm-logout-btn:hover{
  box-shadow: 0 14px 26px rgba(220,38,38,0.20) !important;
}

.sfpm-bhpm-save-btn,
.sfpm-bhpm-login-form input[type="submit"]{
  border-color: rgba(220,38,38,0.35) !important;
  background: linear-gradient(180deg, rgba(220,38,38,0.96), rgba(153,27,27,0.92)) !important;
}

/* Focus ring: teal */
.sfpm-bhpm-body input:focus,
.sfpm-bhpm-body select:focus{
  border-color: rgba(220,38,38,0.70) !important;
  box-shadow: 0 0 0 4px rgba(220,38,38,0.16) !important;
}

/* Tabs active: teal */
.sfpm-bhpm-tab.is-active{
  background: rgba(255,255,0,0.2) !important;
  border-color: rgba(0,0,0,0.5) !important;
  color: #991b1b !important;
}

/* Context pill: warm accent */
.sfpm-bhpm-context-pill{
  border-color: rgba(245,158,11,0.28) !important;
  background: rgba(245,158,11,0.10) !important;
  color: #92400e !important;
}

/* Language chips: missing = warm */
.sfpm-bhpm-lang-missing{
  border-color: rgba(245,158,11,0.45) !important;
  background: rgba(255,0,0,0.2) !important;
  color: #92400e !important;
}

/* Password toggle icon color */
.sfpm-bhpm-pass-toggle svg{ fill: rgba(153,27,27,0.90) !important; }

/* -------- Editor re-layout: Content 2/3 + Sidebar 1/3 -------- */
.sfpm-bhpm-view-editor{
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  column-gap: 14px;
  row-gap: 12px;
  align-items: start;
}

/* Full-width rows */
.sfpm-bhpm-view-editor > .sfpm-bhpm-context-row,
.sfpm-bhpm-view-editor > .sfpm-bhpm-lang-tabs,
.sfpm-bhpm-view-editor > .sfpm-bhpm-parent-field,
.sfpm-bhpm-view-editor > .sfpm-bhpm-field:not(:has(.sfpm-bhpm-editor-wrap)),
.sfpm-bhpm-view-editor > .sfpm-bhpm-msg{
  grid-column: 1 / -1;
}

/* Content field (the one containing wp_editor) -> left column */
.sfpm-bhpm-view-editor > .sfpm-bhpm-field:has(.sfpm-bhpm-editor-wrap){
  grid-column: 1;
  margin-top: 10px;
}

/* Featured + Status stack -> right column */
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid{
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-field{ margin: 0; }

/* Make sidebar controls feel like cards */
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid .sfpm-bhpm-field{
  border: 1px solid rgba(11,18,32,0.10);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 10px 18px rgba(2,6,23,0.06);
}

/* Featured preview fixed aspect */
.sfpm-bhpm-featured-preview{
  border-style: solid;
  border-color: rgba(153,27,27,0.14);
  background: linear-gradient(180deg, rgba(220,38,38,0.06), rgba(255,255,255,0.72));
  min-height: 150px;
}
.sfpm-bhpm-featured-preview img{
  width: 100%;
  height: 150px;
  object-fit: cover;
}

/* Status + Save on the right, under featured */
.sfpm-bhpm-view-editor > .sfpm-bhpm-actions{
  grid-column: 2;
  margin: 0;
  padding: 0;
  border-top: 0;
  justify-content: flex-end;
}
.sfpm-bhpm-actions-right{ justify-content: flex-end; }

/* Back button: top-right corner */
.sfpm-bhpm-back-btn{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
  border-radius: 12px !important;
  padding: 8px 12px !important;
  border-color: rgba(153,27,27,0.55) !important;
  background: rgba(255,255,255,0.96) !important;
  color: #991b1b !important;
  box-shadow: 0 12px 22px rgba(2,6,23,0.10) !important;
}
.sfpm-bhpm-back-btn::before{ content: "←"; margin-right: 8px; opacity: .9; }
.sfpm-bhpm-lang-tabs{ padding-right: 120px; }

/* Responsive: stack editor on small screens */
@media (max-width: 900px){
  .sfpm-bhpm-view-editor{ display: block; }
  .sfpm-bhpm-lang-tabs{ padding-right: 10px; }
  .sfpm-bhpm-back-btn{
    position: static;
    margin: 0 0 10px auto;
    display: inline-flex;
  }
  .sfpm-bhpm-view-editor > .sfpm-bhpm-grid{
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 12px;
  }
  .sfpm-bhpm-view-editor > .sfpm-bhpm-actions{ margin-top: 10px; }
}

/* Stronger hover/active for primary buttons (contrast) */
.sfpm-bhpm-login-open-btn:hover,
.sfpm-bhpm-open-btn:hover,
.sfpm-bhpm-logout-btn:hover,
.sfpm-bhpm-save-btn:hover{
  box-shadow: 0 14px 28px rgba(153,27,27,0.22) !important;
}

.sfpm-bhpm-login-open-btn:active,
.sfpm-bhpm-open-btn:active,
.sfpm-bhpm-logout-btn:active,
.sfpm-bhpm-save-btn:active{
  filter: brightness(0.98) !important;
}

/* Back button hover (top-right) */
.sfpm-bhpm-back-btn:hover{
  background: rgba(220,38,38,0.08) !important;
  border-color: rgba(153,27,27,0.70) !important;
  box-shadow: 0 14px 28px rgba(153,27,27,0.18) !important;
}

/* Higher-contrast separators for common shells (safe even if some selectors don't exist) */
.sfpm-bhpm-card,
.sfpm-bhpm-panel,
.sfpm-bhpm-editor,
.sfpm-bhpm-box{
  border-color: rgba(11,18,32,0.18) !important;
}

/* Red accent marker for section titles if present */
.sfpm-bhpm-section-title,
.sfpm-bhpm-subtitle{
  position: relative;
}
.sfpm-bhpm-section-title::before,
.sfpm-bhpm-subtitle::before{
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2.25px;
  margin-right: 8px;
  background: linear-gradient(180deg, rgba(220,38,38,1), rgba(91,15,15,1));
  vertical-align: middle;
}


/* =========================================================
   Red layout tweaks v2 (style-only)
   - Featured same height as Content
   - Featured label outside card
   - Status + Save under both columns, right aligned
   - Back button red, single arrow
   ========================================================= */

/* Make the 2-column editor row stretch to the tallest column */
.sfpm-bhpm-view-editor{
  align-items: stretch !important;
}

/* Ensure the main content editor block participates in stretching */
.sfpm-bhpm-view-editor > .sfpm-bhpm-field:has(.sfpm-bhpm-editor-wrap){
  align-self: stretch !important;
  min-height: 0 !important;
}

/* Flatten the sidebar container so Featured + Status can be placed independently */
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid{
  display: contents !important;
}

/* Featured field (assumed first) sits in the right column, same row as Content */
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-field:first-child{
  grid-column: 2 !important;
  align-self: stretch !important;
  height: 100% !important;

  /* label OUTSIDE the card: remove card styling from the field wrapper */
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;

  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  min-height: 0 !important;
}

/* Put the 'card' styling onto the preview box itself */
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-field:first-child .sfpm-bhpm-featured-preview{
  flex: 1 1 auto !important;
  min-height: 0 !important;
  border: 1px solid rgba(153,27,27,0.22) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(220,38,38,0.08), rgba(255,255,255,0.86)) !important;
  box-shadow: 0 14px 26px rgba(2,6,23,0.10) !important;
  padding: 10px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Make featured image fill available height within the preview */
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-field:first-child .sfpm-bhpm-featured-preview img{
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  border-radius: 9px !important;
}

/* Make featured action buttons area look like a small card, under preview */
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-field:first-child .sfpm-bhpm-featured-actions{
  border: 1px solid rgba(11,18,32,0.16) !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.95) !important;
  box-shadow: 0 10px 18px rgba(2,6,23,0.08) !important;
  padding: 10px !important;
}

/* Status field (assumed last) goes under BOTH columns and aligns right */
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-field:last-child{
  grid-column: 1 / -1 !important;
  justify-self: center !important;
  width: min(900px, 100%) !important;

  border: 1px solid rgba(11,18,32,0.16) !important;
  border-radius: 12px !important;
  background: rgba(255,255,255,0.95) !important;
  box-shadow: 0 10px 18px rgba(2,6,23,0.08) !important;
  padding: 12px !important;
  margin-top: 2px !important;
}

/* Actions row (Save) under BOTH columns, right aligned */
.sfpm-bhpm-view-editor > .sfpm-bhpm-actions{
  grid-column: 1 / -1 !important;
  justify-content: flex-end !important;
  margin-top: 0 !important;
}

/* Optional: slightly larger, higher-contrast Save */
.sfpm-bhpm-save-btn{
  box-shadow: 0 14px 26px rgba(153,27,27,0.22) !important;
}

/* Back button: red, top-right, and only ONE arrow */
.sfpm-bhpm-back-btn{
  background: linear-gradient(180deg, rgba(220,38,38,0.98), rgba(153,27,27,0.95)) !important;
  border-color: rgba(255,255,255,0.22) !important;
  color: #fff !important;
  text-shadow: 0 1px 0 rgba(0,0,0,0.22) !important;
}
.sfpm-bhpm-back-btn::before{ content: none !important; display:none !important; }
.sfpm-bhpm-back-btn::after{ content: none !important; display:none !important; }

/* If an icon is present and creates a second arrow, hide it */
.sfpm-bhpm-back-btn .dashicons{ display:none !important; }

.sfpm-bhpm-back-btn:hover{
  filter: brightness(1.03) !important;
  box-shadow: 0 16px 30px rgba(153,27,27,0.24) !important;
}

/* Responsive: keep the new placement when stacked */
@media (max-width: 900px){
  .sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-field:first-child{
    grid-column: 1 / -1 !important;
    height: auto !important;
  }
  .sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-field:last-child{
    width: 100% !important;
    justify-self: stretch !important;
  }
}

/* =========================================================
   Compact edit form v2.8.6
   - Featured image UI only in Posts mode
   - Page editors (Department pages, Laboratories, Documents) use 90% modal width
   ========================================================= */
.sfpm-bhpm-view-editor{
  row-gap: 8px !important;
  column-gap: 12px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-field{
  margin-top: 6px !important;
  margin-bottom: 6px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-field label{
  margin-bottom: 4px !important;
  font-size: 13px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-help{
  margin-top: 3px !important;
  line-height: 1.25 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-body input[type="text"],
.sfpm-bhpm-view-editor .sfpm-bhpm-body select,
.sfpm-bhpm-view-editor input[type="text"],
.sfpm-bhpm-view-editor select{
  padding: 7px 10px !important;
  border-radius: 7.5px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-editor-wrap{
  border-radius: 9px !important;
  box-shadow: 0 6px 12px rgba(2,6,23,0.05) !important;
}
.sfpm-bhpm-view-editor .wp-editor-container,
.sfpm-bhpm-view-editor .quicktags-toolbar,
.sfpm-bhpm-view-editor div.mce-toolbar-grp{
  border-color: rgba(11,18,32,0.12) !important;
}
.sfpm-bhpm-view-editor .wp-editor-tabs{
  margin-top: 0 !important;
}
.sfpm-bhpm-view-editor .wp-switch-editor{
  min-height: 26px !important;
  line-height: 24px !important;
  padding: 2px 8px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-actions{
  padding-top: 2px !important;
}

/* Page modes: no featured-image block, wider compact editor. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode{
  grid-template-columns: 1fr !important;
  align-items: start !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .sfpm-bhpm-featured-field{
  display: none !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-context-row,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-lang-tabs,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-parent-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-title-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-content-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-grid,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-actions,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-msg{
  grid-column: 1 / -1 !important;
  width: 90% !important;
  justify-self: center !important;
  box-sizing: border-box !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-grid{
  display: block !important;
  margin-top: 0 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-grid > .sfpm-bhpm-status-field{
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  box-sizing: border-box !important;
  padding: 9px 10px !important;
  margin-top: 4px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-actions{
  margin-top: 2px !important;
}

@media (max-width: 900px){
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-context-row,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-lang-tabs,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-parent-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-title-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-content-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-grid,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-actions,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-msg{
    width: 100% !important;
  }
}


/* =========================================================
   Page editor hardening v2.8.6
   - Remove Featured image from Department/Lab/Documents editors
   - Set page content editor to compact 10-row height
   ========================================================= */
.sfpm-bhpm-manager-modal.sfpm-bhpm-mode-pages .sfpm-bhpm-featured-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .sfpm-bhpm-featured-field{
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .sfpm-bhpm-editor-wrap iframe#sfpm_bhpm_content_ifr,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .sfpm-bhpm-editor-wrap #sfpm_bhpm_content,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .sfpm-bhpm-editor-wrap textarea#sfpm_bhpm_content{
  min-height: 300px !important;
  height: 300px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .sfpm-bhpm-content-field{
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}


/* =========================================================
   Compact editor toolbar and Archive tab v2.8.8
   - Smaller Add Media button
   - Quicktags/HTML buttons placed inline next to Add Media in Text mode
   - Tighter vertical spacing in the edit form
   ========================================================= */
.sfpm-bhpm-view-editor{
  row-gap: 5px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-context-row,
.sfpm-bhpm-view-editor .sfpm-bhpm-lang-tabs,
.sfpm-bhpm-view-editor .sfpm-bhpm-parent-field,
.sfpm-bhpm-view-editor .sfpm-bhpm-title-field,
.sfpm-bhpm-view-editor .sfpm-bhpm-content-field,
.sfpm-bhpm-view-editor .sfpm-bhpm-grid,
.sfpm-bhpm-view-editor .sfpm-bhpm-actions,
.sfpm-bhpm-view-editor .sfpm-bhpm-msg{
  margin-top: 3px !important;
  margin-bottom: 3px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-field{
  margin-top: 3px !important;
  margin-bottom: 3px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-field label{
  margin-bottom: 2px !important;
  line-height: 1.15 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-help{
  margin-top: 2px !important;
  font-size: 11px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-lang-tabs{
  gap: 5px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tab{
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}
.sfpm-bhpm-view-editor .wp-editor-tools{
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  min-height: 0 !important;
  padding: 3px 4px 2px !important;
}
.sfpm-bhpm-view-editor .wp-media-buttons{
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 4px 0 0 !important;
  padding: 0 !important;
  float: none !important;
}
.sfpm-bhpm-view-editor .wp-media-buttons .button,
.sfpm-bhpm-view-editor .wp-media-buttons button{
  min-height: 22px !important;
  height: 22px !important;
  line-height: 20px !important;
  padding: 0 7px !important;
  font-size: 11px !important;
  border-radius: 4.5px !important;
}
.sfpm-bhpm-view-editor .wp-media-buttons .wp-media-buttons-icon{
  width: 14px !important;
  height: 14px !important;
  margin: 2px 3px 0 0 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder{
  display: inline-flex !important;
  align-items: center !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  order: 2 !important;
}
.sfpm-bhpm-view-editor .wp-editor-tabs{
  margin-left: auto !important;
  float: none !important;
  order: 3 !important;
}
.sfpm-bhpm-view-editor .wp-editor-wrap.tmce-active .sfpm-bhpm-quicktags-inline-holder{
  display: none !important;
}
.sfpm-bhpm-view-editor .wp-editor-wrap.html-active .sfpm-bhpm-quicktags-inline-holder{
  display: inline-flex !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar{
  display: inline-flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar input,
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar .button{
  min-height: 21px !important;
  height: 21px !important;
  line-height: 19px !important;
  padding: 0 5px !important;
  margin: 0 !important;
  font-size: 11px !important;
  border-radius: 3.75px !important;
}
.sfpm-bhpm-view-editor .wp-switch-editor{
  min-height: 22px !important;
  line-height: 20px !important;
  padding: 1px 7px !important;
  font-size: 11px !important;
}
.sfpm-bhpm-view-editor .mce-toolbar-grp,
.sfpm-bhpm-view-editor .quicktags-toolbar{
  min-height: 0 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-actions{
  padding-top: 0 !important;
  margin-top: 1px !important;
}


/* =========================================================
   Archive as page section + readable quicktags v2.8.8
   ========================================================= */
.sfpm-bhpm-view-editor .wp-media-buttons .button,
.sfpm-bhpm-view-editor .wp-media-buttons button{
  min-height: 26px !important;
  height: 26px !important;
  line-height: 24px !important;
  padding: 0 9px !important;
  font-size: 13px !important;
  border-radius: 5.25px !important;
}
.sfpm-bhpm-view-editor .wp-media-buttons .wp-media-buttons-icon{
  width: 16px !important;
  height: 16px !important;
  margin: 3px 4px 0 0 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar{
  gap: 4px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar input,
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar .button{
  min-height: 25px !important;
  height: 25px !important;
  line-height: 23px !important;
  padding: 0 8px !important;
  font-size: 13px !important;
  border-radius: 5.25px !important;
}


/* =========================================================
   Archive parent option + icon quicktags v2.8.9
   ========================================================= */
.sfpm-bhpm-view-editor .wp-media-buttons .button,
.sfpm-bhpm-view-editor .wp-media-buttons button{
  min-height: 31px !important;
  height: 31px !important;
  line-height: 29px !important;
  padding: 0 12px !important;
  font-size: 15px !important;
  border-radius: 6px !important;
}
.sfpm-bhpm-view-editor .wp-media-buttons .wp-media-buttons-icon{
  width: 18px !important;
  height: 18px !important;
  margin: 5px 5px 0 0 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar{
  gap: 5px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar input.sfpm-bhpm-qt-icon,
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar .button.sfpm-bhpm-qt-icon{
  min-width: 32px !important;
  min-height: 30px !important;
  height: 30px !important;
  line-height: 28px !important;
  padding: 0 8px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  text-align: center !important;
  border-radius: 6px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar input.sfpm-bhpm-qt-link,
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar input.sfpm-bhpm-qt-img{
  font-size: 15px !important;
}


/* =========================================================
   Archive can move pages back to Department roots v2.8.10
   ========================================================= */
.sfpm-bhpm-mode-tabs{
  flex-wrap: wrap;
}

/* =========================================================
   Archive Posts category selector v2.8.11
   ========================================================= */
.sfpm-bhpm-view-editor .sfpm-bhpm-category-field{
  max-width: 520px;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-category-select{
  width: 100%;
}


/* =========================================================
   Editor sizing refinements v2.8.13
   - Add Media and Quicktag icon buttons about 15% smaller
   - Edit form spacing about 10% more relaxed
   - Post Status field same width as Title section
   ========================================================= */
.sfpm-bhpm-view-editor{
  row-gap: 6px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-context-row,
.sfpm-bhpm-view-editor .sfpm-bhpm-lang-tabs,
.sfpm-bhpm-view-editor .sfpm-bhpm-parent-field,
.sfpm-bhpm-view-editor .sfpm-bhpm-title-field,
.sfpm-bhpm-view-editor .sfpm-bhpm-category-field,
.sfpm-bhpm-view-editor .sfpm-bhpm-content-field,
.sfpm-bhpm-view-editor .sfpm-bhpm-grid,
.sfpm-bhpm-view-editor .sfpm-bhpm-actions,
.sfpm-bhpm-view-editor .sfpm-bhpm-msg{
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-field{
  margin-top: 4px !important;
  margin-bottom: 4px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-field label{
  margin-bottom: 3px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-help{
  margin-top: 3px !important;
}
.sfpm-bhpm-view-editor .wp-editor-tools{
  gap: 6px !important;
  padding: 4px 5px 3px !important;
}
.sfpm-bhpm-view-editor .wp-media-buttons{
  gap: 5px !important;
  margin-right: 5px !important;
}
.sfpm-bhpm-view-editor .wp-media-buttons .button,
.sfpm-bhpm-view-editor .wp-media-buttons button{
  min-height: 26px !important;
  height: 26px !important;
  line-height: 24px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  border-radius: 5.25px !important;
}
.sfpm-bhpm-view-editor .wp-media-buttons .wp-media-buttons-icon{
  width: 16px !important;
  height: 16px !important;
  margin: 4px 4px 0 0 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar{
  gap: 4px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar input.sfpm-bhpm-qt-icon,
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar .button.sfpm-bhpm-qt-icon{
  min-width: 27px !important;
  min-height: 26px !important;
  height: 26px !important;
  line-height: 24px !important;
  padding: 0 7px !important;
  font-size: 14px !important;
  border-radius: 5.25px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar input.sfpm-bhpm-qt-link,
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar input.sfpm-bhpm-qt-img{
  font-size: 13px !important;
}
.sfpm-bhpm-manager-modal.sfpm-bhpm-mode-posts .sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-status-field,
.sfpm-bhpm-manager-modal.sfpm-bhpm-mode-posts .sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-field:last-child{
  grid-column: 1 / -1 !important;
  justify-self: stretch !important;
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box !important;
}


/* Page editor visual-first improvements v2.8.14
   Department/Lab/Documents/Archive pages open in Visual mode; Text mode remains available. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .wp-editor-tabs .switch-tmce{
  font-weight: 700 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar-grp,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-container-body{
  max-width: 100% !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-btn button{
  min-height: 24px !important;
}


/* =========================================================
   Visual editor compact toolbar v2.8.15
   - TinyMCE visual-editor buttons approximately 50% smaller
   - Applies mainly in page editing modes where Visual editor is default
   ========================================================= */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar-grp{
  padding: 1px 2px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar{
  padding: 0 !important;
  line-height: 1 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-btn-group{
  padding: 0 1px !important;
  margin: 0 1px 1px 0 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-btn{
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 1px 1px 0 !important;
  padding: 0 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-btn button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-btn.mce-active button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-btn.mce-disabled button{
  min-width: 18px !important;
  width: auto !important;
  min-height: 18px !important;
  height: 18px !important;
  line-height: 16px !important;
  padding: 0 2px !important;
  font-size: 10px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-ico{
  width: 13px !important;
  height: 13px !important;
  line-height: 13px !important;
  font-size: 13px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-caret{
  margin-top: 7px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-listbox{
  height: 18px !important;
  min-height: 18px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-listbox button{
  height: 18px !important;
  min-height: 18px !important;
  line-height: 16px !important;
  padding: 0 14px 0 4px !important;
  font-size: 10px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-listbox .mce-txt{
  max-width: 88px !important;
  font-size: 10px !important;
  line-height: 16px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-statusbar{
  min-height: 16px !important;
}


/* =========================================================
   Visual editor balanced toolbar v2.8.16
   - Larger than v2.8.15, but still compact enough for one row.
   - Toolbar2 is disabled in PHP; this CSS keeps the remaining toolbar tight.
   ========================================================= */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar-grp{
  padding: 2px 3px !important;
  overflow-x: hidden !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar{
  padding: 1px 0 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-btn-group{
  padding: 0 1px !important;
  margin: 0 1px 0 0 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-btn{
  min-width: 24px !important;
  height: 24px !important;
  min-height: 24px !important;
  margin: 0 1px 0 0 !important;
  padding: 0 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-btn button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-btn.mce-active button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-btn.mce-disabled button{
  min-width: 24px !important;
  width: auto !important;
  min-height: 24px !important;
  height: 24px !important;
  line-height: 22px !important;
  padding: 1px 4px !important;
  font-size: 12px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-ico{
  width: 16px !important;
  height: 16px !important;
  line-height: 16px !important;
  font-size: 16px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-caret{
  margin-top: 9px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-listbox{
  height: 24px !important;
  min-height: 24px !important;
  max-width: 118px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-listbox button{
  height: 24px !important;
  min-height: 24px !important;
  line-height: 22px !important;
  padding: 1px 16px 1px 6px !important;
  font-size: 12px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode .mce-toolbar .mce-listbox .mce-txt{
  max-width: 86px !important;
  font-size: 12px !important;
  line-height: 22px !important;
}

/* Front-end fix for multiple images centered in the Visual editor.
   Some themes force images to display:block, which ignores text-align:center on
   the paragraph. These rules keep images inline when the paragraph is centered. */
.entry-content p[style*="text-align: center"] img.alignnone,
.entry-content p[style*="text-align:center"] img.alignnone,
.entry-content p[style*="text-align: center"] img.size-thumbnail,
.entry-content p[style*="text-align:center"] img.size-thumbnail,
.entry-content p[style*="text-align: center"] img.size-medium,
.entry-content p[style*="text-align:center"] img.size-medium,
p[style*="text-align: center"] img.alignnone,
p[style*="text-align:center"] img.alignnone{
  display: inline-block !important;
  float: none !important;
  margin: 0 8px 8px 8px !important;
  vertical-align: middle !important;
}
.entry-content p[style*="text-align: center"],
.entry-content p[style*="text-align:center"],
p[style*="text-align: center"],
p[style*="text-align:center"]{
  text-align: center !important;
}


/* =========================================================
   Editor toolbar and back-button placement v2.8.17
   - Back button is part of the SK/EN language row, aligned right.
   - The Paragraph / format dropdown is removed in PHP and hidden defensively here.
   - Visual/Text editor buttons are displayed inline next to Add Media.
   - Posts edit toolbar buttons are about 20% smaller.
   ========================================================= */
.sfpm-bhpm-view-editor > .sfpm-bhpm-actions .sfpm-bhpm-back-btn{
  display: none !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-lang-tabs{
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding-right: 10px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-lang-tabs .sfpm-bhpm-back-btn{
  display: inline-flex !important;
  position: static !important;
  top: auto !important;
  right: auto !important;
  margin: 0 0 0 auto !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  border-radius: 12px !important;
  padding: 7px 14px !important;
  min-height: 34px !important;
  line-height: 18px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-lang-tabs .sfpm-bhpm-back-btn::before,
.sfpm-bhpm-view-editor .sfpm-bhpm-lang-tabs .sfpm-bhpm-back-btn::after{
  content: none !important;
  display: none !important;
}

.sfpm-bhpm-view-editor .wp-editor-tools{
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 6px !important;
  min-height: 0 !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  padding: 4px 6px !important;
}
.sfpm-bhpm-view-editor .wp-media-buttons{
  display: inline-flex !important;
  flex: 0 0 auto !important;
  align-items: center !important;
  gap: 4px !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  order: 1 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder,
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder{
  align-items: center !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  order: 2 !important;
}
.sfpm-bhpm-view-editor .wp-editor-wrap.tmce-active .sfpm-bhpm-tinymce-inline-holder{
  display: inline-flex !important;
}
.sfpm-bhpm-view-editor .wp-editor-wrap.tmce-active .sfpm-bhpm-quicktags-inline-holder{
  display: none !important;
}
.sfpm-bhpm-view-editor .wp-editor-wrap.html-active .sfpm-bhpm-tinymce-inline-holder{
  display: none !important;
}
.sfpm-bhpm-view-editor .wp-editor-wrap.html-active .sfpm-bhpm-quicktags-inline-holder{
  display: inline-flex !important;
}
.sfpm-bhpm-view-editor .wp-editor-tabs{
  flex: 0 0 auto !important;
  margin-left: auto !important;
  float: none !important;
  order: 3 !important;
  white-space: nowrap !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-toolbar-grp{
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-toolbar,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-container-body{
  display: inline-flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  width: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  white-space: nowrap !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn-group{
  display: inline-flex !important;
  align-items: center !important;
  padding: 0 1px !important;
  margin: 0 2px 0 0 !important;
  border: 0 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-listbox,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-listbox button,
.sfpm-bhpm-view-editor .mce-btn[aria-label="Formats"],
.sfpm-bhpm-view-editor .mce-btn[aria-label="Paragraph"],
.sfpm-bhpm-view-editor .mce-btn[title="Formats"],
.sfpm-bhpm-view-editor .mce-btn[title="Paragraph"]{
  display: none !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn{
  display: inline-flex !important;
  min-width: 26px !important;
  width: 26px !important;
  min-height: 26px !important;
  height: 26px !important;
  margin: 0 2px 0 0 !important;
  padding: 0 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn button,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn.mce-active button,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn.mce-disabled button{
  min-width: 26px !important;
  width: 26px !important;
  min-height: 26px !important;
  height: 26px !important;
  line-height: 24px !important;
  padding: 1px 4px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-ico{
  width: 16px !important;
  height: 16px !important;
  line-height: 16px !important;
  font-size: 16px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar{
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  white-space: nowrap !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .wp-media-buttons .button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .wp-media-buttons button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar input.sfpm-bhpm-qt-icon,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-quicktags-inline-holder .quicktags-toolbar .button.sfpm-bhpm-qt-icon{
  min-height: 21px !important;
  height: 21px !important;
  line-height: 19px !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  border-radius: 4.5px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .wp-media-buttons .wp-media-buttons-icon{
  width: 13px !important;
  height: 13px !important;
  margin: 3px 3px 0 0 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .mce-btn,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .mce-btn button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .mce-btn.mce-active button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .mce-btn.mce-disabled button{
  min-width: 21px !important;
  width: 21px !important;
  min-height: 21px !important;
  height: 21px !important;
  line-height: 19px !important;
  padding: 0 2px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .mce-ico{
  width: 14px !important;
  height: 14px !important;
  line-height: 14px !important;
  font-size: 14px !important;
}


/* =========================================================
   Edit form layout refinements v2.8.18
   - All Edit form sections use 90% of the modal width.
   - Posts Edit content editor uses about 40% of the modal height.
   - The active Visual / Code editor tab is highlighted clearly.
   ========================================================= */
.sfpm-bhpm-view-editor > .sfpm-bhpm-context-row,
.sfpm-bhpm-view-editor > .sfpm-bhpm-lang-tabs,
.sfpm-bhpm-view-editor > .sfpm-bhpm-parent-field,
.sfpm-bhpm-view-editor > .sfpm-bhpm-title-field,
.sfpm-bhpm-view-editor > .sfpm-bhpm-category-field,
.sfpm-bhpm-view-editor > .sfpm-bhpm-content-field,
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid,
.sfpm-bhpm-view-editor > .sfpm-bhpm-actions,
.sfpm-bhpm-view-editor > .sfpm-bhpm-msg{
  grid-column: 1 / -1 !important;
  width: 90% !important;
  max-width: 90% !important;
  justify-self: center !important;
  box-sizing: border-box !important;
}

.sfpm-bhpm-view-editor > .sfpm-bhpm-grid{
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid > .sfpm-bhpm-field{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-field + .sfpm-bhpm-field{
  margin-top: 10px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field{
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  background: rgba(255,255,255,0.95) !important;
  border: 1px solid rgba(11,18,32,0.16) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 18px rgba(2,6,23,0.08) !important;
  padding: 12px !important;
  margin: 0 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field .sfpm-bhpm-featured-preview{
  min-height: 150px !important;
  height: 150px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field .sfpm-bhpm-featured-preview img{
  height: 100% !important;
  object-fit: cover !important;
}
.sfpm-bhpm-view-editor > .sfpm-bhpm-actions{
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-editor-wrap iframe#sfpm_bhpm_content_ifr,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-editor-wrap #sfpm_bhpm_content,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-editor-wrap textarea#sfpm_bhpm_content{
  height: var(--sfpm-post-editor-height, calc(40vh - 13px)) !important;
  min-height: 260px !important;
}

.sfpm-bhpm-view-editor .wp-editor-tabs .wp-switch-editor{
  border-color: rgba(11,18,32,0.18) !important;
  background: rgba(255,255,255,0.92) !important;
  color: #334155 !important;
  box-shadow: none !important;
  opacity: .78 !important;
}
.sfpm-bhpm-view-editor .wp-editor-wrap.tmce-active .wp-editor-tabs .switch-tmce,
.sfpm-bhpm-view-editor .wp-editor-wrap.html-active .wp-editor-tabs .switch-html{
  border-color: rgba(153,27,27,0.70) !important;
  background: linear-gradient(180deg, rgba(220,38,38,0.96), rgba(153,27,27,0.96)) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(153,27,27,0.22) !important;
  opacity: 1 !important;
  font-weight: 800 !important;
}
.sfpm-bhpm-view-editor .wp-editor-wrap.tmce-active .wp-editor-tabs .switch-tmce:hover,
.sfpm-bhpm-view-editor .wp-editor-wrap.html-active .wp-editor-tabs .switch-html:hover{
  filter: brightness(1.04) !important;
}

@media (max-width: 900px){
  .sfpm-bhpm-view-editor > .sfpm-bhpm-context-row,
  .sfpm-bhpm-view-editor > .sfpm-bhpm-lang-tabs,
  .sfpm-bhpm-view-editor > .sfpm-bhpm-parent-field,
  .sfpm-bhpm-view-editor > .sfpm-bhpm-title-field,
  .sfpm-bhpm-view-editor > .sfpm-bhpm-category-field,
  .sfpm-bhpm-view-editor > .sfpm-bhpm-content-field,
  .sfpm-bhpm-view-editor > .sfpm-bhpm-grid,
  .sfpm-bhpm-view-editor > .sfpm-bhpm-actions,
  .sfpm-bhpm-view-editor > .sfpm-bhpm-msg{
    width: 100% !important;
    max-width: 100% !important;
  }
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-editor-wrap iframe#sfpm_bhpm_content_ifr,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-editor-wrap #sfpm_bhpm_content,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-editor-wrap textarea#sfpm_bhpm_content{
    height: 300px !important;
    min-height: 260px !important;
  }
}


/* =========================================================
   Posts editor side-by-side layout v2.8.19
   - Edit form width increased from 90% to 95% of the modal.
   - In Posts Edit, the content editor is placed beside the featured image.
   - The status and action rows remain full-width below the editor row.
   ========================================================= */
.sfpm-bhpm-view-editor > .sfpm-bhpm-context-row,
.sfpm-bhpm-view-editor > .sfpm-bhpm-lang-tabs,
.sfpm-bhpm-view-editor > .sfpm-bhpm-parent-field,
.sfpm-bhpm-view-editor > .sfpm-bhpm-title-field,
.sfpm-bhpm-view-editor > .sfpm-bhpm-category-field,
.sfpm-bhpm-view-editor > .sfpm-bhpm-content-field,
.sfpm-bhpm-view-editor > .sfpm-bhpm-grid,
.sfpm-bhpm-view-editor > .sfpm-bhpm-actions,
.sfpm-bhpm-view-editor > .sfpm-bhpm-msg{
  width: 95% !important;
  max-width: 95% !important;
  justify-self: center !important;
  box-sizing: border-box !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode{
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 30%) !important;
  column-gap: 16px !important;
  row-gap: 10px !important;
  align-items: start !important;
  width: 95% !important;
  max-width: 95% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-context-row,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-lang-tabs,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-parent-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-title-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-category-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-actions,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-msg{
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-content-field{
  grid-column: 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  align-self: start !important;
  margin-top: 4px !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid{
  display: contents !important;
  width: 100% !important;
  max-width: 100% !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field{
  grid-column: 2 !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  align-self: start !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  min-height: 0 !important;
  background: rgba(255,255,255,0.95) !important;
  border: 1px solid rgba(11,18,32,0.16) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 18px rgba(2,6,23,0.08) !important;
  padding: 12px !important;
  margin: 4px 0 0 0 !important;
  box-sizing: border-box !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field .sfpm-bhpm-featured-preview{
  flex: 1 1 auto !important;
  min-height: 180px !important;
  height: calc(var(--sfpm-post-editor-height, 320px) - 105px) !important;
  max-height: var(--sfpm-post-editor-height, 360px) !important;
  box-sizing: border-box !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field .sfpm-bhpm-featured-preview img{
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  border-radius: 9px !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-status-field{
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  box-sizing: border-box !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-actions{
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

@media (max-width: 920px){
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode{
    display: block !important;
    width: 95% !important;
    max-width: 95% !important;
  }
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-context-row,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-lang-tabs,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-parent-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-title-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-category-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-content-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-actions,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-msg{
    width: 100% !important;
    max-width: 100% !important;
  }
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid{
    display: block !important;
  }
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field{
    margin-top: 10px !important;
  }
}


/* =========================================================
   Posts/Page edit layout correction v2.8.20
   - Do not let the hidden Edit view appear directly in the Posts list.
   - Posts Edit: content editor on the left, Featured image on the right.
   - Posts Edit: editor body and featured-image preview use the same height.
   - Page Edit: all main edit rows use 95% of the modal width.
   - Back button hover remains red, consistent with the other action buttons.
   ========================================================= */

/* v2.8.19 used display:grid!important for the Posts editor. That overrode
   jQuery .hide() and made the Edit view visible inside the Posts section.
   These rules restore the hidden state whenever the view has display:none. */
.sfpm-bhpm-view-editor[style*="display: none"],
.sfpm-bhpm-view-editor[style*="display:none"]{
  display: none !important;
}

/* Page editors: force the requested 95% modal width even over older
   page-mode-specific 90% rules. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-context-row,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-lang-tabs,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-parent-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-title-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-content-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-grid,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-actions,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-msg{
  width: 95% !important;
  max-width: 95% !important;
  justify-self: center !important;
  box-sizing: border-box !important;
}

/* Posts editor shell: the editor is 95% wide, with a right-side featured image column. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode:not([style*="display: none"]):not([style*="display:none"]){
  grid-template-columns: minmax(0, 1fr) minmax(260px, 34%) !important;
  align-items: start !important;
  column-gap: 16px !important;
  row-gap: 10px !important;
  width: 95% !important;
  max-width: 95% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-context-row,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-lang-tabs,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-parent-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-title-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-category-field,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-actions,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-msg{
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  box-sizing: border-box !important;
}

/* Left column: content editor. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-content-field{
  grid-column: 1 !important;
  grid-row: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  align-self: start !important;
  margin-top: 4px !important;
  box-sizing: border-box !important;
}

/* Right column: make only Featured image live beside the editor. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid{
  display: contents !important;
  width: auto !important;
  max-width: none !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field{
  grid-column: 2 !important;
  grid-row: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  align-self: start !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  min-height: 0 !important;
  height: auto !important;
  background: rgba(255,255,255,0.95) !important;
  border: 1px solid rgba(11,18,32,0.16) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 18px rgba(2,6,23,0.08) !important;
  padding: 12px !important;
  margin: 4px 0 0 0 !important;
  box-sizing: border-box !important;
}

/* Equal useful heights: the TinyMCE/Text editing area and the Featured preview. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-editor-wrap iframe#sfpm_bhpm_content_ifr,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-editor-wrap #sfpm_bhpm_content,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-editor-wrap textarea#sfpm_bhpm_content,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field .sfpm-bhpm-featured-preview{
  height: var(--sfpm-post-editor-height, 320px) !important;
  min-height: 260px !important;
  max-height: none !important;
  box-sizing: border-box !important;
}

.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field .sfpm-bhpm-featured-preview{
  flex: 0 0 var(--sfpm-post-editor-height, 320px) !important;
  overflow: hidden !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field .sfpm-bhpm-featured-preview img{
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  border-radius: 9px !important;
}

/* Status and Save stay below both columns. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-status-field{
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  justify-self: stretch !important;
  box-sizing: border-box !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-actions{
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
}

/* Back hover: keep the red button style instead of turning white. */
.sfpm-bhpm-view-editor .sfpm-bhpm-lang-tabs .sfpm-bhpm-back-btn:hover,
.sfpm-bhpm-view-editor .sfpm-bhpm-lang-tabs .sfpm-bhpm-back-btn:focus{
  background: linear-gradient(180deg, rgba(220,38,38,1), rgba(153,27,27,0.98)) !important;
  border-color: rgba(255,255,255,0.28) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(153,27,27,0.24) !important;
  filter: brightness(1.03) !important;
}

@media (max-width: 920px){
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode:not([style*="display: none"]):not([style*="display:none"]){
    display: block !important;
    width: 95% !important;
    max-width: 95% !important;
  }
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-context-row,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-lang-tabs,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-parent-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-title-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-category-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-content-field,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-actions,
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-msg{
    width: 100% !important;
    max-width: 100% !important;
  }
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid{
    display: block !important;
  }
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode > .sfpm-bhpm-grid > .sfpm-bhpm-featured-field{
    margin-top: 10px !important;
  }
}


/* =========================================================
   Paragraph dropdown + justify alignment in Visual editor v2.8.21
   - Earlier compact-toolbar rules hid TinyMCE listboxes defensively.
   - These overrides re-enable the Paragraph selector and keep it compact.
   ========================================================= */
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-listbox,
.sfpm-bhpm-view-editor .mce-btn[aria-label="Formats"],
.sfpm-bhpm-view-editor .mce-btn[aria-label="Paragraph"],
.sfpm-bhpm-view-editor .mce-btn[title="Formats"],
.sfpm-bhpm-view-editor .mce-btn[title="Paragraph"]{
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 92px !important;
  max-width: 118px !important;
  height: 26px !important;
  min-height: 26px !important;
  margin: 0 3px 0 0 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .mce-listbox,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[aria-label="Formats"],
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[aria-label="Paragraph"],
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[title="Formats"],
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[title="Paragraph"]{
  min-width: 84px !important;
  max-width: 108px !important;
  height: 21px !important;
  min-height: 21px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-listbox button,
.sfpm-bhpm-view-editor .mce-btn[aria-label="Formats"] button,
.sfpm-bhpm-view-editor .mce-btn[aria-label="Paragraph"] button,
.sfpm-bhpm-view-editor .mce-btn[title="Formats"] button,
.sfpm-bhpm-view-editor .mce-btn[title="Paragraph"] button{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  min-width: 92px !important;
  width: auto !important;
  height: 26px !important;
  min-height: 26px !important;
  line-height: 24px !important;
  padding: 1px 16px 1px 6px !important;
  text-align: left !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .mce-listbox button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[aria-label="Formats"] button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[aria-label="Paragraph"] button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[title="Formats"] button,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[title="Paragraph"] button{
  min-width: 84px !important;
  height: 21px !important;
  min-height: 21px !important;
  line-height: 19px !important;
  padding: 0 14px 0 5px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-listbox .mce-txt,
.sfpm-bhpm-view-editor .mce-btn[aria-label="Formats"] .mce-txt,
.sfpm-bhpm-view-editor .mce-btn[aria-label="Paragraph"] .mce-txt,
.sfpm-bhpm-view-editor .mce-btn[title="Formats"] .mce-txt,
.sfpm-bhpm-view-editor .mce-btn[title="Paragraph"] .mce-txt{
  display: inline-block !important;
  max-width: 78px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .mce-listbox .mce-txt,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[aria-label="Formats"] .mce-txt,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[aria-label="Paragraph"] .mce-txt,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[title="Formats"] .mce-txt,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .mce-btn[title="Paragraph"] .mce-txt{
  max-width: 68px !important;
  font-size: 11px !important;
}


/* =========================================================
   Editor dropdown, tooltips and clean footer/status line v2.8.22
   ========================================================= */
.sfpm-bhpm-view-editor .wp-editor-tools,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-toolbar-grp,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-toolbar,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-container-body,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn-group{
  overflow: visible !important;
}

/* Keep the Paragraph dropdown panel above the front-end modal overlay. */
.mce-floatpanel,
.mce-menu,
.mce-tooltip{
  z-index: 10000000 !important;
}

/* Hide only the last three TinyMCE icon buttons in Posts edit: clear formatting, undo, redo. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode.sfpm-bhpm-post-hide-tail-tools .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-post-hide-tool,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode.sfpm-bhpm-post-hide-tail-tools .sfpm-bhpm-tinymce-inline-holder .mce-btn:has(.mce-i-removeformat),
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode.sfpm-bhpm-post-hide-tail-tools .sfpm-bhpm-tinymce-inline-holder .mce-btn:has(.mce-i-undo),
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode.sfpm-bhpm-post-hide-tail-tools .sfpm-bhpm-tinymce-inline-holder .mce-btn:has(.mce-i-redo){
  display: none !important;
}

/* Remove the TinyMCE bottom status/path/resize bar. */
.sfpm-bhpm-view-editor .mce-statusbar{
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  border: 0 !important;
}

/* Remove the empty status message line at the bottom of Edit; messages still appear when text is set. */
.sfpm-bhpm-view-editor > .sfpm-bhpm-msg:empty{
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}


/* =========================================================
   Native font controls inside modal-safe toolbar v2.8.24
   ========================================================= */
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder select.sfpm-bhpm-format-select{
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 118px !important;
  min-width: 118px !important;
  max-width: 118px !important;
  height: 26px !important;
  min-height: 26px !important;
  line-height: 24px !important;
  margin: 0 5px 0 0 !important;
  padding: 1px 22px 1px 7px !important;
  border: 1px solid rgba(148,163,184,0.7) !important;
  border-radius: 5.25px !important;
  background-color: #ffffff !important;
  color: #111827 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  position: relative !important;
  z-index: 10000001 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder select.sfpm-bhpm-format-select{
  width: 108px !important;
  min-width: 108px !important;
  max-width: 108px !important;
  height: 21px !important;
  min-height: 21px !important;
  line-height: 19px !important;
  padding: 0 18px 0 6px !important;
  font-size: 11px !important;
  border-radius: 4.5px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder select.sfpm-bhpm-format-select:focus{
  outline: 2px solid rgba(37,99,235,0.25) !important;
  outline-offset: 1px !important;
  border-color: rgba(37,99,235,0.85) !important;
}

/* Do not show TinyMCE's original formatselect/listbox if a cached editor still creates it. */
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-listbox,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-listbox button,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn[aria-label="Formats"],
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn[aria-label="Paragraph"],
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn[title="Formats"],
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn[title="Paragraph"]{
  display: none !important;
}


/* =========================================================
   Font family, font size and upper/lower index controls v2.8.26
   ========================================================= */
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder select.sfpm-bhpm-format-select,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder select.sfpm-bhpm-font-select,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder select.sfpm-bhpm-font-size-select{
  display: none !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-controls{
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex: 0 0 auto !important;
  margin: 0 5px 0 0 !important;
  padding: 0 !important;
  height: 26px !important;
  overflow: visible !important;
  position: relative !important;
  z-index: 10000020 !important;
  font-family: Arial, sans-serif !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-picker{
  position: relative !important;
  display: inline-flex !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-btn,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-btn{
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  height: 26px !important;
  min-height: 26px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #b5b5b5 !important;
  border-radius: 1.5px !important;
  background: #f7f7f7 linear-gradient(#fff,#f0f0f0) !important;
  color: #333 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  vertical-align: top !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-btn{
  justify-content: flex-start !important;
  gap: 4px !important;
  padding: 0 5px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-family-btn{
  width: 122px !important;
  min-width: 122px !important;
  max-width: 122px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-size-btn{
  width: 74px !important;
  min-width: 74px !important;
  max-width: 74px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-btn{
  width: 30px !important;
  min-width: 30px !important;
  max-width: 30px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-btn:hover,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-btn:hover{
  border-color: #999 !important;
  background: #fff !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-picker.is-open .sfpm-bhpm-dropdown-btn,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-btn:focus,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-btn:focus{
  outline: none !important;
  border-color: #777 !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.12) !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-icon{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 17px !important;
  min-width: 17px !important;
  height: 17px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-icon svg,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-btn svg{
  display: block !important;
  width: 17px !important;
  height: 17px !important;
  fill: currentColor !important;
  pointer-events: none !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-btn svg{
  width: 24px !important;
  height: 19px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-label{
  display: inline-block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  line-height: 24px !important;
  font-weight: 600 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-family-btn .sfpm-bhpm-dropdown-label{
  max-width: 73px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-size-btn .sfpm-bhpm-dropdown-label{
  max-width: 30px !important;
  font-family: Arial, sans-serif !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-caret{
  display: inline-block !important;
  margin-left: auto !important;
  color: #555 !important;
  font-size: 10px !important;
  line-height: 1 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-menu{
  display: none !important;
  position: absolute !important;
  top: calc(100% + 2px) !important;
  left: 0 !important;
  min-width: 100% !important;
  max-height: 260px !important;
  overflow-y: auto !important;
  background: #fff !important;
  border: 1px solid #b5b5b5 !important;
  box-shadow: 0 8px 18px rgba(0,0,0,0.20) !important;
  z-index: 2147483647 !important;
  padding: 3px !important;
  border-radius: 2.25px !important;
  box-sizing: border-box !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-family-picker .sfpm-bhpm-dropdown-menu{
  width: 178px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-size-picker .sfpm-bhpm-dropdown-menu{
  width: 74px !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-picker.is-open .sfpm-bhpm-dropdown-menu{
  display: block !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-item{
  appearance: none !important;
  -webkit-appearance: none !important;
  display: block !important;
  width: 100% !important;
  min-height: 24px !important;
  margin: 0 !important;
  padding: 4px 7px !important;
  border: 0 !important;
  border-radius: 1.5px !important;
  background: #fff !important;
  color: #111827 !important;
  text-align: left !important;
  font-size: 13px !important;
  line-height: 16px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-item:hover,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-item.is-selected{
  background: #e5f1fb !important;
  color: #111827 !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-x{
  fill: currentColor !important;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-n{
  fill: currentColor !important;
  opacity: .9 !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-controls{
  height: 21px !important;
  gap: 2px !important;
  margin-right: 4px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-btn,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-btn{
  height: 21px !important;
  min-height: 21px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-family-btn{
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-size-btn{
  width: 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-icon{
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-icon svg{
  width: 14px !important;
  height: 14px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-label{
  font-size: 11px !important;
  line-height: 19px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-family-btn .sfpm-bhpm-dropdown-label{
  max-width: 58px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-size-btn .sfpm-bhpm-dropdown-label{
  max-width: 22px !important;
}
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-font-family-picker .sfpm-bhpm-dropdown-menu{
  width: 170px !important;
}

/* Posts edit keeps only font family and font size; no upper/lower index or case controls. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-btn,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-case-btn{
  display: none !important;
}

/* Posts are Visual-only: hide Visual/Text editor switches and the HTML quicktags holder. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode.sfpm-bhpm-post-visual-only .wp-editor-tabs,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode.sfpm-bhpm-post-visual-only .wp-switch-editor.switch-tmce,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode.sfpm-bhpm-post-visual-only .wp-switch-editor.switch-html,
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-posts-mode.sfpm-bhpm-post-visual-only .sfpm-bhpm-quicktags-inline-holder{
  display: none !important;
}

.sfpm-bhpm-setup-required {
  padding: 14px 16px;
  border: 1px dashed #b8c2cc;
  border-radius: 6px;
  background: #f8fafc;
  color: #334155;
  line-height: 1.45;
}

.sfpm-bhpm-new-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


/* =========================================================
   TinyMCE toolbar command/focus fix v2.8.33
   - Ensure the compact moved toolbar remains clickable in the modal.
   ========================================================= */
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-toolbar-grp,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-toolbar,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-container-body,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .mce-btn button,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-dropdown-btn,
.sfpm-bhpm-view-editor .sfpm-bhpm-tinymce-inline-holder .sfpm-bhpm-index-btn{
  pointer-events: auto !important;
}


/* =========================================================
   Save status confirmation modal v2.8.33
   ========================================================= */
.sfpm-bhpm-save-status-dialog{
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10000030;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-sizing: border-box;
}
.sfpm-bhpm-save-status-dialog.is-open{
  display: flex;
}
.sfpm-bhpm-save-status-card{
  width: min(430px, calc(100% - 28px));
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 13.5px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.34);
  padding: 26px 28px 24px;
  text-align: center;
  color: #0f172a;
}
.sfpm-bhpm-save-status-icon{
  width: 54px;
  height: 54px;
  border-radius: 12px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(22,163,74,0.96), rgba(21,128,61,0.96));
  color: #fff;
  font-size: 31px;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(21,128,61,0.22);
}
.sfpm-bhpm-save-status-title{
  font-size: 21px;
  line-height: 1.25;
  font-weight: 800;
  margin-bottom: 8px;
}
.sfpm-bhpm-save-status-text{
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
  margin-bottom: 20px;
}
.sfpm-bhpm-save-status-ok{
  min-width: 110px !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(220,38,38,0.96), rgba(153,27,27,0.92)) !important;
  color: #fff !important;
  font-weight: 800 !important;
  letter-spacing: .01em;
  box-shadow: 0 10px 24px rgba(153,27,27,0.20) !important;
  cursor: pointer !important;
}
.sfpm-bhpm-save-status-ok:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(153,27,27,0.24) !important;
}
.sfpm-bhpm-save-status-ok:focus{
  outline: 2px solid rgba(220,38,38,0.32) !important;
  outline-offset: 3px !important;
}

/* v2.8.34: Save confirmation needs only the headline and OK button. */
.sfpm-bhpm-save-status-text{
  display:none !important;
}


/* ===== Dual Web admin / Personal Zone login ===== */
.sfpm-bhpm-pz-login-open-btn,
.sfpm-bhpm-pz-open-btn{
  font-family:var(--sfpm-font);
  border:1px solid rgba(153,27,27,.35);
  padding:5px 9px;
  cursor:pointer;
  border-radius:3px;
  background:linear-gradient(180deg,rgba(153,27,27,.92),rgba(91,15,15,.92));
  color:#fff;
  font-size:11px;
  font-weight:600;
  letter-spacing:.1px;
  text-shadow:0 1px 0 rgba(0,0,0,.18);
  transition:transform .12s ease,box-shadow .12s ease,filter .12s ease;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 18px rgba(153,27,27,.18);
}

.sfpm-bhpm-pz-login-open-btn:hover,
.sfpm-bhpm-pz-open-btn:hover{
  transform:translateY(-1px);
  filter:brightness(1.03);
  box-shadow:0 14px 26px rgba(220,38,38,.20);
}

.sfpm-bhpm-pz-login-open-btn:active,
.sfpm-bhpm-pz-open-btn:active{
  transform:translateY(0);
}

.sfpm-bhpm-login-modal .sfpm-bhpm-panel{
  width:min(380px,calc(100% - 32px));
}

.sfpm-bhpm-login-header{
  gap:14px;
}

.sfpm-bhpm-login-header .sfpm-bhpm-title{
  flex:0 0 auto;
}

.sfpm-bhpm-login-mode-tabs{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  justify-content:center;
  gap:6px;
}

.sfpm-bhpm-login-mode-btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.30);
  border-radius:12px;
  padding:8px 14px;
  background:rgba(255,255,255,.11);
  color:#fff;
  font-family:var(--sfpm-font);
  font-size:12px;
  font-weight:700;
  cursor:pointer;
  transition:background .12s ease,transform .12s ease,box-shadow .12s ease;
}

.sfpm-bhpm-login-mode-btn:hover:not(:disabled){
  background:rgba(255,255,255,.20);
  transform:translateY(-1px);
}

.sfpm-bhpm-login-mode-btn.is-active{
  background:#fff;
  color:#7f1d1d;
  border-color:#fff;
  box-shadow:0 8px 18px rgba(0,0,0,.16);
}

.sfpm-bhpm-login-mode-btn:disabled{
  opacity:.42;
  cursor:not-allowed;
}

.sfpm-bhpm-login-pane{
  display:none;
}

.sfpm-bhpm-login-pane.is-active{
  display:block;
}

.sfpm-bhpm-pz-login-form.is-hidden,
.sfpm-bhpm-pz-authenticated-state.is-hidden{
  display:none !important;
}

.sfpm-bhpm-pz-login-form input[type="text"],
.sfpm-bhpm-pz-login-form input[type="password"]{
  width:100%;
  box-sizing:border-box;
}

.sfpm-bhpm-pz-login-form .login-remember label{
  display:flex;
  align-items:center;
  gap:7px;
  margin:0;
}

.sfpm-bhpm-pz-login-submit,
.sfpm-bhpm-pz-open-from-login-btn{
  border:1px solid rgba(220,38,38,.35);
  background:linear-gradient(180deg,rgba(220,38,38,.96),rgba(153,27,27,.92));
  color:#fff;
  padding:9px 14px;
  border-radius:12px;
  font-family:var(--sfpm-font);
  font-weight:700;
  cursor:pointer;
}

.sfpm-bhpm-pz-login-submit:disabled{
  opacity:.62;
  cursor:wait;
}

.sfpm-bhpm-pz-login-msg{
  min-height:20px;
  margin-top:8px;
  font-size:12px;
  line-height:1.4;
}

.sfpm-bhpm-pz-login-msg.is-error{
  color:#991b1b;
}

.sfpm-bhpm-pz-login-msg.is-success{
  color:#166534;
}

.sfpm-bhpm-login-state{
  padding:16px;
  border:1px solid rgba(15,23,42,.10);
  border-radius:10.5px;
  background:rgba(255,255,255,.82);
  color:var(--sfpm-text);
  font-size:13px;
  line-height:1.45;
}

.sfpm-bhpm-login-state p{
  margin:0 0 12px;
}

.sfpm-bhpm-login-state-error{
  color:#991b1b;
  border-color:rgba(153,27,27,.22);
  background:rgba(254,242,242,.92);
}

@media (max-width:1000px){
  .sfpm-bhpm-pz-login-open-btn,
  .sfpm-bhpm-pz-open-btn{
    display:none !important;
  }
}

@media (max-width:620px){
  .sfpm-bhpm-login-header{
    align-items:flex-start;
    flex-wrap:wrap;
  }

  .sfpm-bhpm-login-header .sfpm-bhpm-title{
    flex:1 1 auto;
  }

  .sfpm-bhpm-login-mode-tabs{
    order:3;
    flex:1 0 100%;
  }

  .sfpm-bhpm-login-mode-btn{
    flex:1 1 50%;
    padding:8px 9px;
  }
}


/* v2.9.1: Personal Zone first, compact equal-sized login dialog. */
.sfpm-bhpm-login-modal .sfpm-bhpm-panel{
  width:min(380px,calc(100% - 32px));
}

.sfpm-bhpm-login-header{
  gap:10px;
}

.sfpm-bhpm-login-mode-tabs{
  justify-content:stretch;
}

.sfpm-bhpm-login-mode-btn{
  flex:1 1 50%;
  text-align:center;
  padding:8px 10px;
}

.sfpm-bhpm-web-login-form .login-submit,
.sfpm-bhpm-pz-login-form .login-submit{
  margin-top:14px;
}

.sfpm-bhpm-web-login-form .login-submit .button,
.sfpm-bhpm-web-login-form input[type="submit"],
.sfpm-bhpm-pz-login-submit{
  width:100%;
  box-sizing:border-box;
  min-height:42px;
  border:1px solid rgba(220,38,38,.35) !important;
  background:linear-gradient(180deg,rgba(220,38,38,.96),rgba(153,27,27,.92)) !important;
  color:#fff !important;
  padding:9px 14px !important;
  border-radius:12px !important;
  font-family:var(--sfpm-font) !important;
  font-size:14px !important;
  font-weight:700 !important;
  line-height:1.2 !important;
  cursor:pointer;
  text-align:center;
  box-shadow:0 8px 16px rgba(2,6,23,.06);
}

.sfpm-bhpm-web-login-form .login-submit .button:hover,
.sfpm-bhpm-web-login-form input[type="submit"]:hover,
.sfpm-bhpm-pz-login-submit:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 22px rgba(2,6,23,.10);
}

.sfpm-bhpm-web-login-form .login-username,
.sfpm-bhpm-web-login-form .login-password,
.sfpm-bhpm-web-login-form .login-remember,
.sfpm-bhpm-pz-login-form p{
  margin:12px 0;
}

.sfpm-bhpm-web-login-form label,
.sfpm-bhpm-pz-login-form label{
  display:block;
  font-weight:600;
  color:var(--sfpm-text);
  margin-bottom:7px;
  font-size:14px;
}

.sfpm-bhpm-web-login-form .login-remember label,
.sfpm-bhpm-pz-login-form .login-remember label{
  display:flex;
  align-items:center;
  gap:7px;
  margin:0;
}


/* v2.9.4: Login mode buttons sit below the header and fill the dialog body width. */
.sfpm-bhpm-login-modal .sfpm-bhpm-login-header{
  gap:10px;
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-header .sfpm-bhpm-title{
  flex:1 1 auto;
  min-width:0;
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-tabs{
  width:100%;
  box-sizing:border-box;
  display:flex;
  align-items:stretch;
  justify-content:stretch;
  gap:8px;
  margin:0 0 14px;
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn{
  flex:1 1 50%;
  min-width:0;
  min-height:42px;
  border:1px solid rgba(91,15,15,.24);
  border-radius:9px;
  padding:9px 10px;
  background:rgba(255,255,255,.92);
  color:#5b0f0f;
  font-family:var(--sfpm-font);
  font-size:13px;
  font-weight:700;
  line-height:1.2;
  text-align:center;
  cursor:pointer;
  box-shadow:0 5px 12px rgba(2,6,23,.05);
  transition:background .12s ease,color .12s ease,transform .12s ease,box-shadow .12s ease,border-color .12s ease;
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn:hover:not(:disabled){
  background:#fff;
  border-color:rgba(153,27,27,.42);
  transform:translateY(-1px);
  box-shadow:0 9px 18px rgba(2,6,23,.08);
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn.is-active{
  background:linear-gradient(180deg,rgba(220,38,38,.96),rgba(153,27,27,.92));
  color:#fff;
  border-color:rgba(153,27,27,.75);
  box-shadow:0 8px 18px rgba(153,27,27,.18);
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn:disabled{
  opacity:.42;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

@media (max-width:620px){
  .sfpm-bhpm-login-modal .sfpm-bhpm-login-header{
    align-items:center;
    flex-wrap:nowrap;
  }

  .sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-tabs{
    order:initial;
    flex:initial;
  }

  .sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn{
    flex:1 1 50%;
    padding:9px 7px;
  }
}

/* v2.9.5: Strong active login-mode highlight and stable equal dialog height. */
.sfpm-bhpm-login-modal .sfpm-bhpm-body{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto auto;
  align-items:start;
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-tabs{
  grid-column:1;
  grid-row:1;
}

/* Keep both panes in the same grid track so the dialog height is based on
   the taller pane and does not jump when switching modes. */
.sfpm-bhpm-login-modal .sfpm-bhpm-login-pane{
  display:block;
  grid-column:1;
  grid-row:2;
  min-width:0;
  visibility:hidden;
  opacity:0;
  pointer-events:none;
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-pane.is-active{
  visibility:visible;
  opacity:1;
  pointer-events:auto;
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn{
  background:#f8fafc;
  color:#5b0f0f;
  border:2px solid rgba(91,15,15,.18);
  box-shadow:0 3px 8px rgba(2,6,23,.04);
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn:hover:not(:disabled):not(.is-active){
  background:#fff;
  color:#7f1d1d;
  border-color:rgba(153,27,27,.42);
}

.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn.is-active,
.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn[aria-selected="true"]{
  background:linear-gradient(180deg,#dc2626 0%,#991b1b 100%);
  color:#fff;
  border-color:#7f1d1d;
  box-shadow:
    0 8px 18px rgba(153,27,27,.24),
    inset 0 0 0 1px rgba(255,255,255,.22);
  transform:none;
}



/* v2.9.6: deterministic active-mode highlight and compact authenticated PZ state. */
.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn{
  position:relative;
  isolation:isolate;
}
.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn.is-active,
.sfpm-bhpm-login-modal .sfpm-bhpm-login-mode-btn[aria-selected="true"],
.sfpm-bhpm-login-modal[data-active-login-mode="personal"] .sfpm-bhpm-login-mode-btn[data-login-mode="personal"],
.sfpm-bhpm-login-modal[data-active-login-mode="web"] .sfpm-bhpm-login-mode-btn[data-login-mode="web"]{
  background:linear-gradient(180deg,#dc2626 0%,#991b1b 100%)!important;
  color:#fff!important;
  border-color:#7f1d1d!important;
  font-weight:800!important;
  box-shadow:0 9px 20px rgba(153,27,27,.30),inset 0 0 0 1px rgba(255,255,255,.24)!important;
  opacity:1!important;
}
.sfpm-bhpm-login-modal[data-active-login-mode="personal"] .sfpm-bhpm-login-mode-btn[data-login-mode="web"]:not(:disabled),
.sfpm-bhpm-login-modal[data-active-login-mode="web"] .sfpm-bhpm-login-mode-btn[data-login-mode="personal"]:not(:disabled){
  background:#f8fafc!important;
  color:#5b0f0f!important;
  border-color:rgba(91,15,15,.18)!important;
  box-shadow:0 3px 8px rgba(2,6,23,.04)!important;
}

/* Center the logged-in Personal Zone message and action. */
.sfpm-bhpm-login-modal .sfpm-bhpm-pz-authenticated-state{
  text-align:center;
}
.sfpm-bhpm-login-modal .sfpm-bhpm-pz-authenticated-state:not(.is-hidden){
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.sfpm-bhpm-login-modal .sfpm-bhpm-pz-authenticated-state p{
  width:100%;
  margin:0 0 10px;
  text-align:center;
}
.sfpm-bhpm-login-modal .sfpm-bhpm-pz-open-from-login-btn{
  display:block;
  width:auto;
  min-width:190px;
  margin:0 auto;
  text-align:center;
}

/* Once Personal Zone authentication is known, compact the whole login dialog
   by roughly one third while preserving the equal-height pane stack. The
   Personal-zone and Web-admin tabs therefore still switch without a height jump. */
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-body{
  padding-top:10px;
  padding-bottom:10px;
}
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-login-mode-tabs{
  margin-bottom:8px;
}
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-login-mode-btn{
  min-height:36px;
  padding:6px 8px;
}
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-pz-authenticated-state{
  min-height:0;
  padding:9px 11px;
  border-radius:9px;
}
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-web-login-form .login-username,
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-web-login-form .login-password,
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-web-login-form .login-remember,
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-pz-login-form p{
  margin:5px 0;
}
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-web-login-form label,
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-pz-login-form label{
  margin-bottom:3px;
  font-size:13px;
}
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-web-login-form input[type="text"],
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-web-login-form input[type="password"],
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-pz-login-form input[type="text"],
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-pz-login-form input[type="password"]{
  min-height:34px;
  padding-top:6px;
  padding-bottom:6px;
}
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-web-login-form .login-submit,
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-pz-login-form .login-submit{
  margin-top:8px;
}
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-web-login-form .login-submit .button,
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-web-login-form input[type="submit"],
.sfpm-bhpm-login-modal.is-pz-authenticated .sfpm-bhpm-pz-login-submit{
  min-height:36px;
  padding:7px 12px!important;
}

@media(max-width:620px){
  .sfpm-bhpm-login-modal .sfpm-bhpm-pz-open-from-login-btn{
    min-width:0;
    width:min(100%,240px);
  }
}

/* v2.9.7: mobile institute-logo entry to Personal Zone.
   Kept in the login plugin so header.php requires no scripts or layout changes. */
@media (max-width:768px){
  .ustarch-main-logo[role="button"]{
    cursor:pointer;
  }
}
.sfpm-bhpm-login-modal.is-mobile-logo-personal-only .sfpm-bhpm-login-mode-tabs,
.sfpm-bhpm-login-modal.is-mobile-logo-personal-only .sfpm-bhpm-login-pane[data-login-pane="web"]{
  display:none!important;
}
.sfpm-bhpm-login-modal.is-mobile-logo-personal-only .sfpm-bhpm-login-pane[data-login-pane="personal"]{
  grid-row:1;
}


/* v2.9.9: bilingual validation warning state. */
.sfpm-bhpm-save-status-dialog.is-warning .sfpm-bhpm-save-status-icon{
  background: linear-gradient(180deg, rgba(245,158,11,0.98), rgba(217,119,6,0.98));
  box-shadow: 0 10px 24px rgba(217,119,6,0.24);
}
.sfpm-bhpm-save-status-dialog.is-warning .sfpm-bhpm-save-status-text{
  display: block !important;
  white-space: pre-line;
}


/* v2.10.0: optional child-page -> News post mirror. */
.sfpm-bhpm-view-editor .sfpm-bhpm-add-news-field{
  padding: 9px 11px;
  border: 1px solid rgba(11,18,32,0.12);
  border-radius: 9px;
  background: rgba(255,255,255,0.58);
}
.sfpm-bhpm-view-editor .sfpm-bhpm-add-news-field .sfpm-bhpm-check-row{
  display:flex !important;
  align-items:center;
  gap:9px;
  margin:0 !important;
  cursor:pointer;
  font-weight:600;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-add-news-checkbox{
  width:18px !important;
  height:18px !important;
  min-width:18px;
  margin:0 !important;
  padding:0 !important;
  flex:0 0 18px;
  accent-color:#991b1b;
}
.sfpm-bhpm-view-editor .sfpm-bhpm-add-news-field .sfpm-bhpm-help{
  margin-left:27px !important;
}


/* =========================================================
   v2.10.1: compact save/warning dialogs + child-page News row alignment
   ========================================================= */
.sfpm-bhpm-save-status-dialog{
  padding: 12px;
  background: rgba(15, 23, 42, 0.30);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}
.sfpm-bhpm-save-status-card{
  width: min(340px, calc(100% - 24px));
  border-radius: 10px;
  padding: 18px 20px 17px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.24);
}
.sfpm-bhpm-save-status-icon{
  width: 42px;
  height: 42px;
  border-radius: 9px;
  margin: 0 auto 10px;
  font-size: 23px;
  box-shadow: 0 6px 16px rgba(21,128,61,0.18);
}
.sfpm-bhpm-save-status-title{
  font-size: 17px;
  line-height: 1.28;
  margin-bottom: 6px;
}
.sfpm-bhpm-save-status-text{
  font-size: 12.5px;
  line-height: 1.42;
  margin-bottom: 14px;
}
.sfpm-bhpm-save-status-ok{
  min-width: 86px !important;
  height: 34px !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
  box-shadow: 0 6px 16px rgba(153,27,27,0.16) !important;
}
.sfpm-bhpm-save-status-ok:hover{
  box-shadow: 0 8px 20px rgba(153,27,27,0.20) !important;
}
.sfpm-bhpm-save-status-dialog.is-warning .sfpm-bhpm-save-status-icon{
  box-shadow: 0 6px 16px rgba(217,119,6,0.18);
}

/* Keep this optional section exactly aligned with the Parent, Title and Content rows. */
.sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-add-news-field{
  width: 95% !important;
  max-width: 95% !important;
  justify-self: center !important;
  box-sizing: border-box !important;
}

@media (max-width: 900px){
  .sfpm-bhpm-view-editor.sfpm-bhpm-editor-page-mode > .sfpm-bhpm-add-news-field{
    width: 100% !important;
    max-width: 100% !important;
  }
}
