/* =========================================================
   LAYOUT — IDUWA CONNECT (Optimiert für iPhone & 8" Tablet)
   ========================================================= */
:root {
  color-scheme: light;

  --iduwa-orange: #f39c12;
  --iduwa-orange-hover: #e67e22;
  --iduwa-danger: #b81616;
  --iduwa-danger-hover: #6b6b6b;
  --iduwa-dark: #6b6b6b;
  --iduwa-bg-light: #f4f6f9;
  --iduwa-border-color: #dee2e6;
  --iduwa-grey: #7a7a7a;
  --iduwa-grey-rgb: 122, 122, 122;
  --iduwa-white: #fff;
  --iduwa-dark-grey: #2c2e33;
  --iduwa-whatsapp: #2b7a48;
  --iduwa-whatsapp-hover: #3e5e4a;

  --app-bg: #f4f6f9;
  --app-text: #111111;
}

/* 1. Grund-Setup gegen das "Hängenbleiben" auf iOS */

html,
body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: var(--app-bg) !important;
  color: var(--app-text) !important;
  color-scheme: light;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  overscroll-behavior-y: none;
}
/* 2. Der Hauptrahmen (App-Shell) */
.app-frame {
  display: flex;
  flex-direction: column;
  background: #fff;
  width: 100%;
  /* dvh = Dynamic Viewport Height: Der Fix für die iPhone-Adressleiste */
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* 3. Scroll-Bereich (Hier liegt die Magie für Safari) */
.app-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  /* ESSENZIELL: Aktiviert das flüssige Touch-Gefühl auf Apple-Geräten */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  min-height: 0;
}

/* 4. Desktop- & Tablet-Anpassung (Größerer Look) */
@media (min-width: 768px) {
  /* Auf deinem 8-Zoll Tablet wirken Texte & Abstände hierdurch massiver */
  :root {
    font-size: 110%;
  }
}

@media (min-width: 992px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e9ecef !important;
    padding: 20px;
  }
  .app-frame {
    max-width: 450px;
    height: 90vh;
    height: 90dvh;

    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
  }
}

/* 5. Fix für die Buttons (Verhindert dein Screenshot-Problem) */
.btn-lg {
  min-height: 85px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  white-space: normal !important; /* Erlaubt Umbruch statt Überlappung */
  text-align: left !important;
  border-radius: 18px !important;
  padding: 1rem 1.2rem !important;
}

.btn-lg span {
  line-height: 1.2;
  display: block;
}

/* Kleiner Fix für extrem schmale Handys (z.B. iPhone SE) */
@media (max-width: 360px) {
  .btn-lg span {
    font-size: 1rem !important;
  }
  h2 {
    font-size: 1.5rem !important;
  }
}

/* 6. Header Styling */
.app-header {
  flex: 0 0 65px;
  background: linear-gradient(90deg, var(--iduwa-orange) 0%, #15181c 100%);
  color: #fff;
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.iduwa-divider-thin {
  border: 0;
  border-top: 1px solid rgba(var(--iduwa-grey), 0.1);
}
