.project-editor-save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-primary, #fff);
  border-top: 1px solid var(--border-color, #ddd);
  z-index: 5;
}

.project-editor-save-bar-dirty {
  color: var(--warning-color, #b45309);
  margin-left: 0.5rem;
}

.project-editor-save-bar-dirty--toggle {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-style: dotted;

  &:focus-visible {
    outline: 2px solid var(--primary-color, #2f6e5d);
    outline-offset: 2px;
  }
}

.project-editor-save-bar-changes {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: var(--space-xs, 0.25rem);
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-color, #ddd);
  border-bottom: none;
  box-shadow: var(--shadow-md, 0 -4px 12px rgba(0, 0, 0, 0.08));

  a {
    display: flex;
    justify-content: space-between;
    gap: var(--space-sm, 0.5rem);
    padding: var(--space-xs, 0.25rem) var(--space-sm, 0.5rem);
    border-radius: var(--radius-sm, 4px);
    color: var(--text-primary, #1f322d);
    text-decoration: none;
    font-size: var(--font-size-sm, 0.8125rem);

    &:hover,
    &:focus-visible {
      background: var(--bg-secondary, #f4f4f5);
      outline: none;
    }
  }
}

.project-editor-save-bar-changes__diff {
  color: var(--text-secondary, #6b7280);
  font-size: var(--font-size-xs, 0.75rem);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-editor-save-bar-issues {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
  color: var(--error-color, #b91c1c);

  li.is-warning {
    color: var(--warning-color, #b45309);
  }

  li.is-error {
    color: var(--error-color, #b91c1c);
  }
}

.project-editor-save-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-editor-save-bar-saved-at {
  color: var(--text-secondary, #6b7280);
  margin-left: 0.5rem;
  font-size: 0.85em;
}

.project-editor-save-bar-notice {
  position: absolute;
  top: -2.5rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: color-mix(in srgb, var(--info-color, #1d4ed8) 12%, var(--bg-primary, #eff6ff));
  color: var(--info-color, #1d4ed8);
  border-bottom: 1px solid var(--border-color, #ddd);
}
