@font-face {
  font-family: "M+ 2p";
  src: url("../fonts/mplus-2p-regular.ttf");
  font-weight: 400;
}
@font-face {
  font-family: "M+ 2p";
  src: url("../fonts/mplus-2p-medium.ttf");
  font-weight: 500;
}
@font-face {
  font-family: "M+ 2p";
  src: url("../fonts/mplus-2p-bold.ttf");
  font-weight: 700;
}
@font-face {
  font-family: "M+ 2p"; src: url("../fonts/mplus-2p-heavy.ttf");
  font-weight: 800;
}

@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Regular.ttf");
  font-weight: 400;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Italic.ttf");
  font-style: italic;
}
@font-face {
  font-family: "Roboto";
  src: url("../fonts/Roboto-Bold.ttf");
  font-weight: bold;
}
@font-face {
  font-family: "Glyphter";
  src: url('../fonts/Glyphter.ttf') format('truetype');
  font-weight: 400;
}

@media screen and (max-width: 1000px) {
  .footer-container {
    font-size: 0.73rem !important;
  }
}

@media screen and (max-device-width: 700px) and (pointer: coarse) {
  #route-planner { display: none !important; }
}

@media screen and (max-width: 1000px) and (orientation: portrait) {
  #sidebar {
    width: 100%;
  }

}
@media screen and (max-width: 1000px) and (orientation: landscape) {
  #sidebar {
    width: 50%;
    max-width: 800px;
    min-width: 400px;
  }
}
@media screen and (min-width: 1001px) {
  #sidebar {
    width: 40%;
    max-width: 800px;
    min-width: 400px;
  }
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Helvetica Neue", "Helvetica", "Roboto", sans-serif;
  -webkit-text-size-adjust: 100%;
}

#ubahn-map {
  width: 100%;
  height: 100%;
}

form {
  margin-block-end: 0;
  margin-block-start: 0;
}

.label {
  font-family: 'M+ 2p', sans-serif;
  font-size: 14px;
  cursor: pointer;
}

:focus {
  outline: 0;
}

tspan {
  white-space: pre;
}

#route-planner {
  display: none;
  position: absolute;
  top: 6vh; /* 6% from the top */
  left: calc(88vw - 300px);
  width: 300px; /* ensure this matches your element's actual width */
  padding: 12px 10px 0 10px;
}

#route-navigation, #route-error {
  display: none;
  text-align: center;
  margin-top: 10px;
}
#route-navigation a {
  text-decoration: none;
}

#total-routes, #route-error {
  font-size: 12px;
  font-style: italic;
  padding-bottom: 6px;
}

#current-route {
  display: inline-block;
  width: 2em;
  text-align: center;
}
#current-route, #route-error {
  color: salmon;
}


/* Buttons */
button {
  padding: 0.5rem 1rem;
  border: none;
  font-weight: bold;
  cursor: pointer;
  box-sizing: border-box;
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font-size: 14px;
  font-weight: 400;
  overflow: visible;
  text-align: center;
  text-transform: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: middle;
  white-space: nowrap;
}
button:focus {
  text-decoration: none;
}
button-50:hover {
  text-decoration: none;
}
button:not([disabled]):active {
  transform: translate(2px, 2px);
}

.button-group {
  display: flex;
  gap: 1rem;
}
.button-group * {
  flex: 1;
  margin: 0
}

.reset-btn {
  background-color: #484848;
}
.find-route-btn {
  background-color: gray;
}

#sidebar {
  height: 100%;
  position: absolute;
  background-color: #f3f3f3;
  display: none;
  z-index: 100;
}

.wiki-body {
  text-align: justify;
}

.fake-link,
#lines-for-station {
  font-size: 13px;
}

#lines-for-station {
  font-weight: bold;
}

#sidebar-footer-container {
  padding: 0;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: 0;
  width: 100%;
  font-size: 12px;
  color: #101010;
  height: 30px;
  background-color: #f3f3f3;
}

#sidebar-footer{
  margin: 0 35px 0 35px;
  height: 28px;
  border-top: 1px solid #808080;
  line-height: 28px;
}

#sidebar-content-container {
  padding: 0 35px 0 35px;
  position: absolute;
  top: 31px;
  bottom: 30px;
  overflow: auto;
  overflow-wrap: break-word;
  font-size: 15px;
  background-color: #f3f3f3;
}

