canvas {
  position: absolute;
  width: 200%;
}


.hallway {
  position: relative;
  width: 100%;
  display: block;
}

.edit-bottom-part {
  background-color: #1E1E24;
  border-width: 0;
  color: #EEF0F2;
}

body {
  color: #EEF0F2;
  background-color: #1E1E24;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  margin: 0;
  align-items: center;
  font-family: 'Noto Sans', 'Roboto', sans-serif;
  border-radius: 15px;
  font-size: 16px;
  line-height: 1.5;
}

.filler_box {
  width: 100vw;
  height: 25vh;
}

.map {
  overflow: auto;
  width: 100%;
  height: 75%;
  position: relative;
  display: inline-block;
}

#panzoom-container {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#error_message {
  background-color: orange;
  text-align: center;
  width: fit-content;
  font-size: large;

}

#error_message_link {
  color: red;
  padding-right: 0px;
}

.message_box {
  width: 100%;
}

.path_button {
  transition: all 0.075s ease;
}

.path_button:active {
  margin-top: 3px;
  box-shadow: none;
  transform: scale(0.98);
}

@media only screen and (max-width: 768px) {

  .warning_box,
  .warning {
    display: none;
  }
}

@media only screen and (min-width: 769px) {
  .warning_box {
    display: flex;
    background-color: #00ADBF;
    width: 100%;
    height: 100%;
    position: fixed;
    justify-content: center;
    align-items: center;
    z-index: 3;
  }

  .warning {
    background-color: #EEF0F2;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

.view-buttons {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 10px;
  z-index: 10000;
}

#zoomIn,
#viewTog,
#downloadMapBtn,
#zoomOut {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #1E1E24;
  color: #EEF0F2;
  border: none;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s;
}

#viewTog:hover,
#downloadMapBtn:hover,
#zoomIn:hover,
#zoomOut:hover {
  background-color: #9DBBAE;
}

a {
  color: #00ADBF;
  text-decoration:none;
  font-weight: bolder;

}


a:hover {
  color: #9DBBAE;
}

.tooltip {
  position: absolute;
  color: #EEF0F2;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 200px;
  word-wrap: break-word;
  display: none;
  z-index: 1001;
  font-size: 14px;
  background-color: rgba(30, 30, 36, 0.95);
  border: 1px solid #2E2E34;
}

#tooltip {
  position: absolute;
  color: #EEF0F2;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 200px;
  word-wrap: break-word;
  display: none;
  z-index: 1001;
  font-size: 14px;
  background-color: rgba(30, 30, 36, 0.95);
  border: 1px solid #2E2E34;
}
button:active {
  transform: translateY(2px);
}

/* Improve touch targets and interaction */
button, input, select, textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #00ADBF;
  outline-offset: 2px;
}

#mySvg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#hallwayImage {
  display: block;
  width: 100%;
  height: auto;
}

input,
select {
  background-color: #9DBBAE;
  border-width: 0;
  color: #1E1E24;
  border-radius: 15px;
  padding: 12px 16px;
  font-size: 16px;
  min-height: 44px;
  box-sizing: border-box;
}


svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}



textarea {
  background-color: #2E2E34;
  border-width: 0;
  border-radius: 15px;
  color: #EEF0F2;
  padding: 12px 16px;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.4;
  box-sizing: border-box;
  width: 100%;
  resize: vertical;
}

#maindiv {
  display: flex;
  background-color: #1E1E24;
  align-items: center;
  gap: 15px;
  color: #EEF0F2;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 10px;
}

#submit,
.path_button {
  margin-left: 0;
  background-color: #2E2E34;
  border-width: 0;
  color: #EEF0F2;
  min-width: 120px;
  min-height: 54px;
  font-size: 18px;
  border-radius: 15px;
  padding: 12px 20px;
  cursor: pointer;
  touch-action: manipulation;
}



.schedule-box {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #1E1E24;
  color: #EEF0F2;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  font-family: 'Open Sans', 'Roboto', sans-serif;
  max-width: 250px;
  z-index: 9999;
  font-size: 14px;
}


.schedule-line {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.schedule-pill {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  margin-right: 8px;
  border: 1px solid #1E1E24;
}

.input_controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
  flex-wrap: wrap;
  padding: 0 10px;
}

details{
  background-color: #303030;
  color: #fff;
  font-size: 1.5rem;
}

