/* Live-Textbearbeitung – nur sichtbar für Admins */
body.live-edit-enabled .sow-editable {
  position: relative;
  cursor: default;
}

body.live-edit-enabled .sow-editable:hover {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

body.live-edit-enabled .mc-article h2.sow-editable:hover,
body.live-edit-enabled .mc-article h3.sow-editable:hover {
  outline-color: #fd473a;
}

body.live-edit-enabled .mc-article li.sow-editable {
  position: relative;
  padding-right: 8px;
}

body.live-edit-enabled .mc-article li.sow-editable:hover {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
}

body.live-edit-enabled .mc-article li.sow-editable .sow-edit-btn {
  top: 2px;
  right: -8px;
}

.sow-edit-btn {
  position: absolute;
  top: -12px;
  right: -12px;
  z-index: 10001;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.45);
}

body.live-edit-enabled .sow-editable:hover .sow-edit-btn,
.sow-editable.sow-editable-focus .sow-edit-btn {
  display: flex;
}

.sow-edit-btn:hover {
  background: #1d4ed8;
}

.sow-edit-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.live-edit-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #2563eb;
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 0;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.live-edit-banner-text {
  line-height: 1.3;
}

.live-edit-banner-btn {
  flex: 0 0 auto;
  display: inline-block;
  background: #fff;
  color: #2563eb;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  white-space: nowrap;
}

.live-edit-banner-btn:hover {
  background: #eff6ff;
}

#live-edit-modal {
  position: fixed;
  inset: 0;
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#live-edit-modal.is-open {
  display: flex;
}

.live-edit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.live-edit-dialog {
  position: relative;
  z-index: 1;
  width: min(640px, 100%);
  background: #fff;
  padding: 24px;
  font-family: Arial, Helvetica, sans-serif;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.live-edit-dialog h3 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #1a1a1a;
}

.live-edit-meta {
  margin: 0 0 14px;
  font-size: 12px;
  color: #64748b;
}

.live-edit-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-bottom: none;
  background: #f8fafc;
}

.live-edit-toolbar button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e293b;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

.live-edit-toolbar button:hover {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.live-edit-toolbar button.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.live-edit-toolbar .sep {
  width: 1px;
  align-self: stretch;
  background: #cbd5e1;
  margin: 0 2px;
}

.live-edit-editor {
  width: 100%;
  min-height: 180px;
  max-height: 50vh;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.55;
  box-sizing: border-box;
  background: #fff;
}

.live-edit-editor:focus {
  outline: 2px solid #2563eb;
  outline-offset: 0;
  border-color: #2563eb;
}

.live-edit-editor:empty::before {
  content: "Text hier eingeben …";
  color: #94a3b8;
}

.live-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.live-edit-actions button {
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.live-edit-cancel {
  background: #e2e8f0;
  color: #334155;
}

.live-edit-save {
  background: #2563eb;
  color: #fff;
}

.live-edit-save:hover {
  background: #1d4ed8;
}

.live-edit-status {
  margin: 12px 0 0;
  font-size: 13px;
  min-height: 18px;
}

.live-edit-status.is-error {
  color: #dc2626;
}

.live-edit-status.is-success {
  color: #16a34a;
}
