/* Albert Lab local editor prototype — v124 */
html.editor-preparing body,
html.editor-content-preparing body { visibility: hidden; }
html.editor-active body { padding-bottom: 76px; }
html.editor-active .editor-editable {
  cursor: text;
  outline: 1px dashed transparent;
  outline-offset: 4px;
  transition: outline-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}
html.editor-active .editor-editable:hover {
  outline-color: rgba(80, 184, 255, .78);
  background: rgba(52, 156, 226, .08);
}
html.editor-active .editor-editable.editor-selected {
  outline: 2px solid #56bfff;
  background: rgba(52, 156, 226, .12);
  box-shadow: 0 0 0 6px rgba(52, 156, 226, .08);
}
html.editor-active img.editor-editable {
  cursor: pointer;
}
html.editor-active .editor-region {
  position: relative;
}
html.editor-active .editor-region::after {
  content: "EDITABLE BOX";
  position: absolute;
  z-index: 12;
  top: 7px;
  right: 7px;
  padding: 3px 6px;
  border: 1px solid rgba(86,191,255,.5);
  background: rgba(3,15,28,.82);
  color: #9edaff;
  font: 700 9px/1.2 Nunito Sans, system-ui, sans-serif;
  letter-spacing: .09em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
}
html.editor-active .editor-region:hover::after { opacity: 1; }
html.editor-preview .editor-editable,
html.editor-preview .editor-editable:hover,
html.editor-preview .editor-editable.editor-selected {
  cursor: inherit;
  outline: none;
  background: transparent;
  box-shadow: none;
}
html.editor-preview .editor-region::after { display: none; }

