/* Editor mode styling — only active pieces of UI, kept out of site.css. */

/* pencil toggle */
#edit-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: var(--paper);
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}
#edit-toggle:hover { transform: scale(1.08); }
#edit-toggle.mini-settings {
  width: 26px;
  height: 26px;
  font-size: 12px;
  right: 10px;
  bottom: 10px;
  opacity: 0.4;
  box-shadow: none;
}
#edit-toggle.mini-settings:hover { opacity: 1; }

/* floating editor bar */
#editor-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #101010;
  color: #fff;
  padding: 10px 14px;
  border-radius: 30px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  font-size: 11px;
  max-width: calc(100vw - 24px);
  flex-wrap: wrap;
  justify-content: center;
}
#editor-bar[hidden] { display: none; }
.ebar-title { letter-spacing: 0.24em; font-size: 10px; color: #9a9a9a; }
.ebar-label { display: flex; align-items: center; gap: 6px; color: #cfcfcf; }
#editor-bar .e-btn { background: #2a2a2a; color: #fff; border-color: #3a3a3a; }
#editor-bar .ebar-save.is-dirty { background: #1fc77d; border-color: #1fc77d; color: #06130d; }

/* small editor controls */
.e-btn {
  border: 1px solid var(--hairline);
  background: var(--paper);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 4px;
  line-height: 1.4;
}
.e-btn:hover { background: #f2f2f2; }
#editor-bar .e-btn:hover { background: #3a3a3a; }
.e-btn:disabled { opacity: 0.35; cursor: default; }
.e-danger { color: #c0392b; }
.e-select {
  border: 1px solid var(--hairline);
  background: var(--paper);
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  font-family: var(--font);
}

/* toolbars attached to editable regions */
.e-wrap { position: relative; }
.etools {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 30;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 6px;
  opacity: 0.45;
  transition: opacity 0.2s;
}
.e-wrap:hover > .etools, .hero:hover .hero-tools { opacity: 1; }
.hero-tools { top: 14px; left: 14px; opacity: 0.85; }

/* add-item bars */
.eadd {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  border: 1px dashed #cfcfcf;
  border-radius: 8px;
  padding: 14px;
  margin: 30px auto;
  max-width: 680px;
}

/* editable text affordances */
body.editing [data-edit] {
  outline: 1px dashed transparent;
  outline-offset: 3px;
  border-radius: 2px;
  transition: outline-color 0.15s;
  min-width: 1em;
  cursor: text;
}
body.editing [data-edit]:hover { outline-color: #b5b5b5; }
body.editing [data-edit]:focus { outline: 1px dashed #1fc77d; }
body.editing [data-edit]:empty::before {
  content: attr(data-ph);
  color: #b5b5b5;
}

/* placeholder for missing media */
.media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, #fafafa, #fafafa 12px, #f1f1f1 12px, #f1f1f1 24px);
  color: #9a9a9a;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* menu editor rows */
.menu-editor {
  margin: 8vh auto 0;
  max-width: 420px;
  text-align: left;
  border-top: 1px solid var(--hairline);
  padding-top: 10px;
}
.erow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}
.erow-label { flex: 1; font-size: 13px; }

/* keep hero button clickable area sane while editing */
body.editing .hero .btn { pointer-events: auto; }
