@font-face {
  font-family: 'IBM';
  src: url('/fonts/IBMPlexSansThai-Medium.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
    margin: 0;
    font-family: 'IBM', 'Kanit', sans-serif; /* friendly, readable font */
}

.home-container {
    display: flex;
    height: 100vh;
}
.map-wrapper {
    display: flex;
    background-color: #ddd;
    padding-left: 1%;
    padding-right: 1%;
    align-items: center;
    height: 100vh;
}

.map {
    width: 1370px;
    height: 897px;
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.1);
    background-color: #ddd; /* Fallback if map fails */
}

.report-div {
    display: flex;
    flex-direction: column;
    background-color: #91d4ee;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    box-shadow:  0px 5px 15px rgba(0, 0, 0, 0.3);
    
}

.report-header {
    font-size: 1.2rem;
    display: flex;
    flex: 1;
    height: 100%;
    font-weight: bold;
    color: #4b2d12;
    background-color: #ffffff;
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    box-shadow: #333 0px 0px 10px;
}

.report-div label,
.report-div h1 {
  margin-bottom: 10px;
}

.logo-container {
  flex: 4;
  display: flex;
  width: 100%;
  padding-bottom: 20%;
  justify-content: center;
  align-items: center;
  text-align: center;
  vertical-align: middle;
  
}

.logo {
  width: 90%;
  margin-top: 10%;
  margin-bottom: 10%;
}

/* ////////////////////////////////////Modal styles//////////////////////////////////////// */
.custom-modal {
  position: fixed;
  width: 50%;
  height: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff9f0; /* warm, parchment tone */
  border: 3px solid #d9b47c; /* soft golden border */
  border-radius: 16px;
  padding: 24px;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  font-family: 'IBM', 'Kanit', sans-serif; /* friendly, readable font */
  overflow-y: auto;
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: row;
  gap: 20px;
  flex-wrap: wrap;
}

.close-button {
  position: absolute;
  top: 10px;
  right: 16px;
  cursor: pointer;
  font-size: 26px;
  font-weight: bold;
  color: #555;
  transition: color 0.2s ease;
}

.close-button:hover {
  color: #c0392b;
}

.modal-body {
  display: flex;
  width: 100%;
}

.loc-name{
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  font-weight: bold;
  color: #333;
  margin-bottom: 12px;
  padding-top: 10px;
}

.modal-left {
  flex: 7;
  min-width: 200px;
  padding-top: 12px;
  font-size: clamp(1.0rem, 2vw, 1.3rem);
}

.modal-right {
  flex: 5;
  background-color: #fff3dd;
  font-size: clamp(1.0rem, 2vw, 1.3rem);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e0c097;
  transition: all 0.3s ease;
}

.modal-right:hover{
  box-shadow: 0 0 12px rgba(0,0,0,0.6);
}

.least-crowded {
  font-size: clamp(1.0rem, 2vw, 1.4rem);
  font-weight: bold;
}

/* ////////////////////////////////////Modal styles//////////////////////////////////////// */

.leaflet-pane {
  overflow: visible !important;
}

.custom-marker {
  width: 25px;
  height: 25px;
  cursor: pointer;
  border-radius: 50%;
  background-color: green;
  border: 4px solid #ffffff;
  box-shadow: #333 0px 0px 5px;
  transition: all 0.3s ease;
}

.custom-marker.low {
  background-color: #00ff00;
}

.custom-marker.medium {
  background-color: #ffff00;
}

.custom-marker.high {
  background-color: #ff0000;
}

.custom-marker.low:hover {
  transform: scale(1.2);
  filter: brightness(1.3);
  box-shadow: 0 0 20px rgba(33, 255, 15, 0.9);
}

.custom-marker.medium:hover {
  transform: scale(1.2);
  filter: brightness(1.3);
  box-shadow: 0 0 20px rgba(248, 255, 15, 0.9);
}

