.scl-creator .scl-topbar{display:flex;gap:10px;align-items:center;margin:10px 0 18px}
.scl-creator .scl-badge{padding:4px 10px;border:1px solid #ccd0d4;border-radius:999px;background:#fff}
#scl-app{display:grid;grid-template-columns: 320px 1fr;gap:18px;align-items:start}
.scl-card{background:#fff;border:1px solid #ccd0d4;border-radius:12px;padding:14px}
.scl-card h2{margin:0 0 10px;font-size:14px}

/* --------------------------------------------------------------------------
   Live Preview Layout (Editor + Preview)
   Desktop/Tablet: split view
   Mobile: toggle view (Editor | Vorschau)
   -------------------------------------------------------------------------- */

.scl-view-toggle{display:none;gap:8px;align-items:center}
.scl-view-toggle .scl-vbtn{appearance:none;border:1px solid rgba(0,0,0,.14);background:#fff;border-radius:999px;padding:7px 10px;font-weight:800;cursor:pointer;font-size:12px}
.scl-view-toggle .scl-vbtn.is-active{border-color:#111827;box-shadow:0 1px 0 rgba(0,0,0,.04)}

.scl-live-root{display:flex;gap:14px;align-items:flex-start;min-width:0}
.scl-live-editor{min-width:0;flex:1 1 62%}
.scl-live-preview{min-width:0;flex:0 0 38%;max-width:520px;border:1px solid rgba(0,0,0,.12);border-radius:14px;background:#fff;overflow:hidden}
.scl-live-preview-header{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid rgba(0,0,0,.08)}
.scl-live-preview-title{font-size:12px;font-weight:900;opacity:.85}
.scl-live-preview iframe{width:100%;height:calc(100vh - 220px);border:0;display:block}

@media (max-width: 980px){
  .scl-view-toggle{display:flex}
  .scl-live-root{flex-direction:column}
  .scl-live-preview{display:none}
  .scl-live-root[data-view="preview"] .scl-live-editor{display:none}
  .scl-live-root[data-view="preview"] .scl-live-preview{display:block}
  .scl-live-preview iframe{height:calc(100vh - 190px)}
}
.scl-tiles{display:flex;flex-direction:column;gap:10px}
.scl-tile-item{display:flex;justify-content:space-between;gap:10px;align-items:center;border:1px solid #e2e4e7;border-radius:10px;padding:10px;background:#fafbfc;cursor:pointer}
.scl-tile-item.active{outline:2px solid #2271b1;background:#eef5ff}
.scl-muted{color:#6b7280;font-size:12px;margin-top:6px}

/* Fix 23: Architektur-Manifest block */
.scl-manifest textarea{background:rgba(0,0,0,0.02)}
.scl-row{display:flex;gap:10px}
.scl-row > *{flex:1}
.scl-links{display:flex;flex-direction:column;gap:10px}
.scl-link-row{display:flex;gap:10px;align-items:center}
.scl-link-row input{flex:1}
.scl-link-row .scl-link-label{flex:0 0 38%}
.scl-link-row .scl-link-url{flex:1 1 auto}
.scl-link-row .scl-link-remove{flex:0 0 auto}
@media (max-width: 980px){
  #scl-app{grid-template-columns:1fr}
}
.scl-creator select{width:100%;max-width:100%}

/* Creator Editor page: neutralize theme spacing (Twenty Twenty-Five) and hide redundant page title */
body.scl-creator-editor main.wp-block-group.has-global-padding.is-layout-constrained{margin-top:0 !important;}
body.scl-creator-editor main.wp-block-group.has-global-padding.is-layout-constrained > .wp-block-group.alignfull.has-global-padding{padding-top:0 !important; margin-top:0 !important;}
body.scl-creator-editor .wp-site-blocks > header + main.wp-block-group{margin-top:0 !important;}
body.scl-creator-editor .wp-block-post-title{display:none !important;}

/* --------------------------------------------------------------------------
   Hide the default WordPress theme header and footer on Creator pages

   The full‑site editing theme inserts its own header and footer (<header
   class="wp-block-template-part"> and <footer class="wp-block-template-part">).
   When the Schnappnot plugin renders its own global navigation and footer,
   these template parts cause duplicate menus to appear above and below the
   page content.  To ensure a consistent look and avoid confusion, hide
   these theme parts on pages using the creator editor.  We scope the
   selector to the full FSE container (.wp-site-blocks) and to the
   scl-creator-editor body class so only plugin pages are affected.  Landing
   pages are left untouched.
 */
body.scl-creator-editor .wp-site-blocks > header.wp-block-template-part,
body.scl-creator-editor .wp-site-blocks > footer.wp-block-template-part {
  display: none !important;
}

/* Creator Editor container should be wider than auth boxes */
body.scl-creator-editor .scl-auth-box{max-width:1200px !important;}
@media (max-width: 1240px){body.scl-creator-editor .scl-auth-box{max-width:calc(100% - 24px) !important;}}


/* --------------------------------------------------------------------------
   Seitenlayout (Editor Tab) – redesigned
   -------------------------------------------------------------------------- */

.scl-layout-root{
  display:grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap:14px;
  max-width: 1100px;
}

.scl-layout-col{min-width:0}
.scl-layout-card{
  background:#fff;
  border:1px solid rgba(0,0,0,.10);
  border-radius:14px;
  padding:12px;
  box-shadow:0 1px 0 rgba(0,0,0,.03);
  margin:0 0 12px;
}

.scl-layout-card h3{
  margin:0 0 10px;
  font-size:13px;
  font-weight:900;
}

.scl-layout-hint{
  font-size:12px;
  opacity:.72;
  margin:6px 0 0;
}

#scl_preset_preview_big{
  position:relative;
  overflow:hidden;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.10);
  height:200px;
  background:linear-gradient(135deg,#ffd6e7,#c7d2fe);
  display:flex;
  align-items:flex-end;
  padding:12px;
}

#scl_preset_preview_label{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-weight:900;
  font-size:12px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.14);
  color:#111;
  box-shadow:0 10px 28px rgba(0,0,0,.18);
  backdrop-filter: blur(8px);
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.scl-preset-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:8px;
  margin-top:12px;
}

.scl-preset-btn{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
  text-align:left;
}

.scl-preset-btn:focus{outline:2px solid #2271b1; outline-offset:1px}

.scl-preset-btn .scl-swatch{
  width:16px;
  height:16px;
  border-radius:5px;
  border:1px solid rgba(0,0,0,.12);
  flex:0 0 auto;
}

.scl-preset-btn .scl-preset-label{
  font-size:12px;
  font-weight:800;
  max-width:100%;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.scl-layout-controls{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}

.scl-layout-controls .scl-control{
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  padding:10px;
  background:#fff;
}

.scl-layout-controls .scl-control .scl-control-title{
  font-size:12px;
  font-weight:800;
  opacity:.8;
  margin-bottom:8px;
}

.scl-seg{display:flex;gap:6px;flex-wrap:wrap}
.scl-seg button{
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
  cursor:pointer;
  line-height:1;
}
.scl-seg button.is-active{border-color:#111827;box-shadow:0 1px 0 rgba(0,0,0,.04);font-weight:800}

.scl-media-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:12px;
}

.scl-media-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
  flex-wrap:wrap;
}

.scl-media-row img{
  width:56px;
  height:56px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.10);
  object-fit:cover;
  display:block;
}

.scl-media-row .scl-media-meta{
  flex:1 1 240px;
  min-width:220px;
}

.scl-media-row .scl-media-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
  margin-top:6px;
}

.scl-advanced-fields{max-width:1100px;margin:0}
.scl-advanced-fields summary{
  cursor:pointer;
  font-size:12px;
  font-weight:900;
  opacity:.85;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;
  background:#fff;
}
.scl-advanced-fields[open] summary{border-bottom-left-radius:0;border-bottom-right-radius:0}
.scl-advanced-fields > div{
  border:1px solid rgba(0,0,0,.12);
  border-top:0;
  border-bottom-left-radius:14px;
  border-bottom-right-radius:14px;
  padding:12px;
  background:#fff;
}

@media (max-width: 980px){
  .scl-layout-root{grid-template-columns:1fr}
  .scl-layout-controls{grid-template-columns:1fr}
  .scl-preset-grid{grid-template-columns: repeat(2, minmax(0, 1fr));}
  #scl_preset_preview_big{height:180px}
}

/* --- Topbar hover preview popover (desktop) --- */
.scl-preview-popover{
  position:fixed;
  left:0; top:0;
  width:520px;
  height:600px;
  background:#fff;
  border:1px solid rgba(0,0,0,.14);
  border-radius:14px;
  box-shadow:0 20px 60px rgba(0,0,0,.25);
  overflow:hidden;
  z-index:999999;
  display:none;
}
.scl-preview-popover.is-open{display:block;}
.scl-preview-popover-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  background:rgba(248,249,251,.96);
  border-bottom:1px solid rgba(0,0,0,.10);
  font-weight:800;
}
.scl-preview-popover-head .button{
  height:28px;
  line-height:26px;
  padding:0 10px;
  border-radius:999px;
}
.scl-preview-popover iframe{
  width:100%;
  height:calc(100% - 50px);
  border:0;
  display:block;
  background:#fff;
}

/* --------------------------------------------------------------------------
   RC44: unify font family and base colour on creator pages

   To ensure a consistent visual language between the portal and the editor,
   apply a system font stack and a neutral text colour to the entire creator
   editor page.  This mirrors the portal font stack defined in portal.css.
*/
body.scl-creator-editor {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  color: #111;
}

/* P5h: Prevent tab content from shifting to the right on desktop.
   We force the live-editor panels to be full-width and ensure that common
   inner blocks (section/grid) do not acquire auto-centering margins from
   theme/constrained layout rules. */
body.scl-creator-editor .scl-live-editor,
body.scl-creator-editor .scl-panels,
body.scl-creator-editor .scl-panel,
body.scl-creator-editor .scl-acc,
body.scl-creator-editor .scl-acc-body{
  width:100%;
  max-width:none;
}

body.scl-creator-editor .scl-acc-body > *{
  margin-left:0 !important;
  margin-right:0 !important;
}

body.scl-creator-editor .scl-panel .scl-section,
body.scl-creator-editor .scl-panel .scl-grid{
  max-width:1200px;
  margin-left:0;
  margin-right:0;
}