summary {
  padding: .5em 1.3rem;
  list-style: none;
  display: flex;
  justify-content: space-between;  
  transition: height 1s ease;
}

summary::-webkit-details-marker {
  display: none;
}

summary:after{
  content: "\002B";
}

details[open] summary {
    border-bottom: 1px solid #aaa;
    margin-bottom: .5em;
}

details[open] summary:after{
  content: "\00D7";
}

details[open] div{
  padding: .5em 1em;
}

/* Mobile-specific improvements */
@media only screen and (max-width: 768px) {
  body {
    font-size: 14px;
  }

  .view-buttons {
    top: 5px;
    right: 5px;
    gap: 8px;
  }

  #zoomIn,
  #viewTog,
  #downloadMapBtn,
  #zoomOut {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .schedule-box {
    top: 5px;
    left: 5px;
    padding: 8px 12px;
    max-width: 200px;
    font-size: 12px;
  }

  #maindiv {
    flex-direction: column;
    gap: 12px;
    padding: 15px;
    align-items: stretch;
  }

  #maindiv > * {
    text-align: center;
  }

  #maindiv label {
    margin-bottom: 5px;
    display: block;
    font-weight: bold;
  }

  #maindiv p {
    margin: 8px 0 4px 0;
    font-weight: bold;
  }

  input, select, textarea {
    width: 100%;
    margin: 5px 0;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  #submit,
  .path_button {
    width: 100%;
    margin: 15px 0 10px 0;
    min-height: 48px;
    font-size: 16px;
  }

  textarea {
    min-height: 120px;
  }

  /* Better spacing for the control sections */
  #bottom-part {
    padding: 15px;
    padding-bottom: 80px; /* Space for fixed bottom links */
  }

  /* Improve the color instruction text */
  #bottom-part > div:first-child {
    flex-direction: column;
    gap: 10px;
    text-align: center;
    margin-bottom: 15px;
  }

  #bottom-part > div:first-child p {
    margin: 0;
    font-size: 14px;
  }

  #exampleSched {
    margin-left: 0 !important;
    width: 100%;
    max-width: 200px;
  }

  /* Better navigation links for mobile */
  div[style*="position: fixed; bottom: 0"] {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background-color: #1E1E24;
    padding: 10px;
    border-top: 1px solid #2E2E34;
  }

  div[style*="position: fixed; bottom: 0"] p {
    margin: 0;
    font-size: 12px;
    line-height: 1.3;
  }

  div[style*="position: fixed; bottom: 0"] a {
    display: inline-block;
    margin: 2px 5px;
    padding: 4px 8px;
    background-color: #2E2E34;
    border-radius: 8px;
    text-decoration: none;
  }

  /* Checkbox styling improvements */
  input[type="checkbox"] {
    width: auto;
    margin: 0 8px;
    transform: scale(1.2);
  }

  /* Form layout improvements */
  #scheduleForm {
    margin-top: 10px;
  }

  /* Error message styling */
  #error_message {
    margin: 15px 0;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
  }

  /* Message box improvements */
  .message_box {
    margin: 15px 0;
    text-align: center;
  }

  .message_box p {
    margin: 0;
    padding: 10px;
    background-color: #2E2E34;
    border-radius: 8px;
    font-size: 14px;
  }

  /* Map height adjustment for mobile */
  .map {
    height: 60vh;
    min-height: 300px;
  }

  /* Better touch targets for interactive elements */
  .path_button:active {
    margin-top: 1px;
    transform: scale(0.98);
  }

  button:active {
    transform: translateY(1px) scale(0.98);
  }
}

/* Small mobile devices */
@media only screen and (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .view-buttons {
    gap: 6px;
  }

  #zoomIn,
  #viewTog,
  #downloadMapBtn,
  #zoomOut {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .schedule-box {
    max-width: 180px;
    font-size: 11px;
    padding: 6px 10px;
  }

  #maindiv {
    padding: 10px;
    gap: 10px;
  }

  #bottom-part {
    padding: 10px;
    padding-bottom: 75px;
  }

  div[style*="position: fixed; bottom: 0"] p {
    font-size: 11px;
  }

  div[style*="position: fixed; bottom: 0"] a {
    margin: 1px 3px;
    padding: 3px 6px;
    font-size: 11px;
  }

  .map {
    height: 55vh;
  }
}