/* ------------------------------------------------------------
   Keyframes: Einblenden (ohne zusätzliche JS-Klassen)
------------------------------------------------------------ */
@keyframes popupOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes popupBoxIn {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Overlay (etwas stärker abdämpfen) */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.58);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.25rem;

  animation: popupOverlayIn 220ms ease both;
}

/* Card (nicht knallweiß, eher warm/neutral) */
.popup-box {
  position: relative;
  width: min(500px, 100%);
  background: #F6F4F0;
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(0,0,0,.28);
  padding: 1.6rem 1.7rem 1.35rem;

  animation: popupBoxIn 220ms ease both;
}

/* Titel/Text: linksbündig, damit es ruhiger wirkt */
.popup-title {
  margin: 0 3.2rem .75rem 0; /* Platz für X */
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 750;
  text-align: left;
  color: #111827;
}

.popup-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: left;
  white-space: pre-line;
  color: #1f2937;
}

/* Buttons */
.popup-actions {
  display: flex;
  justify-content: flex-start;
  gap: .6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ============================================================================
   Button im Popup: optisch wie Blocs (.sww-button-content)
   ============================================================================ */

/* Grundstil: entspricht deinen Blocs-Regeln */
.popup-button,
.popup-actions a.popup-button,
.popup-actions button.popup-button {
  appearance: none;
  -webkit-appearance: none;
  border-width: 1px;
  border-style: solid;
  border-color: var(--swatch-var-5697) !important;
  border-radius: 7px;
  color: var(--swatch-var-5688) !important;
  background-color: transparent;
  font-weight: bold;

  /* Blocs hat margin-bottom:30px -> im Popup störend */
  margin-bottom: 0 !important;

  /* sinnvolle Button-Basis (Blocs-like) */
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* deine bisherigen Maße kannst du behalten */
  padding: .55rem .85rem;
  font-size: .95rem;
  line-height: 1.2;

  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

/* Hover wie Blocs */
.popup-button:hover,
.popup-actions a.popup-button:hover,
.popup-actions button.popup-button:hover {
  background-color: var(--swatch-var-5956);
}

/* Focus wie Blocs (plus sichtbarer Outline für Tastatur) */
.popup-button:focus,
.popup-actions a.popup-button:focus,
.popup-actions button.popup-button:focus {
  background-color: transparent;
  color: var(--swatch-var-5688) !important;
  outline: 3px solid rgba(0,0,0,.18);
  outline-offset: 2px;
}

/* Falls du eine zweite Button-Klasse nutzt, hier bewusst keine Extra-Farben mehr:
   (sonst kollidiert es mit dem Blocs-Look) */
.popup-button-primary {
  background-color: transparent;
}

/* Close X */
.popup-close {
  position: absolute;
  top: .85rem;
  right: .85rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(17,24,39,.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: #111827;
}

.popup-close:hover {
  background: rgba(17,24,39,.14);
}

.popup-close:focus {
  outline: 3px solid rgba(168,134,70,.35);
  outline-offset: 2px;
}

@media (max-width: 380px) {
  .popup-box {
    padding: 1.25rem 1.1rem 1.1rem;
    border-radius: 16px;
  }
  .popup-title { font-size: 1.25rem; }
  .popup-text { font-size: 1rem; }
}

/* Barrierearm: reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {
  .popup-overlay,
  .popup-box {
    animation: none !important;
  }
}