/* Editor Toolbar */
.editor-toolbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: #1a1a2e;
  color: #fff;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
}

.editor-toolbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.editor-toolbar-label {
  font-weight: 600;
  margin-right: auto;
}

.editor-toolbar-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 8px;
  vertical-align: middle;
}

.editor-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  transition: background 0.2s;
}

.editor-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.editor-btn:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.editor-btn-save {
  background: rgba(74, 222, 128, 0.2);
  border-color: rgba(74, 222, 128, 0.4);
}

.editor-btn-save:hover {
  background: rgba(74, 222, 128, 0.35);
}

/* Editable elements */
.editor-editable {
  outline: 2px dashed rgba(99, 102, 241, 0.4) !important;
  outline-offset: 4px;
  cursor: text;
  transition: outline-color 0.2s, background-color 0.2s;
  border-radius: 4px;
}

.editor-editable:hover {
  outline-color: rgba(99, 102, 241, 0.7) !important;
  background-color: rgba(99, 102, 241, 0.05) !important;
}

.editor-editing {
  outline: 2px solid #6366f1 !important;
  background-color: rgba(99, 102, 241, 0.08) !important;
}

/* Notification */
.editor-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10001;
  background: #1a1a2e;
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.editor-notification-visible {
  transform: translateX(0);
  opacity: 1;
}

.editor-notification-error {
  background: #dc2626;
}

/* Image editable */
.editor-image-editable {
  cursor: pointer !important;
  position: relative;
}

.editor-image-editable::after {
  content: 'Klicken zum Ändern';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.editor-image-editable:hover::after {
  opacity: 1;
}

/* Adjust page padding when editor is active */
.editor-active {
  padding-bottom: 60px !important;
}

/* Print: hide editor elements */
@media print {
  .editor-toolbar,
  .editor-notification {
    display: none !important;
  }

  .editor-editable {
    outline: none !important;
  }
}
