/* Setel margin dan padding ke 0 untuk body dan html */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  color: white;
  /* hapus tes */
  overflow: hidden;
  /* Menghindari scroll bar yang tidak diinginkan */
  box-sizing: border-box;
  /* Pastikan padding dan border tidak mempengaruhi ukuran elemen */
}

:root {
  --primary-color: #5f8670;
  --secondary-color: #9ec8b9;

  --button-active-color: #5c8374;

  --progress-value-color: #9ec8b9;

  --primary-text-color: #527853;
  --secondary-text-color: #112929;

  /* #5F8670, 1B4242, 5C8374, 9EC8B9, 527853, 88AB8E */
}

/* Peta harus memenuhi 100% tinggi dan lebar layar */
#map {
  height: 100vh;
  width: 100%;
  float: right;
  transition: width 0.3s ease;
}

/* Sidebar tetap pada posisi tetap dengan tinggi 100vh */
#sidebar {
  position: fixed; /* Agar menindih peta */
  top: 0;
  left: 0;
  width: 300px; /* Lebar sidebar */
  height: 100vh; /* Tinggi sidebar penuh */
  background: rgba(44, 109, 49, 0.95); /* Warna dengan transparansi */
  overflow-y: auto; /* Scroll jika konten melebihi tinggi */
  z-index: 1000; /* Pastikan menindih peta */
  transform: translateX(-100%); /* Awalnya tersembunyi */
  transition: transform 0.3s ease; /* Efek transisi saat muncul */
}

#sidebar.open {
  padding: 20px;
  transform: translateX(0);
  /* Sidebar muncul */
  width: 30%;
}

/* Info Gedung muncul di atas peta */
#gedung-info {
  width: 25%;
  height: 100vh;
  position: fixed;
  top: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  overflow-y: auto;
  z-index: 1000;
  padding: 20px;
  display: none;
  transition: transform 0.3s ease;
}

#gedung-info h5 {
  color: #fff;
}

#gedung-info img {
  max-width: 250px;
}

#search-area {
  display: flex;
  align-items: center;
  /* Vertically align the input and button */
  justify-content: space-between;
  /* Push the button to the right */
  margin-bottom: 20px;
}

#search-button {
  padding: 6px 20px;
  border: 2px solid #00000022;
  border-radius: 6px;
  background-color: var(--primary-color);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#search-button:hover {
  background-color: var(--secondary-color);
}

#search-button:active {
  background-color: var(--button-active-color);
}

.judul-sidebar {
  color: #ddd;
}

#dropArea {
  margin-block-end: 16px;
  padding: 20px;

  border: 2px dashed #cccccc;
  border-radius: 12px;
}

#dropArea.highlight {
  border-color: purple;
}

#skinFile {
  display: none;
}

#skinFileLabel {
  margin-block: 8px;
  padding-inline: 16px;

  display: inline-block;

  font-size: smaller;
}

#previewImg {
  margin-block-start: 8px;
}

#previewImg img {
  width: 100%;
}

.submit-form {
  display: flex;

  justify-content: end;
}

.btn {
  padding: 8px 24px;
  border: 2px solid #00000022;
  border-radius: 6px;

  display: block;
  background-color: var(--primary-color);

  font-size: 16px;
  font-weight: 500;
  color: #fff;

  transition: 150ms ease-in-out;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--secondary-color);
}

.btn:active {
  background-color: var(--button-active-color);

  outline: 2px solid #00000077;
}

.container-checkbox {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 17px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  color: white;
  line-height: 20px; /* Tinggi baris agar sejajar dengan checkmark */
  align-items: center; /* Selaraskan item secara vertikal */
}

/* Hide the browser's default checkbox */
.container-checkbox input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Create a custom checkbox */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 25px;
  width: 25px;
  background-color: #eee;
}

/* On mouse-over, add a grey background color */
.container-checkbox:hover input~.checkmark {
  background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.container-checkbox input:checked~.checkmark {
  background-color: #2196F3;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the checkmark when checked */
.container-checkbox input:checked~.checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
.container-checkbox .checkmark:after {
  left: 9px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

#full-image-container img {
  object-fit: contain;
  margin-top: 20px;
}

.ket-gedung {
  margin-top: 30px;
  font-size: 20px;
}

@media (max-width: 1190px){
  body{
    font-size: 14px;
  }
  .btn .form-control {
    font-size: 10px;
  }

  #search{
    font-size: 15px;
  }

  .ket-gedung {
    font-size: 16px;
  }

  .container-checkbox{
    font-size: 16px;
    line-height: 20px; /* Tinggi baris agar sejajar dengan checkmark */
    align-items: center; /* Selaraskan item secara vertikal */
  }

  .checkmark{
    height: 20px;
    width: 20px;
  }
  
}

@media (max-width: 1000px){
  #search{
    font-size: 11px;
  }
}




