/* ===============================
   Basis-Styles & Root Variablen
   =============================== */
:root {
  --bg: #FBFBFA;
  --card-bg: #FFFFFF;
  --muted: #6b6b6b;
  --radius: 14px;
  --gap: 20px;
  --max-width: 1100px;
  --shadow: 0 8px 20px rgba(13,20,25,0.06);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #FBFCFB 0%, #FFFFFF 100%);
  color: #14202B;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 40px 18px;
  display: block;
}

/* ===============================
   Kacheln
   =============================== */
.wrap {
  width: 100%;
  max-width: var(--max-width);
  background: var(--card-bg);
  border-radius: calc(var(--radius) + 6px);
  padding: 36px;
  box-shadow: var(--shadow);
  margin: 0 auto;
  position: relative;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: #14202B;
  box-shadow: 0 6px 14px rgba(10,18,20,0.04);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: transform .18s ease, box-shadow .18s ease;
  cursor: pointer;
  padding: 20px;
  text-align: center;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(10,18,20,0.08);
}

/* Kachel Farben */
.card[data-accent="1"] { background: linear-gradient(135deg,#E8F5F2,#ffffff); }
.card[data-accent="2"] { background: linear-gradient(135deg,#FFF4E8,#ffffff); }
.card[data-accent="3"] { background: linear-gradient(135deg,#FFECEC,#ffffff); }
.card[data-accent="4"] { background: linear-gradient(135deg,#EAF9F6,#ffffff); }
.card[data-accent="5"] { background: linear-gradient(135deg,#F0F8FF,#ffffff); }
.card[data-accent="6"] { background: linear-gradient(135deg,#FFF8F4,#ffffff); }

.card_title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.card_subtitle,
.card_content {
  margin: 6px 0 0 0;
  color: #14202B;
  font-size: 14px;
}

/* Overlay */
.overlay-global {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.98);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.overlay-global.active {
  opacity: 1;
  pointer-events: auto;
}

/* 🔹 X-Button: fixed damit overflow-y:auto ihn nicht abschneidet */
.overlay-global .close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  color: #444;
  transition: background 0.15s, color 0.15s;
  z-index: 9999;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.overlay-global .close:hover {
  background: #e0e0e0;
  color: #111;
}

/* 🔹 Schließen-Button unten – verhindert versehentliches Weiter-Klicken */
.overlay-close-bottom {
  align-self: flex-end;
  margin-top: auto;
  padding: 9px 20px;
  background: #f0f4fa;
  border: 1px solid #d0d8e8;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #1F3A5F;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.overlay-close-bottom:hover {
  background: #dce6f5;
  border-color: #2E75B6;
}

.ec_tile_group_header {
  font-size: 28px;
  margin: 0 0 18px 0;
  letter-spacing: -0.02em;
}

.ec_tile_group_description {
  color: var(--muted);
  margin: 0 0 26px 0;
}

.ec_overlay_title {
  margin-top: 0;
  font-size: 24px;
}

.ec_overlay_text {
  font-size: 16px;
  line-height: 1.6;
  color: #1f2b2a;
}

/* ===============================
   Layout Content + Buttons
   =============================== */
.unit-step-layout {
  display: flex;
  gap: 20px;
}

/* Spezifische Layout-Klassen */
.unit-step-layout.ec-tiles {
  flex-direction: column; /* Kacheln stapeln */
}

.unit-step-layout.ec-freetext {
  flex-direction: row; /* Freitext + Buttons nebeneinander */
  align-items: flex-start;
}

/* Prozess, Zuordnung, Sortierung, Video: Content + Buttons untereinander */
.unit-step-layout.ec-stacked {
  flex-direction: column;
  min-height: auto; /* kein künstlicher Mindestplatz nötig */
}

.unit-step-layout.ec-stacked .unit-content {
  flex: unset;
  width: 100%;
}

.unit-step-layout.ec-stacked .choice-buttons-wrapper {
  margin-top: 1.5rem;
  width: 100%;
}

/* Content-Bereich */
.unit-content {
  flex: 5;
  margin: 0;
}

/* Buttons */
.choice-buttons-wrapper,
.nav-buttons {
  display: block;
  /* display: flex;
  flex-direction: column;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center; */
}

.choice-buttons-wrapper .choice-btn {
  /* flex: 1 1 auto;
  flex-direction: column; */
  display: block;
  width: 100%;
  min-width: 0;
  padding: 1.2rem 1.5rem;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(10, 18, 20, 0.06);
  background: linear-gradient(135deg, #ffffff, #f8fafa);
  justify-content: center;
  align-items: center;
  min-height: 80px;
  transition: all 0.25s ease;
  color: #14202B;
}

/* Hover-Effekt */
.choice-buttons-wrapper .choice-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(10, 18, 20, 0.12);
}

/* Button-Farbvarianten */
.choice-buttons-wrapper .choice-btn:nth-child(1) { background: linear-gradient(135deg, #E8F5F2, #ffffff); }
.choice-buttons-wrapper .choice-btn:nth-child(2) { background: linear-gradient(135deg, #FFF4E8, #ffffff); }
.choice-buttons-wrapper .choice-btn:nth-child(3) { background: linear-gradient(135deg, #FFECEC, #ffffff); }
.choice-buttons-wrapper .choice-btn:nth-child(4) { background: linear-gradient(135deg, #EAF9F6, #ffffff); }
.choice-buttons-wrapper .choice-btn:nth-child(5) { background: linear-gradient(135deg, #F0F8FF, #ffffff); }

/* Weiter-Button */
.nav-buttons {
  margin-top: 20px;
}

.nav-btn {
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background-color: #007BFF;
  color: white;
}

/* === Sanftes Überblenden (Crossfade) === */
.fade-out {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.9s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* ============================================================
   Layout-Fixes: Mindesthöhe & Maximalbreite
   ============================================================ */

/* 🔹 Mindesthöhe für den gesamten Step-Block */
.unit-step-layout {
  min-height: 520px; /* kannst du anpassen – 520px wirkt meist harmonisch */
  align-items: stretch; /* sorgt für gleichmäßige Höhe von Content & Buttons */
}

/* 🔹 Maximalbreite für Buttons */
.choice-buttons-wrapper .choice-btn,
.nav-buttons .nav-btn {
  max-width: 360px; /* oder 400px, je nach Designgefühl */
  flex: 1 1 auto;
  margin: 0 auto;
}

/* ============================================================
   Visuelle Hilfen & Vereinheitlichung
   ============================================================ */

/* 🔹 Schrittbereich leicht einfärben (zur Orientierung beim Testen) */
.unit-step-layout {
  background: rgba(10, 40, 80, 0.03); /* sehr dezentes hellblau-grau */
  border-radius: var(--radius);
  padding: 24px;
  min-height: 520px;
  align-items: stretch;
  box-sizing: border-box;
}

/* 🔹 Einheitliches Button-Design (Weiter/Zurück = Interaktionsbuttons) */
.ecoach-btn,
.nav-buttons .nav-btn,
.choice-buttons-wrapper .choice-btn {
  /* display: inline-flex; */
  display:block;
  justify-content: center;
  align-items: center;
  padding: 1.2rem 1.5rem;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(10, 18, 20, 0.06);
  background: linear-gradient(135deg, #ffffff, #f8fafa);
  color: #14202B;
  transition: all 0.25s ease;
  min-height: 80px;
  max-width: 360px;
}

/* Hover-Effekt wie Interaktionsbuttons */
.ecoach-btn:hover,
.nav-buttons .nav-btn:hover,
.choice-buttons-wrapper .choice-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(10, 18, 20, 0.12);
}



/* 🔹 Titel (z. B. <h3>) grundsätzlich ausblenden */
#unit-view-wrapper h3 {
  display: none !important;
}



/* ===============================
   Responsive
   =============================== */
@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .wrap {
    padding: 12px;
  }
  .card {
    padding: 16px;
  }
  .unit-step-layout.ec-freetext,
  .unit-step-layout.ec-stacked {
    flex-direction: column;
    gap: 12px;
  }
  .choice-buttons-wrapper .choice-btn,
  .nav-buttons .nav-btn {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }

#activehome-chat {
  display: none;
}

}

