/* Advoke CV — Editor Remove Buttons & Delete Actions */

.editor-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 28px;
  min-width: 28px;
  padding: 0 var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-muted);
  background-color: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-colors);
  -webkit-tap-highlight-color: transparent;
}

.editor-remove:hover {
  color: var(--color-danger);
  background-color: var(--color-danger-bg);
}

.editor-remove:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: 2px;
}

.editor-remove:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.editor-remove svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.editor-remove__label {
  display: none;
}

@media (min-width: 640px) {
  .editor-remove__label {
    display: inline;
  }
  .editor-remove {
    min-height: 32px;
    padding: 0 var(--space-2-5);
  }
}

.editor-remove--icon-only {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
}

.editor-remove--icon-only .editor-remove__label {
  display: none;
}

.editor-remove--filled {
  color: var(--color-danger);
  background-color: var(--color-danger-bg);
  border-color: transparent;
}

.editor-remove--filled:hover {
  background-color: #FCA5A5;
  color: #7F1D1D;
}

.editor-remove--outline {
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}

.editor-remove--outline:hover {
  border-color: var(--color-danger);
  color: var(--color-danger);
  background-color: transparent;
}

.editor-remove--large {
  min-height: 40px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
}

.editor-remove--large svg {
  width: 16px;
  height: 16px;
}

.editor-remove-confirm {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background-color: var(--white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--space-3);
  z-index: var(--z-dropdown);
  display: none;
  flex-direction: column;
  gap: var(--space-2);
}

.editor-remove-confirm[data-open="true"] {
  display: flex;
}

.editor-remove-confirm__text {
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.4;
  margin: 0;
}

.editor-remove-confirm__text strong {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.editor-remove-confirm__actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}

.editor-remove-confirm__btn {
  min-height: 28px;
  padding: 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background-color: var(--white);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: var(--transition-colors);
}

.editor-remove-confirm__btn:hover {
  background-color: var(--ink-100);
  color: var(--color-text);
}

.editor-remove-confirm__btn--danger {
  background-color: var(--color-danger);
  border-color: var(--color-danger);
  color: var(--white);
}

.editor-remove-confirm__btn--danger:hover {
  background-color: #991B1B;
  color: var(--white);
}

.editor-remove-wrapper {
  position: relative;
  display: inline-flex;
}

.editor-delete-section {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background-color: var(--color-danger-bg);
  border: 1px solid #FCA5A5;
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: var(--color-danger);
  line-height: 1.4;
}

.editor-delete-section__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--color-danger);
}

.editor-delete-section__text {
  flex: 1 1 auto;
  min-width: 0;
}

.editor-delete-section__actions {
  display: flex;
  gap: var(--space-1);
  flex-shrink: 0;
}

.editor-delete-section__btn {
  padding: 2px var(--space-2);
  font-size: var(--text-2xs);
  font-weight: var(--font-weight-semibold);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background-color: transparent;
  color: var(--color-danger);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.editor-delete-section__btn--danger {
  background-color: var(--color-danger);
  color: var(--white);
  text-decoration: none;
}

.editor-delete-section__btn--danger:hover {
  background-color: #991B1B;
}

@media (prefers-reduced-motion: reduce) {
  .editor-remove,
  .editor-remove-confirm__btn {
    transition: none;
  }
}