﻿.editor-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 12;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 12, 18, 0.65);
  color: #ffffff;
  font-family: var(--mono);
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.35);
}

.editor-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.editor-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.editor-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 94vw);
  background: rgba(12, 14, 20, 0.9);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateX(105%);
  transition: transform 0.25s ease;
  z-index: 11;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(16px);
}

.editor-panel.is-open {
  transform: translateX(0);
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.editor-title {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.editor-close {
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
}

.editor-body {
  padding: 16px 18px 28px;
  overflow-y: auto;
  display: grid;
  gap: 18px;
}

.editor-section {
  display: grid;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.editor-section h3 {
  margin: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}

.editor-field {
  display: grid;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.editor-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


.editor-field input,
.editor-field textarea,
.editor-field select,
.editor-auth input,
#editor-windows-json {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  padding: 8px 10px;
  font-family: var(--mono);
}

.editor-field textarea,
#editor-windows-json {
  resize: vertical;
}

.editor-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
}

.editor-subtitle {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 6px;
}

.editor-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: var(--mono);
  cursor: pointer;
}

.editor-btn.ghost {
  background: transparent;
}

.editor-actions {
  display: flex;
  gap: 10px;
}

.editor-windows-list {
  display: grid;
  gap: 8px;
}

.editor-window-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
}

.editor-window-row button {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.72rem;
}

.editor-auth {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 20;
}

.editor-auth.is-open {
  opacity: 1;
  pointer-events: auto;
}

.editor-auth-card {
  width: min(360px, 90vw);
  background: rgba(12, 14, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
  display: grid;
  gap: 12px;
}

.editor-muted {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.editor-error {
  color: #ff6b6b;
  font-size: 0.75rem;
  min-height: 16px;
}

.editor-auth-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .editor-toggle {
    right: 12px;
    bottom: 12px;
  }
}
