/* editor.css — CMS sidebar styles
   Only active when ?edit=1 is in the URL (editor-root layout)
*/

/* ── Layout ─────────────────────────────────────────────────── */
.editor-root {
  display: flex;
  width: 100%;
  height: 100%;
  position: fixed;
  inset: 0;
}

.editor-sidebar {
  width: 300px;
  flex-shrink: 0;
  background: #1a1a1a;
  color: #e0ddd7;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-right: 1px solid rgba(255,255,255,0.06);
  font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  z-index: 100;
}

.editor-preview {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* The .app inside editor-preview must fill it fully */
.editor-preview .app {
  position: absolute;
  inset: 0;
}

/* ── Sidebar header ──────────────────────────────────────────── */
.editor-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.editor-logo i { font-size: 16px; color: #a59668; }
.editor-logo span { flex: 1; }
.editor-close-btn {
  margin-left: auto;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: none;
  border: none;
  color: rgba(224,221,215,0.4);
  cursor: pointer;
  font-size: 14px;
  transition: background 120ms, color 120ms;
}
.editor-close-btn:hover { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ── Tab navigation ─────────────────────────────────────────── */
.editor-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.editor-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 4px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(224,221,215,0.45);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 150ms, border-color 150ms;
}
.editor-tab.is-active {
  color: #a59668;
  border-bottom-color: #a59668;
}
.editor-tab:hover:not(.is-active) { color: rgba(224,221,215,0.8); }

/* ── Scrollable content area ────────────────────────────────── */
.editor-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* ── Slide list rows ─────────────────────────────────────────── */
.editor-slide-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: background 120ms, border-color 120ms;
}
.editor-slide-row:hover { background: rgba(255,255,255,0.04); }
.editor-slide-row.is-active {
  background: rgba(165,150,104,0.12);
  border-left-color: #a59668;
}
.editor-slide-row > i {
  font-size: 14px;
  color: rgba(224,221,215,0.35);
  flex-shrink: 0;
}
.editor-slide-row.is-active > i { color: #a59668; }

.editor-slide-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
}
.slide-num {
  font-size: 9px;
  color: rgba(224,221,215,0.3);
  letter-spacing: 0.1em;
}
.slide-type {
  font-size: 11px;
  font-weight: 500;
  color: #e0ddd7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slide-id {
  font-size: 9px;
  color: rgba(224,221,215,0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.editor-slide-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 150ms;
}
.editor-slide-row:hover .editor-slide-actions { opacity: 1; }
.editor-slide-actions button {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  background: none;
  border: none;
  color: rgba(224,221,215,0.5);
  cursor: pointer;
  font-size: 12px;
  transition: background 120ms, color 120ms;
}
.editor-slide-actions button:hover { background: rgba(255,255,255,0.08); color: #e0ddd7; }
.editor-slide-actions button.ef-danger:hover { background: rgba(239,68,68,0.15); color: #ef4444; }
.editor-slide-actions button:disabled { opacity: 0.2; cursor: default; }

/* ── Menu tabs ───────────────────────────────────────────────── */
.editor-menu-tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 12px 12px;
}
.editor-menu-tab {
  text-align: left;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(224,221,215,0.6);
  background: none;
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.editor-menu-tab.is-active,
.editor-menu-tab:hover {
  background: rgba(165,150,104,0.12);
  color: #a59668;
  border-color: rgba(165,150,104,0.3);
}

/* ── Form panel ──────────────────────────────────────────────── */
.ef-panel {
  padding: 4px 14px 16px;
}
.ef-panel-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a59668;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ef-sub-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(224,221,215,0.4);
  margin: 14px 14px 8px;
}

.ef-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.ef-bilingual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 6px;
}
.ef-label {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(224,221,215,0.4);
}
.ef-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 5px;
  color: #e0ddd7;
  font-size: 11px;
  padding: 5px 8px;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 150ms, background 150ms;
  resize: vertical;
  width: 100%;
}
.ef-input:focus {
  outline: none;
  border-color: #a59668;
  background: rgba(165,150,104,0.08);
}

.ef-checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(224,221,215,0.7);
  margin-bottom: 10px;
  cursor: pointer;
}
.ef-checkbox input { accent-color: #a59668; }

/* ── Category block ─────────────────────────────────────────── */
.ef-category {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 7px;
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(255,255,255,0.02);
}
.ef-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(224,221,215,0.5);
}

.ef-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.ef-tag-check {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: rgba(224,221,215,0.5);
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 120ms, color 120ms;
}
.ef-tag-check:hover { background: rgba(255,255,255,0.08); color: #e0ddd7; }
.ef-tag-check input { accent-color: #a59668; margin: 0; }

.ef-items-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.ef-item-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 4px;
  align-items: center;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.ef-icon-btn {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  background: none;
  border: none;
  color: rgba(224,221,215,0.4);
  cursor: pointer;
  font-size: 12px;
  transition: background 120ms, color 120ms;
  flex-shrink: 0;
}
.ef-icon-btn:hover { background: rgba(255,255,255,0.08); color: #e0ddd7; }
.ef-icon-btn.ef-danger:hover { background: rgba(239,68,68,0.15); color: #ef4444; }

.ef-add-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(165,150,104,0.7);
  background: none;
  border: 1px dashed rgba(165,150,104,0.25);
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.ef-add-btn:hover {
  background: rgba(165,150,104,0.08);
  color: #a59668;
  border-color: rgba(165,150,104,0.5);
}
.ef-add-section {
  margin-top: 4px;
}

/* ── Export button ───────────────────────────────────────────── */
.editor-export {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 14px;
  background: #a59668;
  border: none;
  color: #1a1a1a;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 150ms;
  flex-shrink: 0;
}
.editor-export:hover { background: #c4b07e; }
