/* =============================================================================
   Homepage-Editor (nur auf dev.lcfederal.…)
   ============================================================================= */
.ed-on body {
  padding-top: 52px;
}
.ed-on .site-header {
  top: 52px;
}
.ed-ui,
.ed-overlay {
  font-family: 'Public Sans', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #e8ecf4;
}
.ed-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 14px;
  background: #1a1f2e;
  border-bottom: 2px solid #8b7cff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  overflow-x: auto;
  white-space: nowrap;
}
.ed-spacer {
  flex: 1;
}
.ed-region {
  color: #b9b2ff;
}
.ed-status {
  color: #8ee0a6;
}
.ed-status.ed-warn {
  color: #ffcf6b;
}
.ed-user {
  color: #9aa3b5;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ed-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.8rem;
  border-radius: 7px;
  border: 1px solid #3a4258;
  background: #252b3d;
  color: #e8ecf4;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.ed-btn:hover:not(:disabled) {
  border-color: #8b7cff;
}
.ed-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.ed-btn.ed-primary {
  background: #6d5dfc;
  border-color: #6d5dfc;
  color: #fff;
}
.ed-btn.ed-small {
  padding: 0.3rem 0.55rem;
  font-size: 13px;
}
.ed-btn[hidden] {
  display: none;
}

/* Bearbeitbare Texte */
.ed-on:not(.ed-preview) .ed-text {
  outline: 1px dashed transparent;
  outline-offset: 3px;
  border-radius: 2px;
  cursor: text;
  transition: outline-color 0.12s;
}
.ed-on:not(.ed-preview) .ed-text:hover {
  outline-color: rgba(139, 124, 255, 0.7);
}
.ed-on:not(.ed-preview) .ed-text:focus {
  outline: 2px solid #8b7cff;
  background: rgba(139, 124, 255, 0.08);
}
.ed-on:not(.ed-preview) img.ed-img {
  cursor: pointer;
}
.ed-on:not(.ed-preview) img.ed-img:hover {
  outline: 2px dashed #8b7cff;
  outline-offset: 2px;
}
.ed-on:not(.ed-preview) .ed-item-hover {
  outline: 2px dashed rgba(255, 207, 107, 0.85);
  outline-offset: 4px;
}
/* Im Editor alles sofort sichtbar (keine Einblend-Animation) */
.ed-on .reveal {
  opacity: 1 !important;
  transform: none !important;
}

/* Element-Werkzeuge */
.ed-item-tools {
  position: absolute;
  z-index: 990;
  display: flex;
  gap: 2px;
  padding: 3px;
  background: #1a1f2e;
  border: 1px solid #ffcf6b;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.ed-item-tools[hidden] {
  display: none;
}
.ed-tool {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #3a4258;
  border-radius: 6px;
  background: #252b3d;
  color: #e8ecf4;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  flex: none;
}
.ed-tool:hover {
  border-color: #8b7cff;
}

/* Link-/Bild-Popover */
.ed-popover {
  position: absolute;
  z-index: 995;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  max-width: min(560px, calc(100vw - 16px));
  padding: 0.5rem 0.6rem;
  background: #1a1f2e;
  border: 1px solid #8b7cff;
  border-radius: 9px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.ed-input {
  flex: 1;
  min-width: 160px;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  border: 1px solid #3a4258;
  background: #11151f;
  color: #e8ecf4;
  font: inherit;
}
.ed-input:focus {
  outline: none;
  border-color: #8b7cff;
}
.ed-input.ed-bad {
  border-color: #ff6b6b;
}
textarea.ed-input {
  width: 100%;
  resize: vertical;
}
.ed-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Hinweis unten */
.ed-hint {
  position: fixed;
  left: 50%;
  bottom: 12px;
  z-index: 980;
  transform: translateX(-50%);
  max-width: calc(100vw - 24px);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(26, 31, 46, 0.92);
  border: 1px solid #3a4258;
  font-size: 12.5px;
  text-align: center;
}
.ed-preview .ed-hint {
  display: none;
}
.ed-flash {
  position: fixed;
  top: 64px;
  left: 50%;
  z-index: 1010;
  transform: translateX(-50%);
  padding: 0.6rem 1.1rem;
  border-radius: 9px;
  background: #1f7a45;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* Anmeldung / kein Zugriff */
.ed-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 9, 20, 0.88);
  backdrop-filter: blur(4px);
}
.ed-card {
  max-width: 420px;
  padding: 1.6rem;
  border-radius: 14px;
  background: #1a1f2e;
  border: 1px solid #3a4258;
  text-align: center;
}
.ed-card h2 {
  margin: 0 0 0.5rem;
  color: #fff;
  font-family: inherit;
}
.ed-card p {
  color: #b5bccb;
}
.ed-row {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Einstellungen */
.ed-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1020;
  background: rgba(4, 9, 20, 0.55);
}
.ed-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  width: min(620px, 100vw);
  display: flex;
  flex-direction: column;
  background: #161b28;
  border-left: 1px solid #3a4258;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
}
.ed-panel-head,
.ed-panel-foot {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #2a3145;
}
.ed-panel-foot {
  border-top: 1px solid #2a3145;
  border-bottom: none;
  justify-content: flex-end;
}
.ed-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.ed-tabs {
  display: flex;
  gap: 0.3rem;
  padding: 0.6rem 1rem 0;
  flex-wrap: wrap;
}
.ed-tabs-small {
  padding: 0;
}
.ed-tab {
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  border: 1px solid #3a4258;
  background: transparent;
  color: #b5bccb;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ed-tab.on {
  background: #6d5dfc;
  border-color: #6d5dfc;
  color: #fff;
}
.ed-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.ed-field > span {
  font-weight: 600;
}
.ed-field small,
.ed-note,
.ed-person small {
  color: #8f98ab;
  font-size: 12.5px;
  margin: 0;
}
.ed-list-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ed-thumb {
  width: 72px;
  height: 46px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #3a4258;
  flex: none;
}
.ed-person {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem;
  border: 1px solid #2a3145;
  border-radius: 10px;
  background: #1a1f2e;
}
.ed-person.off {
  opacity: 0.5;
}
.ed-avatar {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #c9a227;
  background: #0b1730;
  color: #e2c35a;
  font: inherit;
  font-weight: 800;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
}
.ed-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ed-person-fields {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 90px;
  gap: 0.35rem;
  min-width: 0;
}
.ed-person-fields .ed-input {
  min-width: 0;
}
.ed-person-fields small {
  grid-column: 1 / -1;
}
.ed-person-actions {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
@media (max-width: 560px) {
  .ed-person-fields {
    grid-template-columns: 1fr;
  }
}
