@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Jost:wght@600;700;800&display=swap');

/* Wie .h4h-room: gelber Body, Petrol-Akzente, kein Weiß-Panel */

.h4h-popup-overlay {
  --teal-900: #002b2b;
  --teal-700: #013c39;
  --yellow: #ffcc00;
  --ink: #002b2b;
  --ink-soft: rgba(0, 43, 43, 0.78);

  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 20, 20, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
.h4h-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.h4h-popup-overlay *,
.h4h-popup-overlay *::before,
.h4h-popup-overlay *::after {
  box-sizing: border-box;
}

.h4h-popup-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  color: var(--ink);
  border-radius: 22px;
  background: linear-gradient(150deg, #ffd633 0%, #ffcc00 45%, #ffbe00 100%);
  box-shadow: 0 24px 50px rgba(0, 43, 43, 0.35);
  transform: translateY(14px) scale(0.985);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.h4h-popup-overlay.is-open .h4h-popup-modal {
  transform: translateY(0) scale(1);
}
.h4h-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--teal-900) !important;
  color: #ffffff !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 10px 20px rgba(0, 43, 43, 0.28);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.h4h-popup-close:hover,
.h4h-popup-close:focus,
.h4h-popup-close:focus-visible {
  background: var(--teal-700) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(0, 43, 43, 0.32);
  outline: none;
}
.h4h-popup-close svg {
  width: 18px;
  height: 18px;
  display: block;
  stroke: #ffffff !important;
  color: #ffffff !important;
}

.h4h-popup-gallery {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0;
  border-radius: 22px 22px 0 0;
  overflow: hidden;
}
.h4h-popup-gallery img {
  width: 100%;
  height: auto;
  max-height: 210px;
  object-fit: cover;
  display: block;
  background: var(--teal-900);
}
.h4h-popup-gallery--multi {
  grid-template-columns: repeat(2, 1fr);
}
.h4h-popup-gallery--multi img:first-child {
  grid-column: 1 / -1;
  max-height: 190px;
}

.h4h-popup-body {
  position: relative;
  z-index: 1;
  padding: 24px 24px 26px;
}

.h4h-popup-kicker {
  display: inline-block;
  margin: 0 0 10px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--teal-900);
  color: #ffffff;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.h4h-popup-title {
  margin: 0 0 10px;
  padding-right: 48px;
  font-family: 'Jost', sans-serif;
  font-size: clamp(1.55rem, 3.4vw, 2rem);
  line-height: 1.08;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.h4h-popup-message {
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  white-space: pre-wrap;
}

/* Wie Stat-Cards: Petrol-Block */
.h4h-popup-code-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 16px;
  padding: 16px 18px;
  background: var(--teal-900);
  border-radius: 16px;
  color: #fff;
  box-shadow: 0 14px 28px rgba(0, 43, 43, 0.22);
}
.h4h-popup-percent {
  font-family: 'Jost', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--yellow);
  line-height: 1;
}
.h4h-popup-code {
  font-family: 'Jost', ui-monospace, monospace;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 10px;
}

/* Wie .h4h-cta – immer weiß, auch bei Theme-Hover */
.h4h-popup-copy,
.h4h-popup-overlay .h4h-popup-copy:hover,
.h4h-popup-overlay .h4h-popup-copy:focus,
.h4h-popup-overlay .h4h-popup-copy:focus-visible,
.h4h-popup-overlay .h4h-popup-copy:active {
  margin-left: auto;
  border: 0 !important;
  border-radius: 12px !important;
  background: var(--yellow) !important;
  color: var(--teal-900) !important;
  font-family: 'Jost', sans-serif !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  padding: 11px 14px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.h4h-popup-overlay .h4h-popup-copy:hover,
.h4h-popup-overlay .h4h-popup-copy:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.03);
  color: var(--teal-900) !important;
  background: var(--yellow) !important;
}

.h4h-popup-cta,
.h4h-popup-overlay a.h4h-popup-cta:hover,
.h4h-popup-overlay a.h4h-popup-cta:focus,
.h4h-popup-overlay a.h4h-popup-cta:focus-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--teal-900) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 14px 28px rgba(0, 43, 43, 0.28);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.h4h-popup-overlay a.h4h-popup-cta:hover,
.h4h-popup-overlay a.h4h-popup-cta:focus-visible {
  transform: translateY(-3px);
  background: var(--teal-700) !important;
  color: #ffffff !important;
  box-shadow: 0 18px 34px rgba(0, 43, 43, 0.34);
}

/* FAB links unten: Kreis % + Sprechblase (kein Hover-Effekt) */
.h4h-popup-fab {
  --teal-900: #002b2b;
  --yellow: #ffcc00;
  position: fixed;
  left: 16px;
  right: auto;
  bottom: 16px;
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  flex-direction: row;
  border: 0;
  padding: 0;
  background: transparent !important;
  cursor: pointer;
  font-family: 'Jost', sans-serif;
  filter: drop-shadow(0 12px 22px rgba(0, 43, 43, 0.35));
  animation: h4h-fab-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.h4h-popup-fab:hover,
.h4h-popup-fab:focus,
.h4h-popup-fab:focus-visible {
  background: transparent !important;
  outline: none;
  transform: none !important;
}

.h4h-popup-fab__circle {
  position: relative;
  z-index: 2;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(150deg, #024a44 0%, #002b2b 82%);
  border: 2px solid rgba(255, 255, 255, 0.14);
  color: var(--yellow) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.h4h-popup-fab__bubble {
  position: relative;
  z-index: 1;
  margin-left: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #ffd633 0%, #ffcc00 100%);
  color: var(--teal-900) !important;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(0, 43, 43, 0.22);
}
.h4h-popup-fab__bubble::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #ffcc00;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 2px;
  z-index: -1;
}

@keyframes h4h-fab-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .h4h-popup-body { padding: 20px 18px 22px; }
  .h4h-popup-fab {
    left: 12px;
    right: auto;
    bottom: 12px;
  }
  .h4h-popup-fab__circle {
    width: 52px;
    height: 52px;
    font-size: 20px;
  }
  .h4h-popup-fab__bubble {
    min-height: 34px;
    font-size: 14px;
    padding: 7px 12px;
  }
  .h4h-popup-code-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .h4h-popup-overlay .h4h-popup-copy {
    margin-left: 0;
    width: 100%;
  }
}