#sidebar-content-container p {
  line-height: 20px;
}

img {
  max-width: 100%;
}

a:link, a:visited,
a:hover, a:active {
  color: black;
}

#wiki-content a {
  font-size: 12px;
}

#sidebar-header {
  margin: 0 35px 0 35px;
  height: 30px;
  border-bottom: 1px solid #808080;
  line-height: 30px;
}

#close-link-container {
  float: right;
  width: 30%;
  text-align: right;
}

#lines-for-station-container {
  float: left;
  width: 30%;
}

#navigator-container {
  display: inline-block;
  margin: 0 auto;
  text-align: center;
  width: 40%;
}

.addendum {
  font-size: 12px;
  font-style: italic;
  text-align: left;
}

.footer-container {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  opacity: 0.94;
  color: #101010;
  font-size: 0.83rem;
}

.main-footer {
  position: fixed;
  bottom: 0;
}

.header a,
.footer a {
  text-decoration: none;
}

.header a:hover,
.footer a:hover {
  text-decoration: underline;
}

#footer-left,
#footer-right,
#footer-center {
  display: flex;
  padding: 3px 2px 3px 2px;
}

#footer-left {
  flex: 1;
  text-align: right;
  display: block;
}
#footer-center {
  font-weight: bold;
}
#footer-right {
  flex: 1;
}

#info-page-container {
  margin: 0 auto;
  max-width: 820px;
  padding: 30px;
  text-align: justify;
  font-size: 15px;
  padding-bottom: 40px;
}

.main-footer{
  background-color: white;
}

#info-page {
  background-color: #f3f3f3;
}

hr {
  border: 0;
  height: 0;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.checkbox {
  padding-bottom: 5px;
}
.checkbox input[type="checkbox"] {
  opacity: 0;
  position: absolute;
}
.checkbox label {
  position: relative;
  display: inline-block;
  padding-left: 22px;
  line-height: 22px;
}
.checkbox label::before,
.checkbox label::after {
  position: absolute;
  content: "";
  display: inline-block;
}
.checkbox label::before{
  height: 16px;
  width: 16px;
  border: 1px solid;
  left: 0px;
  top: 3px;
}
.checkbox label::after {
  height: 5px;
  width: 9px;
  border-left: 2px solid;
  border-bottom: 2px solid;
  transform: rotate(-45deg);
  left: 4px;
  top: 7px;
}
.checkbox input[type="checkbox"] + label::after {
  content: none;
}
.checkbox input[type="checkbox"]:checked + label::after {
  content: "";
}
.checkbox input[type="checkbox"]:focus + label::before {
  outline: rgb(59, 153, 252) auto 5px;
}
label {
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -o-user-select: none;
  user-select: none;
  cursor: pointer;
}

.sbahn {
  font-family: Glyphter;
}

.card {
  position: relative;
  width: 210px;
  margin: 0 auto;
  padding: 1.4rem;
  border: 1px solid #484848;
  background-color: #fff;
  opacity: 0.94;
}

.card-title {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.card-title p {
  margin: 0;
}
.close {
  padding-bottom: 2px;
  font-size: 1.2rem;
  text-decoration: none;
  color: #000;
  line-height: 1;
  cursor: pointer;
}

.close:hover {
  color: #888;
}
/* The floating-label wrapper */
.floating-label {
  position: relative;
  display: block;
  margin-bottom: 1rem;
}
/* Input field */
.floating-label__field {
  display: block;
  width: 100%;
  line-height: 28px;
  font-size: 14px;
  color: black;
  background: transparent;
  border: 1px solid #484848;
  appearance: none;
  -webkit-appearance: none;
}

/* Floating label text */
.floating-label__label {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 14px;
  line-height: 14px;
  font-weight: 500;
  background: #fff;
  pointer-events: none;
  transition: transform 0.2s ease;
  transform-origin: 0 0;
  color: black;
}
/* Move label up when input is focused or not empty */
.floating-label__field:focus + .floating-label__label,
.floating-label__field:not(:placeholder-shown) + .floating-label__label {
  transform: translate(0.25rem, -0.9rem) scale(0.8);
  color: #484848;
}

.ui-menu .ui-menu-item-wrapper.ui-state-active {
  border: 1px solid gray;
  background: gray;
}

.icon {
  height: 1em;
  vertical-align: middle;
  margin-right: 0.4em;
}

.find-route-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
