/* ==========================================================
   style.css – Version 4.0.2 Clean Stable
   ----------------------------------------------------------
   © 2025 KDK MEDIA | Marsa Alam Hotels
========================================================== */

:root {
  /* ======================================================
     🔹 Grund-Parameter
     ====================================================== */
  --app-width: 450px;
  --app-bg-inner: #F8E9C4;
  --app-bg-outer: #F4F1EA;
  --app-bg-content: #fff8e1;
  --popup-bg: #fff8e1;
  --menu-bg: #F8E9C4;
  --menu-border-color: #F8E9C4;

  /* Banner & Layout */
  --space-over-banner: 3px;
  --banner-height: 100px;
  --space-under-banner: 7px;
  --menu-height: 40px;
  --menu-button-height: 30px;
  --menu-button-width: 80px;
  --menu-button-text: 20px;

  --safe-bottom: env(safe-area-inset-bottom, 0px);

  --header-total: calc(
    var(--space-over-banner) +
    var(--banner-height) +
    var(--space-under-banner) +
    var(--menu-height)
   );

  --taxi-header1-h: 70px;   /* obere Zeile: Titel + Untertitel */
  --taxi-header2-h: 52px;   /* zweite Zeile: Tabellenkopf */

  /* -----------------------------
    Typografie global – KDK MEDIA
    ----------------------------- */
  h1 { font-size: 35px; font-weight: normal; color: #000; margin: 10px 0; }
  h2 { font-size: 26px; font-weight: normal; color: #000; margin: 10px 0 8px; }
  h3 { font-size: 23px; font-weight: normal; color: #000; margin: 8px 0 6px; }
  h4 { font-size: 20px; font-weight: normal; color: #000; margin: 6px 0 4px; }
  h5 { font-size: 18px; font-weight: normal; color: #000; margin: 4px 0 2px; }
  h6 { font-size: 16px; font-weight: normal; color: #000; margin: 4px 0 2px; }
  h7 { font-size: 15px; font-weight: normal; color: #000; margin: 4px 0 2px; }
  p  { font-size: 14px; font-weight: normal; color: #000; margin: 4px 0; }
  ps { font-size: 14px; font-weight: normal; color: #000; margin: 2px 0; }
}

/* ==========================================================
   Grundlayout
   ========================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--app-bg-outer);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden; /* Nur scroll-area darf scrollen */
}

body {
  font-family: "Arial Rounded MT Bold", "Arial Rounded MT", Arial, sans-serif;
  letter-spacing: 0.2px;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================
   App-Hauptcontainer
   ========================================================== */
.app-wrapper {
  width: 100%;
  max-width: var(--app-width);
  height: 100vh;
  background-color: var(--app-bg-inner);
  border-left: 1px solid rgba(0,0,0,0.1);
  border-right: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}
@media (max-width: 600px) {
  .app-wrapper { border: none; box-shadow: none; }
}

/* ==========================================================
   Banner-Bereich
   ========================================================== */
#banner-area {
  position: fixed;
  top: var(--space-over-banner);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-width);
  height: var(--banner-height);
  background: var(--app-bg-inner);
  text-align: center;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-under-banner);
}

#banner-area img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ==========================================================
   Menübereich (unter Banner)
   ========================================================== */
#menu-area {
  position: fixed;
  top: calc(var(--space-over-banner) + var(--banner-height) + var(--space-under-banner));
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-width);
  height: 30px;
  background: var(--menu-bg);
  border-top: 1px solid var(--menu-border-color);
  border-bottom: 1px solid var(--menu-border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px;
  z-index: 90;
}

/* ==========================================================
   Menübuttons
   ========================================================== */
#menu-area button {
  width: var(--menu-button-width);
  height: var(--menu-button-height);
  margin: 0 5px;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: var(--menu-button-text);
  font-weight: 600;
  cursor: pointer;
  opacity: 0.95;
}

/* ==========================================================
   Scrollbereich – universeller Fix (iPhone + Android)
   ========================================================== */
.scroll-area {
  position: absolute;
  top: var(--header-total);
  left: 0;
  right: 0;
  width: 100%;
  max-width: var(--app-width);
  margin: 0 auto;
  background: var(--app-bg-content);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;

  min-height: calc(var(--real-vh, 1vh) * 100 - var(--header-total));
  max-height: calc(var(--real-vh, 1vh) * 100 - var(--header-total));

  /* 🔹 Grundpuffer unten */
  padding-bottom: 40px;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* ==========================================================
   Content-Text – universeller Fix
   ========================================================== */
.content-area {
  background: var(--app-bg-content);
  width: 100%;
  max-width: var(--app-width);
  text-align: center;
  box-sizing: border-box;
  padding: 0 14px 40px;
}

/* ==========================================================
   Version-Box
   ========================================================== */
.version {
  display:inline-block;
  background:#e6e6e6;
  color:#000;
  padding:8px 14px;
  border-radius:8px;
  font-weight:normal;
  font-size:10px;
  line-height:1.3;
  text-align:center;
  margin-top:20px;
  margin-bottom:10px;
}

/* ==========================================================
   Formulare / User-Module
   ========================================================== */
form {
  display:block;
  width:90%;
  max-width:380px;
  margin:15px auto;
  text-align:left;
}
form label {
  display:block;
  font-size:15px;
  font-weight:bold;
  margin:10px 0 4px;
}
form input[type=text],
form input[type=email],
form input[type=password] {
  width:100%;
  padding:10px 38px 10px 10px;
  font-size:15px;
  border:1px solid #ccc;
  border-radius:8px;
  outline:none;
  transition:border .2s ease;
  background-color:#fff;
}
form input:focus {
  border-color:#4CAF50;
  background-color:#f9fff9;
}
form input[type=submit] {
  margin-top:16px;
  width:100%;
  height:46px;
  border:none;
  border-radius:8px;
  background-color:#4CAF50;
  color:#fff;
  font-size:17px;
  font-weight:bold;
  cursor:pointer;
  transition:opacity .2s ease, transform .2s ease;
}

/* Nachrichtboxen */
.message {
  background:#ffdede;
  color:#b00020;
  padding:10px 14px;
  border-radius:8px;
  text-align:center;
  margin:8px auto;
  font-weight:bold;
  width:90%;
  max-width:380px;
}
.message.success {
  background:#d9f7d9;
  color:#0a680a;
}

/* Auge-Symbol im Passwortfeld */
form div[style*="position:relative"] span {
  user-select:none;
  font-size:18px;
  color:#666;
  transition:color .2s ease;
}

/* ==========================================================
   Buttons
   ========================================================== */
.button {
  display:block;
  width:70%;
  height:42px;               /* ▼ vorher 50px */
  margin:4px auto;           /* ▼ etwas kleiner */
  border:none;
  border-radius:10px;
  font-size:15px;            /* ▼ vorher 16px */
  font-weight:bold;
  color:#fff;
  background-color:#ccc;
  cursor:pointer;
  transition:transform .15s ease, opacity .15s ease;
  text-decoration:none;
}

a.button {
  display:block;
  text-align:center;
  line-height:42px;          /* ▼ angepasst an neue Höhe */
  color:#fff;
  text-decoration:none;
}

/* Profilbuttons */
button {
  background-color:#4CAF50;
  color:#fff;
  font-weight:bold;
  border:none;
  border-radius:8px;
  padding:10px 14px;
  margin:6px;
  cursor:pointer;
  transition:transform .15s ease, opacity .15s ease;
}

.hotel { background-color:#4CAF50; color:#fff; }
.kontakt { background-color:#FF9800; color:#fff; }
.datenschutz { background-color:#2196F3; color:#fff; }
.impressum { background-color:#4FC3F7; color:#fff; }
.user { background-color:#c4c0c4; color:#000; }
.taxi { background-color:#424242; color:#fff; }
.userlog { background-color:#ff0000; color:#00f; }

/* ==========================================================
   Grid-Layout für Hauptbuttons (2 Spalten, 3 Reihen)
   ========================================================== */
.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px; /* Abstand zwischen Zeilen und Spalten */
  justify-content: center;
  align-items: center;
  width: 90%;
  max-width: 380px;
  margin: 0 auto 20px auto;
}

.button-grid .button {
  width: 100%;
  height: 42px;              /* ▼ vorher 48px */
  font-size: 15px;
  border-radius: 10px;
}

/* ==========================================================
   🔹 Globale Popups / Dialoge – Version 1.0
========================================================== */
.mah-popup-overlay {
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.35);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}

.mah-popup-box {
  background:#fff8e1;
  border:2px solid #e0c27b;
  border-radius:14px;
  box-shadow:0 6px 16px rgba(0,0,0,0.25);
  padding:22px 30px;
  text-align:center;
  max-width:360px;
  color:#333;
  font-size:16px;
  animation:fadeInPopup .2s ease-out;
}

.mah-popup-box p { margin-bottom:18px; }

.mah-popup-button {
  background:#4CAF50;
  color:#fff;
  border:none;
  border-radius:8px;
  padding:8px 22px;
  font-size:15px;
  cursor:pointer;
  font-weight:600;
  transition:background .2s;
}

/* ==========================================================
   Popup – perfekte Zentrierung für 1 oder 2 Buttons */
.mah-popup-buttons {
  display: flex;
  justify-content: center;     /* Buttons in die Mitte */
  gap: 20px;                   /* Abstand zwischen OK / Abbrechen */
  margin-top: 20px;
}

.mah-popup-box {
  text-align: center;          /* Zentriert den Text */
}

.mah-popup-button {
  min-width: 130px;
}

@keyframes fadeInPopup {
  from { opacity:0; transform:scale(0.95); }
  to { opacity:1; transform:scale(1); }
}

/* ==========================================================
   TAXI & TRANSFER – Endgültige Version mit 2 Kopfzeilen + Scrollbereich
   ----------------------------------------------------------
   - Verwendet globale Schriftdefinitionen (h1–h6, p)
   - Zwei feste Header (Überschrift + Tabellenkopf)
   - Scrollbereich exakt ab unterhalb beider Header
   ========================================================== */
/* ==========================================================
   1️⃣ Erste Kopfzeile – Titelbereich (fixiert unter Menü)
   ========================================================== */
.taxi-header1 {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--taxi-header1-h);
  text-align: center;
  background: var(--app-bg-content);
  border-bottom: 2px solid #ccc;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding-top: 4px;
}

/* ==========================================================
   2️⃣ Zweite Kopfzeile – Tabellenüberschrift (mit Variablen)
   ========================================================== */
.taxi-header2 {
  position: sticky;
  top: var(--taxi-header1-h);
  z-index: 59;
  background: #f3f3f3;              /* leicht grauer Hintergrund */
  border-bottom: 2px solid #bbb;
  padding-top: 2px;
  padding-bottom: 2px;
}

.taxi-header2 table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* ---- Spaltenbreiten exakt nach Variablen ---- */
.taxi-header2 th:nth-child(1),
.taxi-table th:nth-child(1),
.taxi-table td:nth-child(1) {
  width: var(--col-hotel);
  text-align: left;
  padding-left: 10px;
}

.taxi-header2 th:nth-child(2),
.taxi-table th:nth-child(2),
.taxi-table td:nth-child(2) {
  width: var(--col-hrg-limo);
}

.taxi-header2 th:nth-child(3),
.taxi-table th:nth-child(3),
.taxi-table td:nth-child(3) {
  width: var(--col-hrg-mini);
}

.taxi-header2 th:nth-child(4),
.taxi-table th:nth-child(4),
.taxi-table td:nth-child(4) {
  width: var(--col-rmf-limo);
}

.taxi-header2 th:nth-child(5),
.taxi-table th:nth-child(5),
.taxi-table td:nth-child(5) {
  width: var(--col-rmf-mini);
}

/* ==========================================================
   3️⃣ Scrollbereich unterhalb der Kopfzeilen – ohne sichtbaren Scrollbalken
   ========================================================== */
.taxi-wrapper {
  position: relative;
  overflow-y: auto;
  background: var(--app-bg-content);
  height: calc(100vh - var(--header-total) - var(--taxi-header1-h) - var(--taxi-header2-h));
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;

  /* 🧩 Kein Ziehen über den Rand hinaus */
  overscroll-behavior: contain; /* stoppt Gummi-Effekt nach unten */
  touch-action: pan-y;           /* sicheres vertikales Scrollen */

  /* Scrollbalken unsichtbar machen */
  scrollbar-width: none !important; 
  -ms-overflow-style: none !important;
}
.taxi-wrapper::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

/* ==========================================================
   4️⃣ Tabelleninhalt
   ========================================================== */
.taxi-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 15px;
  background: var(--app-bg-content); /* verhindert Durchscheinen des beigen BG */
}

.taxi-table td {
  padding: 8px 6px;
  border-bottom: 1px solid #ddd;
  border-left: 1px solid #eee;
  text-align: center;
}

.taxi-table td:first-child {
  text-align: left;
  border-left: none;
  font-weight: 600;
  line-height: 1.25;
  padding-left: 10px;
  white-space: normal;
  word-wrap: break-word;
}

/* ==========================================================
   5️⃣ Leerzeilen am Tabellenende (statisch, kein Trick)
   ========================================================== */
.taxi-table tr.spacer-row td {
  padding: 0;
  border: 0;
  height: 28px;             /* Abstand unten (Feinjustierbar) */
  background: var(--app-bg-content);
}

/* ==========================================================
   5️⃣ Spaltenbreiten – exakt synchron zwischen Kopf & Daten
   ========================================================== */
.taxi-header2 th:nth-child(1),
.taxi-table td:nth-child(1) { width: 45%; }
.taxi-header2 th:nth-child(2),
.taxi-table td:nth-child(2) { width: 13.5%; }
.taxi-header2 th:nth-child(3),
.taxi-table td:nth-child(3) { width: 13.5%; }
.taxi-header2 th:nth-child(4),
.taxi-table td:nth-child(4) { width: 13.5%; }
.taxi-header2 th:nth-child(5),
.taxi-table td:nth-child(5) { width: 13.5%; }

/* ==========================================================
   6️⃣ Linien & Hintergrundfarben
   ========================================================== */
.taxi-table tr:nth-child(even) { background: #fafafa; }
.taxi-table tr:nth-child(odd)  { background: #fff; }

.taxi-table td + td,
.taxi-header2 th + th {
  border-left: 1px solid #ddd;
}

/* Vertikale Trennung HRG ↔ RMF */
.taxi-header2 th:nth-child(3),
.taxi-table td:nth-child(3) {
  border-right: 2px solid #ccc;
}
/* ==========================================================
   Zusätzliche Formatierung für 3-zeiliges Hotel-Layout
========================================================== */
.hotel-row-sub td {
  font-size: 13px;
  color: #333;
  border-top: none;
  border-bottom: 1px solid #eee;
  background: var(--app-bg-content);
  padding-top: 2px;
  padding-bottom: 2px;
}

/* ========================================================================== */
/* 🔹 Extra-Field-Container (Fix für Eingabefeld unter Banner, stabil bei iOS) */
/* ========================================================================== */
.extra-field-container {
  position: fixed;
  top: calc(var(--banner-height, 160px) + var(--menu-height, 60px) + 20px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 420px;
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 2000;
  pointer-events: auto;
}

.extra-field-container label {
  display: block;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 6px;
}

.extra-field-container input {
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-size: 16px;
  text-align: left;
}

/* ==========================================================
   TaxiView – Responsive Typo-Fix (KDK MEDIA)
   ========================================================== */

.inline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  flex-wrap: wrap; /* erlaubt Zeilenumbruch bei schmalen Geräten */
  gap: 6px;
}

.inline-row label {
  font-size: var(--label-font, 18px); /* nutzt dein h5 */
  font-weight: bold;
  color: #222;
  flex: 1 1 40%;
  min-width: 120px;
}

.inline-row .opt-btn {
  background: #888;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: var(--button-font, 16px); /* nutzt dein h6 */
  cursor: pointer;
  flex: 1 1 auto;
  min-width: 100px;
  text-align: center;
}

@media (max-width: 420px) {
  .inline-row label {
    flex-basis: 100%;
    text-align: center;
    margin-bottom: 4px;
  }
  .inline-row .opt-btn {
    flex-basis: 45%;
    min-width: 130px;
  }
}

