/* Nach sweetalert2.min.css laden – Lib bleibt unangetastet (Updates ok).
   Mappt SweetAlert2 auf ClanConcept-Tokens (Day/Night via tokens.css). */

body .swal2-container {
  /* Popup */
  --swal2-background: var(--surface);
  --swal2-color: var(--text);
  --swal2-border: 1px solid var(--border-strong);
  --swal2-border-radius: var(--radius);
  --swal2-backdrop: rgba(14, 17, 22, 0.55);
  --swal2-outline: 0 0 0 3px var(--accent-glow);

  /* Inputs */
  --swal2-input-background: var(--field);
  --swal2-input-border: 1px solid var(--border-strong);
  --swal2-input-border-radius: var(--radius-sm);
  --swal2-input-box-shadow: none;
  --swal2-input-hover-box-shadow: none;
  --swal2-input-focus-border: 1px solid var(--accent);
  --swal2-input-focus-box-shadow: 0 0 0 3px var(--accent-glow);

  /* Validation / Footer */
  --swal2-validation-message-background: var(--surface-2);
  --swal2-validation-message-color: var(--error-soft);
  --swal2-footer-border-color: var(--border);
  --swal2-footer-background: transparent;
  --swal2-footer-color: var(--muted);
  --swal2-timer-progress-bar-background: rgba(var(--accent-rgb), 0.45);

  /* Close */
  --swal2-close-button-color: var(--muted);
  --swal2-close-button-box-shadow: none;
  --swal2-close-button-focus-box-shadow: var(--swal2-outline);

  /* Buttons: Hover/Active dunkeln die Button-Farbe etwas ab */
  --swal2-action-button-hover: black 12%;
  --swal2-action-button-active: black 18%;
  --swal2-action-button-transition:
    background-color var(--ease),
    border-color var(--ease),
    box-shadow var(--ease),
    color var(--ease);

  /* Confirm = Accent-Primary (wie CC-Links/CTAs) */
  --swal2-confirm-button-background-color: var(--accent);
  --swal2-confirm-button-color: var(--on-accent);
  --swal2-confirm-button-border-radius: var(--radius-sm);
  --swal2-confirm-button-box-shadow: none;

  /* Deny = destruktiv */
  --swal2-deny-button-background-color: var(--red);
  --swal2-deny-button-color: #fff;
  --swal2-deny-button-border-radius: var(--radius-sm);
  --swal2-deny-button-box-shadow: none;

  /* Cancel = Secondary (wie .default_button) */
  --swal2-cancel-button-background-color: var(--surface-2);
  --swal2-cancel-button-color: var(--text);
  --swal2-cancel-button-border-radius: var(--radius-sm);
  --swal2-cancel-button-box-shadow: none;

  /* Toast */
  --swal2-toast-border: 1px solid var(--border-strong);
  --swal2-toast-box-shadow: var(--shadow);
}

body .swal2-container .swal2-popup {
  font-family: var(--font);
  box-shadow: var(--shadow);
}

body .swal2-container .swal2-title {
  color: var(--text);
  font-weight: 700;
}

body .swal2-container .swal2-html-container {
  color: var(--muted);
}

body .swal2-container .swal2-styled {
  font-family: var(--font);
  font-weight: 650;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid transparent;
}

body .swal2-container .swal2-styled.swal2-confirm {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

body .swal2-container .swal2-styled.swal2-confirm:hover {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

body .swal2-container .swal2-styled.swal2-deny {
  border-color: color-mix(in srgb, var(--red) 55%, transparent);
}

body .swal2-container .swal2-styled.swal2-deny:hover {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 22%, transparent);
}

body .swal2-container .swal2-styled.swal2-cancel {
  border-color: var(--border-strong);
}

body .swal2-container .swal2-styled.swal2-cancel:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Icons an Feedback-Farben anbinden */
body .swal2-container .swal2-icon.swal2-warning {
  border-color: var(--orange);
  color: var(--orange);
}

body .swal2-container .swal2-icon.swal2-error {
  border-color: var(--red);
  color: var(--red);
}

body .swal2-container .swal2-icon.swal2-error [class^="swal2-x-mark-line"] {
  background-color: var(--red);
}

body .swal2-container .swal2-icon.swal2-success {
  border-color: var(--green);
  color: var(--green);
}

body .swal2-container .swal2-icon.swal2-success [class^="swal2-success-line"],
body .swal2-container .swal2-icon.swal2-success .swal2-success-ring {
  border-color: var(--green);
  background-color: var(--green);
}

body .swal2-container .swal2-icon.swal2-success .swal2-success-ring {
  background-color: transparent;
  border-color: color-mix(in srgb, var(--green) 35%, transparent);
}

body .swal2-container .swal2-icon.swal2-success [class^="swal2-success-line"] {
  background-color: var(--green);
}

body .swal2-container .swal2-icon.swal2-info {
  border-color: var(--blue);
  color: var(--blue);
}

body .swal2-container .swal2-icon.swal2-question {
  border-color: var(--accent);
  color: var(--accent);
}

/* Destruktive Bestätigung (optional: customClass.confirmButton = 'cc-swal-danger') */
body .swal2-container .swal2-styled.cc-swal-danger {
  --swal2-confirm-button-background-color: var(--red);
  --swal2-confirm-button-color: #fff;
  background-color: var(--red);
  color: #fff;
  border-color: color-mix(in srgb, var(--red) 55%, transparent);
}

body .swal2-container .swal2-styled.cc-swal-danger:hover {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 22%, transparent);
}
