html, body {
  margin: 0;
  height: 100%;
  font-family: Arial, sans-serif;
}

#app {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* Left side panel */
#sidePanel {
    position: relative;
    width: 400px;
    height: 100vh;

    display: flex;
    flex-direction: column;

    background-color: rgb(30, 30, 30);
    border: 2px solid #000;
    box-sizing: border-box;

    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
}

/* Header image at top */
.panel-header {
  width: 100%;
  text-align: center;
  background-color: rgb(30, 30, 30);
  border-bottom: 1px solid rgb(30, 30, 30);
}

.panel-header img {
  max-width: 100%; 
  height: auto;
  display: block;
  margin: 0 auto;
  margin-top: 25px;
  background-color: #ccc;
}

/* Container for figures */
.figure-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 10px;
  overflow-y: auto;
  background-color: #f0f0f0;
}

.figure-container img {
  width: 100%;
  max-width: 280px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Title section */
.panel-title {
  padding: 15px;
  background-color: rgb(30, 30, 30);
  text-align: center;
}

.panel-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #e0e0e0;
}


/* Visualizer container with distinct color */
.visualizer-container {
  background-color: #ffffff;
  padding: 15px;
  border: 1px solid #000000;
  margin: 0 10px 10px 10px; 
  border-radius: 6px;     
} 

.visualizer-container h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #222;
  text-align: left;
}

/* Checkbox group */
.checkbox-group {
  font-size: 12px;
  color: #000000;
}

.checkbox-group p {
  font-weight: bold;
  margin-bottom: 5px;
  font-size: 14px;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  transform: scale(1.1);
}

.year-group {
  display: grid;
  grid-template-columns: repeat(5, 52px);
  gap: 8px 10px;
  margin-top: 5px;
}

.year-group label {
  margin-bottom: 0;
}

.platform-container {
  background-color: #ffffff;
  padding: 15px;
  border: 1px solid #000000;
  margin: 0 10px 10px 10px;
  border-radius: 6px;
}

.platform-container h3 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.platform-container select {
  width: 100%;
  padding: 8px;
  font-size: 14px;
  border: 1px solid #999;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;
}








/* Buttons container*/
.icon-box-row {
  display: flex;
  gap: 10px;
  margin-left: 10px;
  margin-right: 10px;
}

.icon-button-box {
  flex: 1;
  background-color: #ffffff;
  border: 1px solid #999;
  border-radius: 14px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.icon-square-button {
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 4px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  box-shadow: none !important;
}

.icon-square-button i {
  font-size: 20px; 
  margin: 0 !important;
}

/* visitors modal*/
.visitor-title {
    text-align: center;
    font-size: smaller ;
    color: #e0e0e0;
    font-weight:lighter;
    letter-spacing: 0.5;
    
}

.flag-counter {
    display: flex;
    justify-content: center;
}

.flag-counter img {
    display: block;
    clip-path: inset(0 0 25px 0); /* top right bottom left */
}

/* feedback modal */
.custom-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.custom-modal.show {
  display: flex;
}

.custom-modal-content {
  background: #ffffff;
  color: #000000;
  border-radius: 8px;
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
} 

.custom-modal-header {
  font-size: 20px;
  font-weight: 600;
  padding: 16px 20px;
  border-bottom: 1px solid #ddd;
}

.custom-modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1 1 auto;
}

.custom-modal .actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 0 20px 12px 20px;
  margin: 0;
  flex: 0 0 auto;
}

#feedbackForm {
  margin: 0;
}


#visitorsModal .content {
    min-height: 340px;
    display: flex;
    justify-content: center;
    align-items: center;
}




/* Right-side panel (hidden by default) */
#sidePanelRight {
  position: relative;
  width: 400px;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: rgb(240, 240, 240);
  border-left: 2px solid #000;
  border-top: 2px solid #000;
  box-sizing: border-box;
  transition: transform 0.3s ease-in-out;
}

#sidePanelRight.hidden {
  display: none;
}

.right-panel-title {
  padding-top: 15px;
  background-color: #e0e0e0;
  text-align: center;
  font-size: 22px;
  font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
  font-weight: 600;
  color: #222;
}

.right-panel-subtitle {
  padding: 10px 15px;
  background-color: #e0e0e0;
  border-bottom: 1px solid #bbb;
  font-size: 14px;
  color: #000000;
  text-align: center;
  font-style: italic;
}


.right-panel-content {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: #f9f9f9;
  font-size: 14px;
  color: #333;
}

.right-panel-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 10px 0;
}

.right-panel-footer img {
  width: 80%;
  max-width: 400px;
  height: auto;
}


/* Map area */
#map {
  flex: 1;
  height: auto;
  min-height: 100vh;
}




/* ----------------------------------------------------------------------------------------------
/* VERTICAL SCREEN MODE */
@media screen and (orientation: portrait) and (max-width: 10000px) {

  :root {
    --leftPanelWidth: 100vw !important;
  }

  #app {
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
  }

  #sidePanel {
    height: 100vh !important;
    flex: 0 0 100vh !important;
    width: 100%;
    scroll-snap-align: start;
    overflow-y: auto;
    position: relative !important;
    overflow-y: auto !important;
    order: 1;
    border-bottom: 1vh solid #ffffff;
  }

  .right-panel-footer img {
    width: 100%;
    content: url("figures/footer3.png");
  }

  #map {
    flex: 0 0 100vh;
    height: 100vh !important;
    width: 100%;
    position: relative;
    order: 2;
    border-bottom: 1vh solid #ffffff;
  }

  #map .mobile-search {
    position: absolute !important;
    top: 15px;
    left: 12px;
    transform: none !important;
    width: 55vw !important;
    max-width: 260px !important;
    height: auto;
    z-index: 6000 !important;
  }

  #map {
    position: relative !important;
  }

  #sidePanelLeft {
    flex: 0 0 100vh;
    max-height: 100vh;
    width: 100%;
    padding-top: 7px;
    border-bottom: 2px solid #000;
    box-sizing: border-box;
    order: 3;
  }

  .panel-title {
    padding: px;
    grid-column: 1 / 2;
    grid-row: 2;
  }

  .panel-title h2 {
    font-size: 4vw;
    color: #e0e0e0;
  }


  .platform-container h3 {
    font-size: 3vw;
    color: #222;
  }

  .platform-container select {
    width: 100%;
    padding: 0.5vh;
    font-size: 1.5vh;
    border: 1px solid #999;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
    -moz-appearance: auto;
  }

  .visualizer-container h3 {
    font-size: 1.5vh;
  }

  .visualizer-container::after {
    background: rgba(230, 230, 230, 0.5);
  }

  .checkbox-group {
    font-size: 1.5vh;
  }

  .checkbox-group label {
    display: flex;
    align-items: center;
    margin-bottom: 1vh;
    cursor: pointer;
  }

  .checkbox-group p {
    font-size: 1.5vh;
  }
}