/* Grundlegende Stile für die gesamte Seite */
html,
body {
  height: 100%; /* Füllt die gesamte Höhe */
  margin: 0; /* Kein äußerer Abstand */
  padding: 0; /* Kein innerer Abstand */
  font-family: Arial, sans-serif; /* Schriftart */
  background-color: #f0f0f0; /* Hintergrund */
  color: #333; /* Dunkle Schriftfarbe */
}

/*body als flex conainer*/
body {
  display: flex;
  flex-direction: column; /* Inhalt wird vertikal gestapelt */
  min-height: 100vh; /* Mindestens die volle Höhe des Bildschirms */
}

/* Allumfassender Hintergrund Container auf jeder Seite */
.container {
  background: rgb(255, 255, 255);
  padding: 20px;
  flex-grow: 1; /* Nimmt verbleibenden Platz ein */
  box-sizing: border-box; /* Padding und Border in der Breite einrechnen */
  border-radius: 8px 8px 0 0; /* Abgerundete obere Ecken */
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center; /* Zentriert Inhalt horizontal */
}

/* Formation Überschriften */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #333;
  margin-bottom: 20px; /* Abstand nach unten */
  font-weight: 600; /* Fette Schrift */
  text-align: center;
}

/* Allgemeine Textformatierung */
p,
span,
div {
  color: #555;
  font-size: 1em;
  line-height: 1.6;
}

/* Format des Informationstext in index.html (Name, Guthaben, Datum) */
.info-display {
  margin-bottom: 20px;
  color: #555;
  text-align: center;
}

/* Formatierung der Navigationsknöpfe in index.html*/
.button-container button {
  margin: 5px;
  padding: 10px 20px;
  font-size: 1em;
  border: none;
  border-radius: 6px;
  background-color: #3498db;
  color: white;
  cursor: pointer; /*ändert mauszeiger */
}

.button-container button:hover {
  background-color: #276e9e;
}

/* Format Fußzeile auf jeder Seite */
footer {
  padding: 10px 20px;
  font-size: 0.8em;
  color: #666;
  background-color: #fff;
  text-align: center;
  border-top: 1px solid #ddd; /* Linie oben */
}

/* Links in der Fußzeile */
footer a {
  color: #3498db;
  margin: 0 10px;
}

footer a:hover {
  text-decoration: underline;
}

/* Hinweis Knöpfe auf jeder Seite */
.circle-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background-color: #3498db;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: flex; /* Flexbox für zentrierten Inhalt */
  align-items: center;
  justify-content: center;
}

.circle-button:hover {
  background-color: #276e9e;
}

.Hintergrund {
  color: #666;
  background-color: #ffffff29;
  text-align: center;
  margin: 20px auto;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer; /* Zeigt den Mauszeiger als Hand an */
  display: block; /* Block-Element, damit es die volle Breite einnimmt */
}

/* ### Popup-Styling */
.popup {
  display: flex; /* Popup wird direkt sichtbar */
  position: fixed; /* Immer sichtbar über der Seite */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(
    0,
    0,
    0,
    0.5
  ); /* Transparenter schwarzer Hintergrund */
  justify-content: center; /* Zentriert horizontal */
  align-items: center; /* Zentriert vertikal */
  z-index: 1000; /* Ganz oben */
}

.popup-content {
  background: white;
  padding: 20px; 
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /*schatten*/
  position: relative;
}

.popup-content h2 {
  margin-top: 0;
  color: #333;
}

.popup-content input {
  width: 100%; 
  padding: 10px; /* Innenabstand */
  margin: 10px 0;
  border: 1px solid #ddd; /* Graue Umrandung */
  border-radius: 4px; 
  box-sizing: border-box; /* Padding und Border in die Breite einrechnen */
}

.popup-content button {
  padding: 10px 20px;
  font-size: 1em;
  border: none;
  border-radius: 6px;
  background-color: #3498db;
  color: white;
  cursor: pointer;
  margin: 5px;
}

.popup-content button:hover {
  background-color: #2980b9;
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  cursor: pointer;
  color: #666;
}

/* ### Styling für Anmelden, Benutzer Anlegen und Speiseeingabe, haupstächlich für bessere skalierbarkeit mit der veränderbaren Schriftgröße */
.login-field {
  justify-content: center;
  align-content: space-between;
}

.login-field-badge,
.meal-input-badge {
  padding: 2%; /* Innenabstand */
  flex-wrap: wrap; /* Zeilenumbruch bei Bedarf */
}