.custom-marker.high:hover {
  transform: scale(1.2);
  filter: brightness(1.3);
  box-shadow: 0 0 20px rgba(255, 57, 15, 0.9);
}

.custom-marker{
  width: 2vw;
  height: 2vw;
  z-index: 1000;
}

@media (max-width: 1000px) {
  .home-container {
    display: flex;
    flex-direction: column;
    height: auto;
  }
}

.custom-dropdown {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 10px 0;
  font-size: 1rem;
  
}



.custom-dropdown .dropdown-toggle {
  background-color: rgb(255, 236, 206);
  color: rgb(112, 41, 0);
  font-size: 1.2rem;
  font-weight: bold;
  padding: 0px 16px;
  padding-top: 10px;
  margin-left: 10px;
  cursor: pointer;
  user-select: none;
  border: none;
  border-radius:  5px;
  border-bottom: #333 solid 2px;
  transition: all 0.3s ease;;
}

.custom-dropdown .dropdown-toggle:hover{
  box-shadow: #333 0px 0px 10px;
}


.custom-dropdown .dropdown-toggle::after {
  content: '▾';  /* ▼ ▾ ▽ ∨ can be used */
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  pointer-events: none;
}

.custom-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  z-index: 10;
  background: white;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  list-style: none;
  padding: 0;
  margin: 5px 0 0;
}

.custom-dropdown .dropdown-menu li {
  padding: 10px 15px;
  cursor: pointer;
}

.custom-dropdown .dropdown-menu li:hover {
  background: #eee;
}

.custom-dropdown.open .dropdown-menu {
  display: block;
}

.custom-dropdown.disabled .dropdown-toggle {
  background-color: #eee;
  color: #888;
  pointer-events: none;
  cursor: not-allowed;
}

.info-table {
  width: 90%;
  border-collapse: collapse;
}
.label {
  width: 20%;
  min-width: 100px;
}

#crowd-text {
  font-size: 1.5rem;
}


.rotate-warning {
  display: none;;
  z-index: 9999;
  width: 100%;
  height: 100vh;
  background-color: #fff3e0;
  color: #4b2d12;
  font-size: 1.4rem;
  font-family: 'IBM', 'Kanit', sans-serif;
  text-align: center;
  justify-content: center;
  align-items: center;
}

@media screen and (max-height: 500px) and (orientation: landscape) {
  .loc-name{
    margin-bottom: 0px;
    padding-top: 0;
  }

  .custom-modal {
    height: 70%;
    width:60%;
    padding: 15px;
  }

  .modal-content{
    gap: 0;
  }

  .label {
    width: 20%;
    min-width: 70px;
  }

  .custom-dropdown .dropdown-toggle {
    height: 90%;
    font-size: 0.9rem;
    padding: 0px 8px;
    padding-top: 5px;
    margin-left: 5px;
  }

  .custom-dropdown .dropdown-toggle::after {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    pointer-events: none;
  }

  #crowd-text {
    font-size: 1.2rem;
  }

  .least-crowded {
    font-size: 1.0rem;
  }

  .queue-text{
    margin:0;
    padding: 5px 0;
  }
  .modal-right {
    font-size: 1.0rem;
  }

  ul, ol {
    padding-left: 1.5em;  /* or try 0.5em */
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 0;
  }

  li {
    margin-left: 0;
  }

  .close-button{
    top: -10px;
    right: 10px;
  }

  .custom-modal {
    overflow-y: auto;               /* Enable vertical scrolling */
    scrollbar-width: none;         /* Firefox */
    -ms-overflow-style: none;      /* IE and Edge */
  }

  .custom-modal::-webkit-scrollbar {
    display: none;                 /* Chrome, Safari, newer Edge */
  }

}

@media screen and (orientation: portrait) and (max-width: 768px) {
  .rotate-warning {
    display: flex;
    height: 100vh;
  }

  .rotate-warning p{
    width: 80%;
  }

  .home-container, .map-wrapper, .report-div, .modal .close-button{
    display: none !important;
  }
}

