/* Kantenbearbeitung — Canvas-Modus + Profil-Modal (apl3-Parität) */

.edge-mode-title {
  position: fixed;
  left: 50%;
  top: calc(var(--topbar-height, 64px) + 1.25rem);
  transform: translateX(-50%);
  z-index: 10000;
  margin: 0;
  padding: 20px 28px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
  text-align: center;
  pointer-events: none;
  max-width: min(92vw, 720px);
  border: 1px solid rgba(229, 50, 45, 0.12);
}

.edge-mode-title__heading {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #212529;
  line-height: 1.25;
  margin-bottom: 10px;
}

.edge-mode-title__text {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: #495057;
}

.edge-mode-title--attention {
  animation: edge-mode-title-attention 1.8s ease-in-out infinite;
}

@keyframes edge-mode-title-attention {
  0%, 100% {
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
  }
  50% {
    box-shadow: 0 10px 32px rgba(229, 50, 45, 0.35), 0 0 0 4px rgba(229, 50, 45, 0.12);
  }
}

.edge-mode-title[hidden],
.edge-mode-actions[hidden] {
  display: none !important;
}

.edge-mode-actions {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  gap: 16px;
  align-items: center;
  pointer-events: auto;
}

.edge-mode-btn {
  min-width: 140px;
  padding: 12px 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.edge-mode-btn--cancel {
  background: #ffffff;
  border-color: #ced4da;
  color: #495057;
}

.edge-mode-btn--cancel:hover {
  background: #f8f9fa;
}

.edge-mode-btn--confirm {
  background: #e5322d;
  border-color: #e5322d;
  color: #ffffff;
}

.edge-mode-btn--confirm:hover {
  background: #d42a25;
}

.edge-mode-btn--confirm.edge-mode-btn--attention {
  box-shadow: 0 0 0 0 rgba(229, 50, 45, 0.45);
  animation: edge-mode-btn-attention 2s ease-in-out infinite;
}

@keyframes edge-mode-btn-attention {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(229, 50, 45, 0.45);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(229, 50, 45, 0);
  }
}

.focus-mode-hint--attention {
  animation: focus-mode-hint-pulse 1.6s ease-in-out infinite;
}

@keyframes focus-mode-hint-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

.edge-profile-selection-body {
  display: grid;
  gap: 16px;
  overflow: visible;
}

.edge-profile-selection-panel {
  overflow: visible;
}

.edge-profile-selection-panel .apl4-modal__body {
  overflow: visible;
}

.edge-profile-selection-info-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.edge-profile-selection-info {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-muted);
}

.edge-profile-info-anchor {
  position: relative;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
}

/* Etwas größer als das „i“, aber nicht die ganze Textzeile —
   Popup liegt bewusst AUSSERHALB der Hitbox, sonst bleibt Hover am großen Bild hängen. */
.edge-profile-info-hit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.edge-profile-info-trigger {
  width: 20px;
  height: 20px;
  border: 1px solid #9ca3af;
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.edge-profile-info-trigger:hover,
.edge-profile-info-trigger.is-active {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.edge-profile-info-popup {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: min(440px, calc(100vw - 64px));
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  padding: 6px;
  z-index: 20020;
  display: none;
  pointer-events: none;
}

.edge-profile-info-hit:hover ~ .edge-profile-info-popup,
.edge-profile-selection-info-row.edge-profile-info-pinned .edge-profile-info-popup {
  display: block;
}

.edge-profile-selection-info-row.edge-profile-info-pinned .edge-profile-info-popup {
  pointer-events: auto;
}

.edge-profile-info-hit:hover .edge-profile-info-trigger,
.edge-profile-selection-info-row.edge-profile-info-pinned .edge-profile-info-trigger {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.edge-profile-info-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  border-radius: 6px;
}

.edge-profile-selection-options {
  display: grid;
  gap: 10px;
}

.edge-profile-selection-option {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #ffffff;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.edge-profile-selection-option:hover {
  border-color: var(--color-brand);
  background: #fff8f8;
}
