/* =========================
   MARKETINGHUB – GLOBALT LAYOUT
   ========================= */
:root {
  --bg:#F5F5F5;
  --fg:#000000;
  --muted:#a1a1aa;
  --card:#111827;
  --accent:#60a5fa;
  --ok:#22c55e;
  --err:#ef4444;
}

*{ box-sizing:border-box }

body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font:16px/1.45 system-ui,Segoe UI,Roboto,Arial,sans-serif;
}

.container{
  max-width:980px;
  margin:0 auto;
  padding:16px;
}

.topbar{
  background:#111827;
  border-bottom:1px solid #222;
}

.topbar .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.topbar nav a{
  color:var(--fg);
  text-decoration:none;
  margin-left:12px;
  opacity:.9;
}

.topbar nav a:hover{ opacity:1; }

.card{
  background:var(--card);
  border:1px solid #222;
  border-radius:14px;
  padding:16px;
  box-shadow:0 6px 24px rgba(0,0,0,.25);
}

.card.narrow{
  max-width:420px;
  margin:40px auto;
}

h1,h2{ margin:.2em 0 .6em; }

label{
  display:block;
  margin:10px 0;
}

input{
  width:100%;
  padding:10px;
  border-radius:10px;
  border:1px solid #30363d;
  background:#0f172a;
  color:var(--fg);
}

button{
  padding:10px 14px;
  border-radius:10px;
  border-color:transparent;
  background:#00d1b2;
  color:#fff;
  cursor:pointer;
}

button[disabled]{ opacity:.5; cursor:not-allowed; }

.alert{
  padding:12px;
  border-radius:10px;
  margin:10px 0;
}

.alert.success{
  background:rgba(34,197,94,.15);
  border:1px solid var(--ok);
}

.alert.error{
  background:rgba(239,68,68,.15);
  border:1px solid var(--err);
}

.grid{
  display:grid;
  gap:16px;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  margin-top:16px;
}

.muted{ color:var(--muted); }
.small{ font-size:.9em; }
.tight{ margin:0; padding-left:18px; }

/* Sidebar layout */
.sidebar{
  min-height:100vh;
  position:sticky;
  top:0;
}

.sidebar-inner{
  display:flex;
  flex-direction:column;
  height:100%;
  padding:16px;
}

.sidebar .menu a.is-active{
  background:rgba(255,255,255,.12);
  color:#fff;
}