/* Jika ukuran layar kecil, sesuaikan ukuran sidebar */
  @media (max-width: 880px) {
    #sidebar {
      width: 45%; /* Sidebar memenuhi lebar layar */
      transform: translateX(-100%); /* Tersembunyi default */
    }
  
    #sidebar.open {
      transform: translateX(0); /* Muncul jika dibuka */
    width: 45%;
    }
  
    /* Map memenuhi layar jika sidebar terbuka */
    #map {
      width: 100%;
    }
  
    body{
      font-size: 14px;
    }
    .btn .form-control {
      font-size: 10px;
    }
  
    #search{
      font-size: 15px;
    }
  
    .ket-gedung {
      font-size: 16px;
    }
  
    .container-checkbox{
      font-size: 16px;
      line-height: 20px; /* Tinggi baris agar sejajar dengan checkmark */
      align-items: center; /* Selaraskan item secara vertikal */
    }
  
    .checkmark{
      height: 20px;
      width: 20px;
    }
    

}

@media (max-width: 520px) {
  #sidebar.open {
    width: 70%;
    /* Sidebar akan mengambil 70% layar di perangkat kecil */
  }
  .card {
    margin: 10px;
  }

  .d-flex.flex-row {
    gap: 5px;
  }

  .list-group-item {
    font-size: 0.9rem; /* Mengecilkan teks */
    padding: 8px 10px;
  }

  img {
    max-width: 90%; /* Kurangi lebar gambar pada layar kecil */
  }

  #gedung-info {
    width: 80%;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    overflow-y: auto;
    z-index: 1000;
    padding: 20px;
    display: none;
    transition: transform 0.3s ease;
  }

}

/* Button untuk toggle sidebar */
.toggle-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1000;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 20px;
  border-radius: 10%;
  transition: transform 0.3s ease;
}

.toggle-btn:hover {
  transform: scale(1.2);
}

.toggle-btn:active {
  transform: scale(0.9);
}

.toggle-btn.open {
  transform: rotate(180deg);
  /* Efek rotasi tombol saat dibuka */
}

/* Agar peta tetap terlihat di layar penuh */
.leaflet-container {
  cursor: arrow;
}

/* Menyembunyikan tombol ketika sidebar terbuka */
#sidebar.open~#toggle-btn {
  opacity: 0;
  pointer-events: none;
  /* Menghindari interaksi saat tombol tidak terlihat */
  transition: opacity 0.3s ease;
}

@media (max-width: 482px) {
  /* #sidebar{
    display: none;
  }

  #sidebar.open{
    display: none;
  }

  .toggle-btn{
    display: none;
  } */

  #search-area{
    display: none;
  }
  .ket-gedung{
    margin-top: 15px;
  }

  .toggle-btn{
    top: 70px;
  }
}

@media (max-width: 456px) {
  #search-container{
    left: 22%;
    transform: translateX(-27%);

  }
  .search-name {
    padding: 8px;
    font-size: 16px;
    width: 250px;
  }

  #search-button {
    padding: 8px 16px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
}

@media (max-width: 408px){
  #search-container{
    left: 24%;
  }
}

@media (max-width: 400px){
  #search-container{
    left: 24%;
  }

  .search-name {
    padding: 6px;
    font-size: 14px !important;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 200px;
  }

  #search-button {
    padding: 6px 14px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
  }
}

@media (max-width: 345px){
  #search-container{
    left: 21%;
  }
  .search-name {
    padding: 6px;
    font-size: 11px !important;
    border-radius: 5px;
    border: 1px solid #ccc;
    width: 180px;
  }

  #search-button {
    padding: 5px 13px;
    font-size: 13px;
    border-radius: 5px;
    cursor: pointer;
  }
}

@media (max-width: 345px){
  #search-container{
    left: 22%;
  }
}