/* ─── Holzapfel – Ferien-Popup (natives <dialog>, modal, Desktop + Mobil) ─── */

.hz-fhp {
  /* Der globale Reset (* { margin:0 }) hebt die UA-Zentrierung auf – hier explizit */
  position:fixed;
  inset:0;
  margin:auto;
  width:calc(100% - 32px);
  max-width:480px;
  height:fit-content;
  max-height:calc(100% - 32px);
  padding:0;
  border:0;
  background:transparent;
  color:var(--body);
  overflow:visible;
  z-index:9500; /* nur relevant ohne showModal()-Support; sonst Top-Layer */
}
.hz-fhp:not([open]) { display:none; }

.hz-fhp::backdrop {
  background:rgba(15, 35, 71, .55);
}

.hz-fhp[open] { animation:hz-fhp-in .35s cubic-bezier(.32, .72, .24, 1); }
.hz-fhp[open]::backdrop { animation:hz-fhp-fade .35s ease; }

@keyframes hz-fhp-in {
  from { opacity:0; transform:translateY(16px) scale(.98); }
  to   { opacity:1; transform:none; }
}
@keyframes hz-fhp-fade {
  from { opacity:0; }
  to   { opacity:1; }
}

/* Box */
.hz-fhp-box {
  position:relative;
  max-height:calc(100vh - 32px);
  max-height:calc(100dvh - 32px);
  overflow-y:auto;
  background:#fff;
  border:1.5px solid var(--border);
  border-radius:18px;
  box-shadow:0 24px 60px rgba(15, 35, 71, .28);
  padding:40px 36px 36px;
  text-align:center;
}

/* Close-Button (analog Förder-Popup) */
.hz-fhp-close {
  position:absolute;
  top:14px;
  right:14px;
  width:40px;
  height:40px;
  border-radius:50%;
  background:rgba(255, 255, 255, .9);
  border:1.5px solid var(--border);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
  transition:background .2s, border-color .2s, transform .2s;
}
.hz-fhp-close:hover {
  background:var(--navy);
  border-color:var(--navy);
  transform:rotate(90deg);
}
.hz-fhp-close:focus-visible {
  outline:3px solid var(--blue);
  outline-offset:2px;
}
.hz-fhp-close-icon {
  position:relative;
  display:block;
  width:16px;
  height:16px;
}
.hz-fhp-close-icon::before,
.hz-fhp-close-icon::after {
  content:'';
  position:absolute;
  top:50%;
  left:50%;
  width:15px;
  height:2px;
  background:var(--navy);
  border-radius:2px;
  transition:background .2s;
}
.hz-fhp-close-icon::before { transform:translate(-50%, -50%) rotate(45deg); }
.hz-fhp-close-icon::after  { transform:translate(-50%, -50%) rotate(-45deg); }
.hz-fhp-close:hover .hz-fhp-close-icon::before,
.hz-fhp-close:hover .hz-fhp-close-icon::after { background:#fff; }

/* Icon */
.hz-fhp-icon {
  width:60px;
  height:60px;
  margin:0 auto 20px;
  border-radius:50%;
  background:var(--off);
  color:var(--blue);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.75rem;
}

/* Inhalt */
.hz-fhp-title {
  font-size:1.4rem;
  font-weight:800;
  color:var(--navy);
  line-height:1.2;
  letter-spacing:-.015em;
  margin-bottom:14px;
  padding:0 24px; /* Abstand zum Close-Button */
}
.hz-fhp-text {
  font-size:.95rem;
  line-height:1.65;
  color:var(--body);
}
.hz-fhp-text p { margin-bottom:10px; }
.hz-fhp-text p:last-child { margin-bottom:0; }
.hz-fhp-text a { color:var(--blue); text-decoration:underline; text-underline-offset:2px; }
.hz-fhp-text a:hover { color:var(--navy); }

/* Mobil */
@media (max-width: 480px) {
  .hz-fhp { width:calc(100% - 24px); max-height:calc(100% - 24px); }
  .hz-fhp-box {
    max-height:calc(100vh - 24px);
    max-height:calc(100dvh - 24px);
    padding:36px 22px 26px;
  }
  .hz-fhp-close { top:10px; right:10px; width:44px; height:44px; }
  .hz-fhp-icon { width:52px; height:52px; font-size:1.5rem; margin-bottom:16px; }
  .hz-fhp-title { font-size:1.2rem; }
  .hz-fhp-text { font-size:.9rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hz-fhp[open],
  .hz-fhp[open]::backdrop { animation:none; }
  .hz-fhp-close,
  .hz-fhp-close-icon::before,
  .hz-fhp-close-icon::after { transition:none; }
  .hz-fhp-close:hover { transform:none; }
}
