/* ==========================================================
   style.css – Version 4.1.3 MERGED BASE + MAH BUTTON SYSTEM
   ----------------------------------------------------------
   © 2025 KDK MEDIA | Marsa Alam Hotels

   Basis:
   - Version 4.1.2 MERGED BASE
   Ergänzt:
   - MAH Button System aus WordPress
   - ohne bestehende App-Buttons zu entfernen
   - Abrundung an App-Stil angepasst
========================================================== */

/* ==========================================================
   ROOT / VARIABLEN
========================================================== */
:root {

  /* Grundlayout */
  --app-width: 450px;
  --app-bg-inner: #F8E9C4;
  --app-bg-outer: #F4F1EA;
  --app-bg-content: #fff8e1;
  --popup-bg: #fff8e1;

  /* Menü */
  --menu-bg: #F8E9C4;
  --menu-border-color: #F8E9C4;
  --menu-height: 40px;
  --menu-button-height: 30px;
  --menu-button-width: 80px;
  --menu-button-text: 20px;

  /* Normaler Banner */
  --space-over-banner: 0px;
  --banner-height: 55px;
  --space-under-banner: 5px;

  /* Admin-Banner */
  --admin-space-over-banner: 0px;
  --admin-banner-height: 55px;
  --admin-space-under-banner: 2px;

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

  /* Header Admin */
  --admin-header-total: calc(
    var(--admin-space-over-banner) +
    var(--admin-banner-height) +
    var(--admin-space-under-banner) +
    var(--menu-height)
  );

  /* Alias für Altmodule */
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Taxi */
  --taxi-header1-h: 70px;
  --taxi-header2-h: 52px;

  /* Region + Suche */
  --mah-region-offset: 56px;
  --mah-region-bg: #e8dcc2;
  --mah-region-border: #cbbf9f;
  --mah-region-radius: 5px;
  --mah-region-font: 16px;
}

/* ==========================================================
   TYPOGRAFIE GLOBAL
========================================================== */
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; }
p  { font-size: 14px; font-weight: normal; color: #000; margin: 4px 0; }

/* ==========================================================
   🔹 Textgrößen + Abstände (MAH Typografie)
========================================================== */
.text10 { font-size:10px; margin:3px 0; }
.text11 { font-size:11px; margin:3px 0; }
.text12 { font-size:12px; margin:4px 0; }
.text13 { font-size:13px; margin:4px 0; }
.text14 { font-size:14px; margin:7px 0; }
.text15 { font-size:15px; margin:6px 0; }
.text16 { font-size:16px; margin:8px 0; }
.text17 { font-size:17px; margin:8px 0; }
.text18 { font-size:18px; margin:9px 0; }
.text19 { font-size:19px; margin:10px 0; }
.text20 { font-size:20px; margin:11px 0; }
.text21 { font-size:21px; margin:12px 0; }
.text22 { font-size:22px; margin:13px 0; }
.text23 { font-size:23px; margin:14px 0; }
.text24 { font-size:24px; margin:15px 0; }
.text25 { font-size:25px; margin:16px 0; }
.text26 { font-size:26px; margin:18px 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;
}

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;
  }
}

/* ==========================================================
   NORMALER BANNERBEREICH
========================================================== */
#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;
  overflow: hidden;
}

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

/* ==========================================================
   ADMIN-BANNER
========================================================== */
#admin-banner {
  position: fixed;
  top: var(--admin-space-over-banner);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-width);
  height: var(--admin-banner-height);
  background: var(--app-bg-inner);
  z-index: 120;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#admin-banner img {
  height: var(--admin-banner-height);
  width: auto;
  display: block;
}

/* ==========================================================
   MENÜBEREICH
========================================================== */
#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: var(--menu-height);
  background: var(--menu-bg);
  border-bottom: 1px solid rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px;
  z-index: 110;
}

/* ==========================================================
   ADMIN-MENÜ LAGE
========================================================== */
body.admin-mode #menu-area {
  top: calc(var(--admin-banner-height) + var(--admin-banner-gap));
}

/* ==========================================================
   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;
}

/* ==========================================================
   NORMALER SCROLLBEREICH
========================================================== */
.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));
  padding-bottom: 40px;
}

.scroll-area::-webkit-scrollbar {
  display: none;
}

/* ==========================================================
   ADMIN-SCROLLBEREICH
========================================================== */
#admin-scroll-area {
  position: absolute;
  top: var(--admin-header-total);
  left: 0;
  right: 0;
  width: 100%;
  height: calc(100vh - var(--admin-header-total));
  overflow-y: scroll;
  background: var(--app-bg-content);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

#admin-scroll-area::-webkit-scrollbar {
  display: none;
}

/* ==========================================================
   CONTENT-AREA
========================================================== */
.content-area {
  background: var(--app-bg-content);
  width: 100%;
  max-width: var(--app-width);
  box-sizing: border-box;
  padding: 0 14px 40px 14px;
}

/* Standard normal links */
.scroll-area .content-area {
  text-align: left;
}

/* Admin eher links */
#admin-scroll-area .content-area {
  text-align: left;
}

/* ==========================================================
   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;
}

/* 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 – BESTEHENDES APP-SYSTEM
========================================================== */
.button {
  display: block;
  width: 70%;
  height: 42px;
  margin: 4px auto;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: bold;
  color: #fff;
  background-color: #ccc;
  cursor: pointer;
  text-decoration: none;
}

