.DraftEditor {
  min-height: 100vh;
  padding: 1rem;
  position: relative;
  isolation: isolate;
}

.DraftEditor::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--bg-color, #fff);
  filter: var(--user-content-filter);
  z-index: -1;
}

.DraftEditor-container {
  max-width: 42rem;
  margin: 0 auto;
  padding-top: 2rem;
}

.DraftEditor-notFound {
  max-width: 32rem;
  margin: 4rem auto;
  text-align: center;
  padding: 2rem;
}

.DraftEditor-notFound h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--accent-color, #000);
  filter: var(--user-content-filter);
}

.DraftEditor-notFound p {
  color: var(--text-secondary);
}

.DraftEditor-header {
  margin-bottom: 2rem;
}

.DraftEditor-titleInput {
  width: 100%;
  font-size: 2rem;
  font-weight: 600;
  border: none;
  background: transparent;
  padding: 0.5rem 0;
  margin-bottom: 1rem;
  color: var(--accent-color, #000);
  font-family: inherit;
  filter: var(--user-content-filter);
}

.DraftEditor-titleInput:focus {
  outline: none;
  border-bottom: 2px solid var(--accent-color, #000);
}

.DraftEditor-titleInput::placeholder {
  color: var(--text-primary);
  opacity: 0.3;
}

.DraftEditor-descriptionInput {
  width: 100%;
  font-size: 1rem;
  line-height: 1.5;
  border: none;
  background: transparent;
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-family: inherit;
  resize: vertical;
}

.DraftEditor-descriptionInput:focus {
  outline: none;
  border-bottom: 2px solid var(--accent-color, #000);
}

.DraftEditor-descriptionInput::placeholder {
  color: var(--text-secondary);
  opacity: 0.3;
}

.DraftEditor-stops {
  margin-bottom: 2rem;
}

.DraftEditor-stopsTitle {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--accent-color, #000);
  filter: var(--user-content-filter);
}

.DraftEditor-emptyStops {
  color: var(--text-muted);
  font-style: italic;
  padding: 2rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
}

.DraftEditor-stopsList {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.DraftEditor-stop {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  border-left: 3px solid var(--accent-color, #000);
  position: relative;
  isolation: isolate;
}

.DraftEditor-stop::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  filter: var(--user-content-filter);
}

.DraftEditor-stopNumber {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-color, #000);
  color: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.875rem;
  filter: var(--user-content-filter);
}

.DraftEditor-stopContent {
  flex: 1;
}

.DraftEditor-stopContent h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--accent-color, #000);
  filter: var(--user-content-filter);
}

.DraftEditor-stopContent p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.DraftEditor-actions {
  padding-top: 2rem;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: flex-end;
}

.DraftEditor-deleteButton {
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid #e74c3c;
  color: #e74c3c;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.DraftEditor-deleteButton:hover {
  background: #e74c3c;
  color: white;
}

/* Blocked state when multiple tabs */
.DraftEditor-content {
  transition: filter 0.3s ease;
}

.DraftEditor-content.is-blocked {
  filter: blur(4px);
  pointer-events: none;
}

.DraftEditor-blockedOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999;
}

@media (prefers-color-scheme: dark) {
  .DraftEditor-blockedOverlay {
    background: rgba(0, 0, 0, 0.5);
  }
}

.DraftEditor-blockedMessage {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg-primary);
  padding: 2rem 2.5rem;
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  max-width: 400px;
  width: calc(100% - 2rem);
  z-index: 1000;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .DraftEditor-blockedMessage {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  }
}

.DraftEditor-blockedMessage p:first-child {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
  text-transform: lowercase;
  margin: 0 0 0.5rem;
}

.DraftEditor-blockedMessage p:last-child {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-transform: lowercase;
  margin: 0;
}

/* Conflict banner */
.DraftEditor-conflict {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: #f39c12;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  z-index: 1000;
}

.DraftEditor-conflict p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
}

.DraftEditor-conflictActions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.DraftEditor-conflictActions button {
  padding: 0.5rem 1rem;
  border: 1px solid white;
  background: transparent;
  color: white;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
}

.DraftEditor-conflictActions button:hover {
  background: rgba(255, 255, 255, 0.2);
}
