/* EUI-MVP 2: Mode-Bar und visuelle Editor-Modi */
:root {
  --mw-mode-build-bg: rgba(32, 65, 110, 0.92);
  --mw-mode-sample-bg: rgba(93, 60, 136, 0.94);
  --mw-mode-solo-bg: rgba(28, 96, 78, 0.94);
  --mw-mode-battle-bg: rgba(126, 38, 49, 0.95);
  --mw-mode-b2b-bg: rgba(88, 72, 31, 0.95);
  --mw-mode-border: rgba(255, 255, 255, 0.16);
  --mw-mode-text: rgba(255, 255, 255, 0.96);
  --mw-mode-muted: rgba(255, 255, 255, 0.72);
}

.mw-editor-modebar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--mw-mode-border);
  border-radius: 1rem;
  color: var(--mw-mode-text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.mw-editor-modebar--build { background: linear-gradient(135deg, var(--mw-mode-build-bg), rgba(18, 27, 46, 0.95)); }
.mw-editor-modebar--sample-build { background: linear-gradient(135deg, var(--mw-mode-sample-bg), rgba(28, 20, 48, 0.95)); }
.mw-editor-modebar--solo { background: linear-gradient(135deg, var(--mw-mode-solo-bg), rgba(15, 39, 35, 0.95)); }
.mw-editor-modebar--battle { background: linear-gradient(135deg, var(--mw-mode-battle-bg), rgba(45, 16, 20, 0.97)); }
.mw-editor-modebar--b2b { background: linear-gradient(135deg, var(--mw-mode-b2b-bg), rgba(38, 30, 12, 0.96)); }

.mw-editor-modebar__main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 260px;
  flex: 1 1 420px;
}

.mw-editor-modebar__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.mw-editor-modebar__icon { font-size: 1rem; }

.mw-editor-modebar__info { min-width: 0; }
.mw-editor-modebar__title { font-weight: 800; font-size: 1rem; line-height: 1.2; }
.mw-editor-modebar__description {
  color: var(--mw-mode-muted);
  font-size: 0.83rem;
  line-height: 1.3;
  margin-top: 0.15rem;
}

.mw-editor-modebar__status,
.mw-editor-modebar__locks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
}

.mw-editor-phase,
.mw-editor-chip,
.mw-editor-lock-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  background: rgba(255, 255, 255, 0.11);
  color: rgba(255, 255, 255, 0.91);
  font-size: 0.78rem;
  line-height: 1;
  white-space: nowrap;
}

.mw-editor-lock-chip {
  background: rgba(0, 0, 0, 0.19);
  color: rgba(255, 255, 255, 0.78);
}

.mw-editor-phase__dot {
  width: 0.58rem;
  height: 0.58rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.10);
}

.mw-editor-phase--live .mw-editor-phase__dot,
.mw-editor-phase--running .mw-editor-phase__dot,
.mw-editor-phase--battle .mw-editor-phase__dot,
.mw-editor-phase--recording .mw-editor-phase__dot {
  background: #41ff9e;
  animation: mw-editor-live-pulse 1.2s infinite;
}

.mw-editor-phase--warmup .mw-editor-phase__dot {
  background: #ffd166;
}

.mw-editor-phase--ended .mw-editor-phase__dot,
.mw-editor-phase--finished .mw-editor-phase__dot,
.mw-editor-phase--completed .mw-editor-phase__dot {
  background: #b8c1d6;
  animation: none;
}

@keyframes mw-editor-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(65, 255, 158, 0.44); }
  70% { box-shadow: 0 0 0 8px rgba(65, 255, 158, 0); }
  100% { box-shadow: 0 0 0 0 rgba(65, 255, 158, 0); }
}

.mw-editor-modebar[data-editor-mode="battle"] ~ .mw-editor-layout .mw-panel[data-panel="library"] .mw-panel__locked-note,
.mw-editor-modebar[data-editor-mode="sample_build"] ~ .mw-editor-layout .mw-panel[data-panel="inspector"] .mw-panel__sample-limit-note,
.mw-editor-modebar[data-editor-mode="b2b"] ~ .mw-editor-layout .mw-panel[data-panel="inspector"] .mw-panel__sync-note {
  display: block;
}

.mw-panel__locked-note,
.mw-panel__sample-limit-note,
.mw-panel__sync-note {
  display: none;
  margin-top: 0.65rem;
  padding: 0.65rem;
  border-radius: 0.75rem;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.28);
  font-size: 0.84rem;
}

.mw-editor-locked-action,
[data-mw-mode-locked="true"] {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.35);
}

.mw-editor-mode-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78rem;
}

@media (max-width: 992px) {
  .mw-editor-modebar {
    align-items: flex-start;
  }
  .mw-editor-modebar__status,
  .mw-editor-modebar__locks {
    justify-content: flex-start;
    width: 100%;
  }
}
