/* ============================================================
   Theme editor — zwevend paneel om kleuren, fonts en
   afbeeldingen live te wisselen. Alleen zichtbaar in het
   prototype (niet in productie).
   ============================================================ */

#ae-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9998;
  display: none;
  background: var(--color-navy, #0B1A36);
  color: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  font: 600 13px/1 -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  cursor: pointer;
  align-items: center;
  gap: 8px;
  border: 0;
}
/* Toon FAB alleen wanneer het panel ontgrendeld is (via JS toegevoegde class) */
body.ae-unlocked #ae-toggle { display: inline-flex; }
#ae-toggle:hover { transform: translateY(-1px); }
#ae-toggle svg { width: 14px; height: 14px; }

#ae-panel {
  position: fixed;
  right: 20px;
  bottom: 70px;
  width: 360px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  z-index: 9999;
  background: #fff;
  color: #0F172A;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.22);
  font: 400 13px/1.45 -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
  display: none;
}
#ae-panel.open { display: block; }

#ae-panel .ae-head {
  position: sticky; top: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  background: #0B1A36; color: #fff;
  border-top-left-radius: 14px; border-top-right-radius: 14px;
  z-index: 1;
}
#ae-panel .ae-head strong { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
#ae-panel .ae-head button {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.22);
  padding: 5px 10px; border-radius: 6px; cursor: pointer; font: 500 12px sans-serif;
}
#ae-panel .ae-head button:hover { background: rgba(255,255,255,0.08); }

#ae-panel .ae-tabs {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid #E5E7EB;
  background: #F8FAFC;
}
#ae-panel .ae-tab {
  padding: 12px 6px; border: 0; background: transparent;
  font: 500 12px sans-serif; color: #64748B; cursor: pointer;
  border-bottom: 2px solid transparent;
}
#ae-panel .ae-tab.active { color: #0F172A; border-bottom-color: #E85C1A; background: #fff; }

#ae-panel .ae-body { padding: 16px; }
#ae-panel .ae-section + .ae-section { margin-top: 18px; padding-top: 18px; border-top: 1px solid #E5E7EB; }
#ae-panel h4 { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: #64748B; margin-bottom: 10px; font-weight: 600; }

.ae-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 8px;
  padding: 6px 0;
}
.ae-row label { font-size: 13px; color: #0F172A; }
.ae-row .ae-hex {
  width: 80px; font-family: ui-monospace, monospace; font-size: 11px;
  padding: 4px 6px; border: 1px solid #E5E7EB; border-radius: 4px;
}
.ae-row input[type="color"] {
  width: 28px; height: 28px; padding: 0; border: 1px solid #E5E7EB; border-radius: 4px; background: none; cursor: pointer;
}

.ae-oklch-row {
  padding: 0 0 8px 0;
}
.ae-oklch-row .ae-oklch {
  width: 100%; font-family: ui-monospace, monospace; font-size: 10.5px;
  padding: 4px 6px; border: 1px solid #E5E7EB; border-radius: 4px;
  color: #64748B; background: #F8FAFC;
}

.ae-font-select {
  width: 100%; padding: 8px 10px; border: 1px solid #E5E7EB; border-radius: 8px;
  font-size: 13px; background: #fff; margin-bottom: 8px;
}
.ae-font-custom {
  width: 100%; padding: 8px 10px; border: 1px solid #E5E7EB; border-radius: 8px;
  font-size: 12px; font-family: ui-monospace, monospace; margin-top: 6px;
}
.ae-font-preview {
  padding: 14px 12px; border: 1px solid #E5E7EB; border-radius: 8px;
  background: #F8FAFC; font-size: 20px; line-height: 1.25;
  font-family: var(--font-serif); color: #0F172A;
}

#ae-toggle .ae-kbd {
  background: rgba(255,255,255,0.14); padding: 2px 6px; border-radius: 4px;
  font-size: 10px; font-family: ui-monospace, monospace; margin-left: 4px;
}

.ae-preset-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ae-preset {
  border: 1px solid #E5E7EB; border-radius: 8px; padding: 8px; cursor: pointer;
  background: #fff; font: 500 11px sans-serif; text-align: left;
}
.ae-preset:hover { border-color: #0F172A; }
.ae-preset .swatches { display: flex; gap: 3px; margin-bottom: 6px; }
.ae-preset .swatches span { width: 14px; height: 14px; border-radius: 3px; display: block; }

.ae-font-list { display: flex; flex-direction: column; gap: 6px; }
.ae-font-btn {
  padding: 10px 12px; border: 1px solid #E5E7EB; border-radius: 8px; background: #fff;
  cursor: pointer; font-size: 14px; text-align: left; transition: 120ms;
}
.ae-font-btn:hover { border-color: #0F172A; }
.ae-font-btn.active { border-color: #E85C1A; background: #FBE7DC; }
.ae-font-btn .name { font-size: 11px; color: #64748B; letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 4px; }

.ae-images { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ae-image-slot {
  position: relative;
  border: 1px dashed #CBD5E1; border-radius: 8px; aspect-ratio: 4/3;
  background-size: cover; background-position: center; background-color: #F8FAFC;
  cursor: pointer; overflow: hidden;
  display: flex; align-items: flex-end;
}
.ae-image-slot:hover { border-color: #0F172A; border-style: solid; }
.ae-image-slot .label {
  background: rgba(15,23,42,0.82); color: #fff; font-size: 10px;
  padding: 4px 6px; width: 100%;
  font-family: ui-monospace, monospace;
}
.ae-image-slot input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.ae-image-slot .ae-slot-clear {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 999px;
  border: 0; background: rgba(0,0,0,0.65); color: #fff;
  cursor: pointer; font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.ae-image-slot .ae-slot-clear:hover { background: rgba(0,0,0,0.85); }

.ae-actions { display: flex; gap: 8px; margin-top: 14px; }
.ae-actions button {
  flex: 1; padding: 10px 12px; border-radius: 8px; border: 1px solid #E5E7EB;
  background: #fff; font: 500 12px sans-serif; cursor: pointer;
}
.ae-actions button.primary { background: #0B1A36; color: #fff; border-color: #0B1A36; }
.ae-actions button.primary:hover { background: #07122A; }

.ae-export {
  margin-top: 12px; padding: 10px;
  background: #0F172A; color: #A7E4C8;
  border-radius: 6px; font: 11px/1.5 ui-monospace, monospace;
  white-space: pre-wrap; word-break: break-all; display: none; max-height: 200px; overflow-y: auto;
}
.ae-export.open { display: block; }

.ae-hint { color: #64748B; font-size: 11px; margin-top: 6px; }

/* Hero variant picker */
.ae-hero-variants {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.ae-hero-variant {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.ae-hero-variant:hover { border-color: #94A3B8; }
.ae-hero-variant.active {
  border-color: #0B1A36;
  box-shadow: 0 0 0 2px rgba(11,26,54,.15);
}
.ae-hero-variant-preview {
  width: 100px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  background: #F5EFE4;
  border: 1px solid #E2E8F0;
  flex-shrink: 0;
}
.ae-hero-variant-preview svg {
  width: 100%; height: 100%; display: block;
}
.ae-hero-variant-label {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.ae-hero-variant-label strong {
  font-size: 12px;
  font-weight: 600;
  color: #0B1A36;
  line-height: 1.2;
}
.ae-hero-variant-label span {
  font-size: 11px;
  color: #64748B;
  line-height: 1.35;
}