.editor-toolbar {
  position: fixed;
  z-index: 10020;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid rgba(125,196,238,.32);
  border-radius: 14px;
  background: rgba(3,14,26,.96);
  color: #eff9ff;
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
  font: 600 13px/1.2 Nunito Sans, system-ui, sans-serif;
  backdrop-filter: blur(18px);
}
.editor-toolbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 185px;
  padding-right: 10px;
  border-right: 1px solid rgba(255,255,255,.13);
}
.editor-toolbar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4fd195;
  box-shadow: 0 0 0 5px rgba(79,209,149,.12);
}
.editor-toolbar-brand strong { display: block; font-size: 13px; }
.editor-toolbar-brand small { display: block; margin-top: 2px; color: #96acbc; font-size: 10px; font-weight: 600; }
.editor-toolbar-status { margin-left: auto; color: #9cb3c3; font-size: 11px; }
.editor-toolbar button,
.editor-toolbar label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  color: #eef8ff;
  font: inherit;
  cursor: pointer;
}
.editor-toolbar button:hover,
.editor-toolbar label:hover { background: rgba(86,191,255,.15); border-color: rgba(86,191,255,.48); }
.editor-toolbar .editor-primary { background: #1775ae; border-color: #3ba7e8; }
.editor-toolbar .editor-danger { color: #ffc5c5; }
.editor-toolbar input[type=file] { display:none; }

.editor-inspector {
  position: fixed;
  z-index: 10030;
  top: max(84px, calc(var(--header-h, 72px) + 14px));
  right: 16px;
  width: min(380px, calc(100vw - 32px));
  max-height: calc(100vh - 172px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(125,196,238,.34);
  border-radius: 14px;
  background: rgba(3,14,26,.97);
  color: #eff9ff;
  box-shadow: 0 22px 70px rgba(0,0,0,.48);
  font: 600 13px/1.4 Nunito Sans, system-ui, sans-serif;
  backdrop-filter: blur(18px);
}
.editor-inspector[hidden] { display:none; }
.editor-inspector-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.editor-inspector h2 { margin:0; color:#fff; font-size:18px; line-height:1.1; }
.editor-inspector-subtitle { margin:4px 0 0; color:#92aabc; font-size:11px; overflow-wrap:anywhere; }
.editor-inspector-close { width:32px; height:32px; padding:0; border:1px solid rgba(255,255,255,.16); border-radius:8px; background:transparent; color:#fff; cursor:pointer; }
.editor-field { display:block; margin:0 0 13px; }
.editor-field > span { display:block; margin-bottom:6px; color:#b7cfde; font-size:11px; text-transform:uppercase; letter-spacing:.08em; }
.editor-field textarea,
.editor-field input[type=text],
.editor-field input[type=url] {
  display:block;
  width:100%;
  box-sizing:border-box;
  padding:10px 11px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:9px;
  background:#071b2c;
  color:#f4fbff;
  font:500 13px/1.45 Nunito Sans, system-ui, sans-serif;
}
.editor-field textarea { min-height:150px; resize:vertical; }
.editor-field input[type=range] { width:100%; accent-color:#56bfff; }
.editor-field-note { margin:-5px 0 13px; color:#89a2b4; font-size:11px; }
.editor-image-preview { width:100%; max-height:190px; object-fit:contain; margin:0 0 12px; border:1px solid rgba(255,255,255,.15); background:#fff; }
.editor-inspector-actions { display:flex; flex-wrap:wrap; gap:8px; padding-top:4px; }
.editor-inspector-actions button,
.editor-file-button {
  min-height:36px;
  padding:0 11px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:8px;
  background:rgba(255,255,255,.06);
  color:#f0f9ff;
  font:700 12px/1 Nunito Sans, system-ui, sans-serif;
  cursor:pointer;
}
.editor-file-button input { display:none; }
.editor-inspector-actions .editor-danger { color:#ffc1c1; }
.editor-toast {
  position:fixed;
  z-index:10040;
  right:20px;
  bottom:86px;
  max-width:min(420px, calc(100vw - 40px));
  padding:11px 14px;
  border:1px solid rgba(125,196,238,.35);
  border-radius:10px;
  background:#071b2c;
  color:#eff9ff;
  box-shadow:0 14px 38px rgba(0,0,0,.35);
  font:700 12px/1.4 Nunito Sans, system-ui, sans-serif;
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
  transition:opacity 160ms ease, transform 160ms ease;
}
.editor-toast.is-visible { opacity:1; transform:translateY(0); }

@media (max-width: 900px) {
  html.editor-active body { padding-bottom: 132px; }
  .editor-toolbar { flex-wrap:wrap; }
  .editor-toolbar-brand { min-width:160px; }
  .editor-toolbar-status { width:100%; order:3; margin:0; }
  .editor-inspector { top:76px; max-height:calc(100vh - 222px); }
}


/* v123 — linked cards are editing surfaces until Preview Mode is enabled. */
html.editor-active:not(.editor-preview) a[href],
html.editor-active:not(.editor-preview) [data-open-url] {
  cursor: text;
}
html.editor-active:not(.editor-preview) a[href] .editor-editable,
html.editor-active:not(.editor-preview) [data-open-url] .editor-editable {
  cursor: text;
}


/* v124 — native-feeling right-click editing menu. */
.editor-context-menu {
  position: fixed;
  z-index: 10050;
  min-width: 168px;
  padding: 6px;
  border: 1px solid rgba(125,196,238,.34);
  border-radius: 10px;
  background: rgba(3,14,26,.98);
  color: #eff9ff;
  box-shadow: 0 16px 44px rgba(0,0,0,.44);
  font: 600 13px/1.25 Nunito Sans, system-ui, sans-serif;
  backdrop-filter: blur(16px);
}
.editor-context-menu[hidden] { display: none; }
.editor-context-menu button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.editor-context-menu button:hover,
.editor-context-menu button:focus-visible { background: rgba(86,191,255,.16); }
.editor-context-menu strong { font-size: 13px; }
.editor-context-menu span { color: #91aabd; font-size: 11px; text-transform: capitalize; }