a.button {
  display: block;
  text-align: center;
  line-height: 42px;
  color: #fff;
  text-decoration: none;
}

/* Normale Buttons allgemein */
button {
  background-color: #4CAF50;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  margin: 6px;
  cursor: pointer;
}

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

/* ==========================================================
   GRID-LAYOUT FÜR HAUPTBUTTONS – BESTEHEND
========================================================== */
.button-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
  justify-content: center;
  align-items: center;
  width: 90%;
  max-width: 380px;
  margin: 0 auto 20px auto;
}

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

/* ==========================================================
   MAH BUTTON SYSTEM – AUS WORDPRESS ÜBERNOMMEN
   ----------------------------------------------------------
   Ergänzung, ohne bestehende App-Buttons zu ersetzen
   Abrundung an App-Stil angepasst
========================================================== */
.mah-btngrid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: 90%;
  max-width: 560px;
  margin: 18px auto;
  box-sizing: border-box;
}

.mah-btngrid > a,
.mah-btngrid > p {
  flex: 0 0 calc(50% - 6px);
  margin: 0;
  padding: 0;
}

.mah-btngrid > a.mah-full,
.mah-btngrid > p.mah-full,
.mah-full {
  flex: 0 0 100%;
}

.mah-spacer {
  flex: 0 0 calc(50% - 6px);
}

.mah-btn {
  display: flex;
  width: 100%;
  min-height: 42px;
  justify-content: center;
  align-items: center;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
  cursor: pointer;
}

a.mah-btn {
  text-decoration: none;
}

.mah-green { background: #4CAF50; color: #fff; }
.mah-orange { background: #F7931E; color: #000; }
.mah-yellow { background: #ffcc00; color: #000; }
.mah-blue { background: #2196F3; color: #fff; }
.mah-lightblue { background: #4FC3F7; color: #fff; }
.mah-grey { background: #c4c0c4; color: #000; }
.mah-red { background: #ff0000; color: #fff; }
.mah-lightyellow { background: #FFF176; color: #000; }
.mah-lightgrey { background: #E0E0E0; color: #000; }
.mah-darkblue { background: #0D47A1; color: #fff; }
.mah-darkgrey { background: #616161; color: #fff; }

/* ==========================================================
   MAH TOPMENU / WORDPRESS-NAHE KLASSEN
   ----------------------------------------------------------
   Für spätere Nutzung in der App mit gleicher Logik
========================================================== */
.mah-topmenu {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1px;
  padding: 0 8px;
  box-sizing: border-box;
}

.mah-topmenu .mah-btn {
  min-height: 30px;
  padding: 3px 12px;
  border-radius: 12px;
  white-space: nowrap;
}

/* ==========================================================
   GLOBALE POPUPS / DIALOGE
========================================================== */
.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;
  min-width: 130px;
}

.mah-popup-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

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

/* ==========================================================
   TAXI & TRANSFER
========================================================== */

/* 1️⃣ Titelbereich */
.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️⃣ Tabellenüberschrift */
.taxi-header2 {
  position: sticky;
  top: var(--taxi-header1-h);
  z-index: 59;
  background: #f3f3f3;
  border-bottom: 2px solid #bbb;
  padding-top: 2px;
  padding-bottom: 2px;
}

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

/* Spaltenbreiten 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 unter den Kopfzeilen */
.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;
  overscroll-behavior: contain;
  touch-action: pan-y;
  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);
}

.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;
}

/* Leerzeilen unten */
.taxi-table tr.spacer-row td {
  padding: 0;
  border: 0;
  height: 28px;
  background: var(--app-bg-content);
}

/* Exakt synchron */
.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%; }

/* Linien & Hintergründe */
.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;
}

/* Trennung HRG / RMF */
.taxi-header2 th:nth-child(3),
.taxi-table td:nth-child(3) {
  border-right: 2px solid #ccc;
}

/* 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
========================================================== */
.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
========================================================== */
.inline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  flex-wrap: wrap;
  gap: 6px;
}

.inline-row label {
  font-size: var(--label-font, 18px);
  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);
  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;
  }
}

/* ==========================================================
   MAH Region / Suche Leiste
========================================================== */
.mah-regionbar-wrap {
  width: 100%;
  margin: 0;
  background: var(--app-bg-content);
  border-top: 1px solid #b8ab88;
  border-bottom: 1px solid #b8ab88;
  box-sizing: border-box;
}

.mah-regionbar {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  min-height: var(--mah-region-offset);
  box-sizing: border-box;
  background: var(--app-bg-content);
}

.mah-regionbar .region {
  width: 50%;
}

.mah-regionbar .search {
  width: 50%;
}

.mah-regionbar select,
.mah-regionbar input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  border-radius: var(--mah-region-radius);
  border: 1px solid #a9a9a9;
  font-size: var(--mah-region-font);
  padding: 0 12px;
  background: #ffffff;
}

.mah-regionbar select {
  font-weight: normal;
}

.mah-regionbar input {
  font-weight: normal;
}

.mah-free-hotelliste-module {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mah-free-hotelliste-module .mah-regionbar-wrap {
  flex: 0 0 auto;
}

.mah-free-hotelliste-module .mah-free-scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}