/* Formatiert Input Feldern um deren Größe konstant zu halten. */
input.keyword,
input.username,
input.meal-input,
select.meal-input {
  width: 95%;
  height: 28px;
  max-height: auto;
}

/* Formation von drop down Menü */
select.meal-input {
  width: 95%;
  height: 30px;
  max-height: auto;
}

/* Formation von checkboxen */
input.meal-check {
  width: 5%;
}

/* Speichern und Zurücksetzen Knöpfe */
input[type="submit"],
button[type="submit"],
input[type="reset"],
button[type="reset"] {
  padding: 10px 20px;
  font-size: 1em;
  border: none;
  border-radius: 6px;
  background-color: #3498db;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 15px 5px; /* Abstand zwischen den Buttons */
}

input[type="submit"]:hover,
button[type="submit"]:hover,
input[type="reset"]:hover,
button[type="reset"]:hover {
  background-color: #276e9e;
}

table {
  width: 100%;
  border-collapse: collapse; /* Zusammenführen von Zellen */
  margin-bottom: 20px;
  background-color: #fff;
}

th,
td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

th {
  background-color: #f2f2f2;
  font-weight: 600;
}

.mitte {
  text-align: center;
}

.mitteBildschirm {
  position: fixed; /* relativ zum Bildschirm */
  top: 30%;
  left: 35%;
}

/* Navigationsknöpfe Oben auf jeder Seite */
.ButtonIndex {
  position: sticky; /*kleben*/
  background-color: #3498db;
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 1000; /* Feste Position ber anderen Elementen */
  margin: 5px; 
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 6px;
}

.ButtonIndex:hover {
  background-color: #276e9e;
}

option {
  font-size: var(--option-font-size); /* Variable für Schriftgröße aus der Barrierefreiheit */
}

select {
  font-size: var(--option-font-size); /* Variable für Schriftgröße aus der Barrierefreiheit */
}

input [type="text"],
[type="number"],
[type="password"] {
  font-size: var(--option-font-size); /* Variable für Schriftgröße aus der Barrierefreiheit */
}

button {
  font-size: var(--option-font-size); /* Variable für Schriftgröße aus der Barrierefreiheit */
  padding: 10px 20px;
  font-size: 1em;
  border: none;
  border-radius: 6px;
  background-color: #3498db;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease; /* Übergang bei Hover */
}

button:hover {
  background-color: #2980b9;
}

/* ### Ausklappbare Tabelle für Frühstück Einträge */
.switch-button {
  margin: 10px 0;
  padding: 8px 16px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
}

.switch-button:hover {
  background-color: #2980b9;
}

.table-row-hidden {
  display: none;
}

/* ### Formatierung für outputMealplan! */
.container-mealplan {
  display: flex;
  justify-content: start;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Überschriften Speiseplanausgabe */
h2.meal-output,
h3.meal-output {
  text-align: center;
  color: #ffffff;
}

/* Container links/rechts für die Tabellenausgabe */
.left,
.right {
  width: 52%;
  background-color: #3e658a;
  margin: 20px;
  box-sizing: border-box; /* Stellt sicher, dass Padding/Margin in die Breite einbezogen werden */
  max-height: fit-content;
}

/* Formatierung der ausgegebenen Tabellen */
.tableMeal {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  box-sizing: border-box;
}

/* Formatierung des dynamisch ausgegebenen Tabellenzeilen */
.tableMeal td,
.tableMeal th {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis; /* Text wird abgeschnitten */
}

/* Media Queries für mobile Endgeräte */
/* Alles was hier aufgeführt wird, wird überschrieben */
@media (max-width: 768px) {
  .container-mealplan {
    flex-direction: column; /* Alles untereinander */
    padding: 10px;
  }

  .left,
  .right {
    width: 100%;
    margin: 10px 0;
  }

  .button-container {
    display: flex; /* Button nicht mehr abgeschnitten */
    flex-direction: column;
    align-items: center;
  }

  .button-container button {
    width: 80%;
    margin-bottom: 10px;
    padding: 15px 40px; /* Größere Schaltflächen für kompletten Text in Button */
  }

  footer a {
    display: block; /* Fußzeile Umruch */
  }

  .ButtonIndex {
    display: block; /* Umbruch der Buttons*/
    padding: 15px 40px; /* Größere Schaltflächen für kompletten Text in Button */
  }
}
