/**
 * Copyright (C) 2024 ELARA Leitstellentechnik GmbH. All rights reserved.
 * Developed by Bits&Bytes IT Solutions.
 * See LICENSE file for details.
 */

/* Base Styles (Mobile First) */
body {
  font-family: "Helvetica", sans-serif;
  font-size: 1rem; /* Base font size */
  line-height: 1.5;
  color: #eee;
  background-color: #555;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

li {
  list-style-type: none;
  margin-top: 0.625rem;
}

.wrapper,
.container {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
}

.searchbar-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.searchbar {
  padding: 1rem;
}

.section {
  margin-bottom: 1.5rem;
}

.section--title {
  font-size: 1.25rem;
  font-weight: bold;
  color: #ffffff;
}

.emergencyManualEntry {
  display: block;
  text-decoration: none;
  color: #eee;
  margin-bottom: 0;
  font-size: 1rem;
  transition: color 0.3s;
  border-bottom: 1px solid #424141;
  padding: 5px 0;
}

.emergencyManualEntry * {
  margin: 0;
  padding: 0;
}

.emergencyManualEntry:hover {
  color: #007bff;
}

.emEntryTitle {
  font-size: 1.25rem;
  font-weight: bold;
  color: #ffffff;
}

.qnaContainer {
  background-color: #6b6b6b;
  border-radius: 0.75rem;
  padding: 0.5rem;
}

.answer {
  padding: 0.3125rem;
}

.question {
  display: block;
  border-top: 1px solid #424141;
}

.questionList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.625rem;
}

.questionList.instruction {
  display: block;
}

.instruction-checkbox {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
}

.promtList {
  visibility: hidden;
  padding-top: 0.625rem;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.625rem;
}

.prompt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid #ccc;
}

.content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.content-wrapper.instruction {
  border-bottom: 1px solid #424141;
  padding: 5px 0;
}

.active {
  visibility: visible;
}

.prompt.active {
  border-bottom: 1px solid #424141;
  padding: 0.3125rem 0;
}

.hide {
  background-color: grey;
  cursor: not-allowed;
  opacity: 0.5;
}

.loginLogo {
  display: block;
  margin: 0 auto 2rem;
  max-width: 80%;
}

.loginForm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem; /* Space between input fields */
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  margin: 0 auto;
}

.loginForm input,
.loginForm button {
  width: 90%;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 4px;
  box-sizing: border-box;
}

.loginForm input {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #f9f9f9;
  transition: border-color 0.3s;
}

.loginForm input:focus {
  border-color: #0056b3;
  outline: none;
}

.loginForm button {
  padding: 0.75rem;
  font-size: 1rem;
  background-color: #0056b3;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.loginForm button:hover {
  background-color: #0056b3;
}

.list-button {
  background-color: #999;
  color: #eee;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 3rem; /* Minimum height, but flexible based on content, aligning over all buttons */
}

.list-button p {
  margin: 0;
  white-space: normal;
}

.main_menue_button {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

ul {
  padding-inline-start: 0;
  margin: 0;
  list-style-type: none;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 1rem;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  overflow-y: auto;
  max-height: 80%;
  color: #000;
}

.modal-content img {
  max-width: 100%;
  border-radius: 8px;
}

.modal-content a {
  color: #007bff;
}

/* Modal */
#imageModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

#imageModal img {
  max-width: 90%;
  max-height: 90%;
  border: 3px solid white;
  border-radius: 8px;
}

.glowing-border {
  position: relative;
}

.glowing-border::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0.5rem;
  background: linear-gradient(to bottom, transparent, #007bff);
  pointer-events: none;
  animation: glow 1.5s infinite;
}

@keyframes glow {
  0% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.5;
  }
}

.page_divider {
  display: flex;
  flex-direction: row;
}
#menuContainer {
  width: 90px;
  flex-shrink: 0;
}

/* Burger Button */
.burger-menu {
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: white;
  z-index: 1001;
}

/* Side Menu */
.side-menu {
  position: fixed;
  top: 0;
  left: -250px; /* Start hidden */
  width: 250px;
  height: 100%;
  background: #333;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.5);
  padding-top: 60px;
  transition: left 0.3s ease-in-out;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  flex-grow: 1;
}

.side-menu ul li {
  padding: 15px;
  text-align: center;
}

.side-menu ul li a {
  color: white;
  text-decoration: none;
  font-size: 1.2rem;
}

#version-info {
  padding: 10px;
  text-align: center;
  color: #ccc;
  font-size: 0.9rem;
  height: 100px;
  flex-shrink: 0;
}

/* Active state */
.side-menu.active {
  left: 0;
}

.centered-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100vh;
  text-align: center;
  padding: 20px;
  margin: 0 auto;
}

.centered-text {
  font-size: 1.2rem;
  max-width: 600px;
  margin-top: 20px;
  text-align: left;
}

.centered-text p {
  margin-bottom: 1rem;
}

/* Media Queries */

/* Media query for small devices (e.g., smartphones) */
@media (max-width: 480px) {
  .loginForm {
    gap: 1rem;
    max-width: 600px;
  }

  .loginForm input {
    flex: 1 1 45%;
    font-size: 1.2rem;
  }

  .instruction-checkbox {
    width: 1rem;
    height: 1rem;
  }

  .loginForm button {
    flex: 1 1 100%;
  }

  .modal-content {
    width: 95%;
    max-width: 400px;
    max-height: 85%;
  }

  #menuContainer {
    width: 60px;
  }

  .section {
    font-size: 0.8rem;
  }

  .section--title {
    font-size: 1rem;
  }

  .emergencyManualEntry {
    font-size: 0.8rem;
  }

  .emEntryTitle {
    font-size: 1rem;
  }

  .answer {
    font-size: 0.8rem;
  }

  .question {
    font-size: 0.8rem;
  }

  .questionList {
    font-size: 0.8rem;
  }

  .prompt {
    font-size: 0.8rem;
  }

  .content-wrapper {
    font-size: 0.8rem;
  }
}

/* Tablets and up */
@media (min-width: 481px) and (max-width: 768px) {
  .loginForm {
    gap: 1rem;
    max-width: 600px;
  }

  .loginForm input {
    flex: 1 1 45%;
    font-size: 1.2rem;
  }

  .loginForm button {
    flex: 1 1 100%;
  }

  .modal-content {
    width: 80%;
    max-width: 600px;
    max-height: 80%;
  }
}

/* Desktops and up */
@media (min-width: 769px) {
  .loginLogo {
    margin-bottom: 4rem;
    max-width: 60%;
  }

  .loginForm {
    gap: 2rem;
    padding: 2rem;
    max-width: 800px;
  }

  .loginForm input {
    font-size: 1.3rem;
    padding: 1rem;
  }

  .instruction-checkbox {
    width: 2rem;
    height: 2rem;
  }

  .loginForm button {
    font-size: 1.3rem;
    padding: 1rem;
  }

  .modal-content {
    width: 70%;
    max-width: 800px;
    max-height: 75%;
  }
}