.menu-list a{ color:#f5f5f5; }

.sidebar .menu .menu-label{ color:#fff; }
.menu-label{ color:#fff; }

/* Submenu styling */
.menu .submenu {
    margin-left: 16px;
    padding-left: 0;
    list-style: none;
    display: none;
}

.menu .submenu li a {
    padding: 6px 8px;
    display: block;
    opacity: 0.85;
}

.menu .submenu li a:hover {
    opacity: 1;
}
.menu-item.open > .submenu {
    display: block;
}


.sidebar .is-static{
  color:#9ca3af;
  pointer-events:none;
}

/* Brand */
.sidebar-brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 6px;
  margin-bottom:10px;
  color:#fff;
  text-decoration:none;
}

.sidebar-brand img{ height:auto; }
.sidebar-brand span{ font-weight:600; }

/* Footer button pinned bottom */
.sidebar-footer{ margin-top:auto; }

/* =========================
   LANDINGPAGE BUILDER – SCOPET STYLING
   ========================= */
/* Wrapper rundt om hele værktøjet */
.lpb-root{
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
  /* vi bruger Marketinghubs baggrund som base */
  background:transparent;
  padding:24px;
  color:#111827;
}

/* Indre kort/container i værktøjet */
.lpb-card{
  max-width:960px;
  margin:0 auto;
  background:#ffffff;
  border-radius:16px;
  padding:24px 24px 32px;
  box-shadow:0 10px 30px rgba(15,23,42,0.08);
}

/* Wrapper for hele landingpage_builder indholdet, hvis ikke du har den allerede */
.lpb-container {
    max-width: 960px;
    margin: 0 auto;
}

/* Grid for templatekort */
.lpb-template-grid {
    display: grid;
    flex-wrap: wrap;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

/* Selve template-kortet */
.lpb-template-card {
    display: flex;
    flex-direction: column;
    width: 280px;               /* 3 pr række i en 960px container med gap */
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

/* Fjern default label-styling */
.lpb-template-card input[type="radio"] {
    margin-bottom: 8px;
}

/* Thumbnail-området */
.lpb-template-thumb {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    margin-bottom: 8px;
}

.lpb-template-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

/* Tekst-info */
.lpb-template-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.lpb-template-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.lpb-template-desc {
    font-size: 12px;
    color: #6b7280;
}

/* Hover-effekt */
.lpb-template-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.15);
}




/* Overskrift i værktøjet */
.lpb-card h1{
  margin-top:0;
  margin-bottom:4px;
}

/* Step-indikator tekst */
.lpb-step-indicator{
  margin-bottom:24px;
  color:#6b7280;
  font-size:0.9rem;
}

    .save-bar {
      position: sticky;
      top: 0;
      z-index: 50;
      /* Træk ud over container-padding så baren går helt til kanten */
      margin: -24px -24px 16px;
      padding: 10px 24px;
      background: rgba(249, 250, 251, 0.96); /* næsten hvid */
      backdrop-filter: blur(4px);
      border-bottom: 1px solid #e5e7eb;
      display: flex;
      justify-content: flex-end;
      align-items: center;
    }

    .save-bar__right {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-left: auto;
    }

    .btn-save {
      margin-top: 0;           /* overstyrer .btn’s margin-top */
      font-size: 0.9rem;
      padding-inline: 16px;
    }

    .save-bar__status {
      font-size: 0.8rem;
      color: #6b7280;
      white-space: nowrap;
    }


/* Formularfelter – kun inde i lpb-root */
.lpb-root label{
  display:block;
  font-weight:500;
  margin:16px 0 4px;
}

.lpb-root input[type="text"],
.lpb-root textarea,
.lpb-root select{
  width:100%;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid #d1d5db;
  font:inherit;
  box-sizing:border-box;
  background:#ffffff;
  color:#111827;
}

.lpb-root textarea{
  min-height:80px;
  resize:vertical;
}

/* Primære/sekundære knapper i værktøjet */
.lpb-btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:8px 18px;
  border:none;
  background:#00d1b2;
  color:#fff;
  font-weight:500;
  cursor:pointer;
  margin-top:20px;
}

.lpb-btn-secondary{
  background:#f5f5f5;
  color:#7a7a7a;
}

.btn-secondary {
    background: #e5e7eb;
    color: #374151;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #d1d5db;
}


/* Produktsektion */
.lpb-product-section{
  border-radius:12px;
  border:1px solid #e5e7eb;
  padding:16px;
  margin-top:16px;
  background:#f9fafb;
}

.lpb-product-section-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}

.lpb-product-section-header strong{
  font-size:0.95rem;
}

/* Knap til at tilføje ekstra sektioner */
.lpb-add-section-btn{
  margin-top:12px;
  font-size:0.9rem;
  background:#eff1fa;
  color:#3850b7;
  border-radius:999px;
  border:none;
  padding:6px 12px;
  display:inline-flex;
  align-items:center;
  gap:4px;
  cursor:pointer;
}

.lpb-optimize-row {
    margin: 8px 0 16px;
    justify-content:center;
    display:flex;
    border-radius:15px;
    border:2px dashed grey;
    width:33%;
    padding-bottom: 20px;
}


/* Alerts i landingpage builder (adskilt fra globale .alert) */
.lpb-alert{
  padding:10px 12px;
  border-radius:8px;
  margin-bottom:16px;
  font-size:0.9rem;
}

.lpb-alert-error{
  background:#fef2f2;
  color:#b91c1c;
  border:1px solid #fecaca;
}

/* HTML-output */
.lpb-html-output{
  white-space:pre;
  font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:0.85rem;
  background:#020617;
  color:#e5e7eb;
  padding:16px;
  border-radius:12px;
  overflow:auto;
  max-height:600px;
}

/* Loading state og spinner til knapperne */
.lpb-btn.is-loading{
  opacity:0.7;
  cursor:wait;
}

.lpb-spinner{
  display:inline-block;
  width:16px;
  height:16px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,0.4);
  border-top-color:#ffffff;
  animation:lpb-spin 0.6s linear infinite;
  margin-left:8px;
  vertical-align:middle;
}

.lpb-spinner.hidden{
  display:none;
}

@keyframes lpb-spin{
  to{ transform:rotate(360deg); }
}


@keyframes spin {
    to { transform: rotate(360deg); }
}
