html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hides anything outside the viewport */
}

#map {
    width: 100%;
    height: 100vh;
    position: fixed; /* Ensure map stays full-screen */
    top: 0;
    left: 0;
    z-index: 1;
}

.label {
  width:auto;
  height:auto;
  position: fixed;
  pointer-events: none;
  z-index:10;
  user-select: none; /* Standard */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
    color: rgba(255, 255, 255, 0.8);
    background-color: rgba(0, 0, 0, 0.3);
    text-align:center;
    font-family: "Lucida Console", "Courier New", monospace;
    white-space: normal;     /* allow line breaks */
    word-wrap: break-word;   /* break long words if needed */
    overflow-wrap: break-word; /* modern equivalent */
}


.label .triangle {
 display: block;
 height: 0px;
 width: 0px;
 border: 10px solid transparent;
 border-top-color: rgba(0, 0, 0, 0.3);
 position: absolute;
 bottom: -20px;
 left: calc(50% - 10px);
}

.text-label{
  display: none;
}

.icon-container {
  width:auto;
  height:auto;
  position: fixed;
  pointer-events: none;
  z-index:10;
  user-select: none; /* Standard */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
    text-align:center;
    font-family: "Lucida Console", "Courier New", monospace;
    white-space: normal;     /* allow line breaks */
    word-wrap: break-word;   /* break long words if needed */
    overflow-wrap: break-word; /* modern equivalent */
}

.icon {
  width: 30px;
  height: 35px;
  opacity: 0.8;
  pointer-events: none; /* allow click */
  user-select: none;
  touch-action: none;
  z-index:10;
  user-select: none; /* Standard */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
    color: rgba(255, 255, 255, 0.7);
    text-align:center;
    white-space: normal;     /* allow line breaks */
    word-wrap: break-word;   /* break long words if needed */
    overflow-wrap: break-word; /* modern equivalent */
}

.video {
  width:100%;
  height:600px;
  /*position:absolute;*/
  /*left:-320px;*/
  /*top:-240px;*/
  display:none;
  /*pointer-events: auto;*/
  border:none;
  background-color:gray;
  /*z-index:100;*/
  /*opacity:0.95;*/
}

.viewer {
  width:100%;
  height:600px;
  /*position:absolute;*/
  /*left:-320px;*/
  /*top:-240px;*/
  display:none;
  /*pointer-events: auto;*/
  border:none;
  /*z-index:100;*/
  /*opacity:0.95;*/
}

.deskripsi {
  width:100%;
  height:100%;
  /*position:absolute;*/
  /*left:-320px;*/
  /*top:-240px;*/
  /*pointer-events: none;*/
  border:none;
  background-color:white;
  /*z-index:100;*/
  /*opacity:0.95;*/
}

.control-container{
    position: absolute;
    bottom: 196px;
    left: 5px; /* This might need to be tweaked */
    z-index: 1000;
}


.control.tilt {
  top: 100px;
}

.control.rotation {
  top: 145px;
}

.control.zoom {
  top: 190px;
}


.control.zoom button{
  font-weight: normal;
}

.control button {
  width: 30px;
  height: 30px;
  margin: 15px 0 0 15px;
  border: 1px solid #999999;
  background: #ffffff;
  opacity: 0.6;
  border-radius: 5px;
  box-shadow: 0 0 5px #666666;
  font-weight: bold;
  text-align: center;
}

.control .reset{
    width: 80px !important;
}

.control button:hover {
  opacity: 1;
  cursor: pointer;
}

.card {
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  max-width: 300px;
  margin: auto;
  text-align: center;
}

.search-container {
  position: absolute;
  z-index: 1000;
  width: 250px;
  top:30px;
  right:10px;
}

input[type="text"] {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 4px 4px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
}

.suggestions div {
  padding: 10px;
  cursor: pointer;
}

.suggestions div:hover {
  background-color: #f0f0f0;
}

.logo-container {
  position: fixed;
  z-index: 1000;
  width: 80px;
  top:15px;
  left:30px;
}

.compass {
    position: absolute;
    bottom: 20px;
    right: 10px;
    width: 64px;
    height: 64px;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:6px;
    user-select:none;
    }
    .compass svg { width:100%; height:100%; transform-origin:50% 50%; }
    .compass .needle { transition: transform 200ms ease-out; transform-origin:50% 50%; }
    .compass .north-label { font-size:10px; text-anchor:middle; fill:#222; }
    
#myLocationBtn {
  position:absolute;
  bottom:20px;
  left:20px;
  z-index:1001;
  background:white;
  border:1px solid #ccc;
  border-radius:8px;
  padding:8px 12px;
  cursor:pointer;
  box-shadow:0 2px 5px rgba(0,0,0,0.3);
  font-family:sans-serif;
}
#myLocationBtn:hover {
  background:#f0f0f0;
}

.btn {
  bottom: 20px;
  color: white; border: none; border-radius: 6px;
  padding: 7px 14px; font-size: 15px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index:2000;
}

.edit-btn {
  position: absolute; bottom: 20px; left: 70px; z-index: 10;
  background: #0078d7; color: white; border: none; border-radius: 6px;
  padding: 7px 14px; font-size: 15px; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  z-index:2000;
}
.edit-btn:hover { background: #005fa3; }

.edit-btn-in {
  background: #0078d7; color: white; border: none; border-radius: 6px;
}
.edit-btn-in:hover { background: #005fa3; }

#editor {
  position: absolute; top: 0; right: -320px; width: 280px; height: 100%;
  background: #f8f8f8; border-left: 1px solid #ccc;
  box-shadow: -3px 0 6px rgba(0,0,0,0.3);
  transition: right 0.3s ease; padding: 15px; overflow-y: auto;
  z-index: 1001;display: none;
  opacity: 0.85;
}
#editor.visible { right: 0; }
label { display: block; margin-top: 10px; font-weight: bold; }
input, select, textarea {
  width: 100%; box-sizing: border-box; padding: 6px; margin-top: 4px;
}
#saveBtn, #discardBtn,#printBtn, #orderBtn {
  margin-top: 15px; width: 100%; padding: 8px; border: none; border-radius: 6px;
  font-weight: bold; cursor: pointer;
}
#saveBtn { background: #28a745; color: white; }
#saveBtn:hover { background: #1e7e34; }
#discardBtn { background: #dc3545; color: white; }
#discardBtn:hover { background: #b02a37; }
#printBtn { background: blue; color: white; }
#printBtn:hover { background: #1e7e34; }
#orderBtn { background: orange; color: white; }
#orderBtn:hover { background: #b02a37; }


.floating-switch-box {
    position: fixed;
    bottom: 68px;
    left: 18px;
    background: #fff;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    opacity:0.8;
}

/*.floating-switch-box:hover {*/
/*    transform: translateY(-2px);*/
/*    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);*/
/*}*/

.floating-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.floating-switch input {
    display: none;
}

.slider {
    position: relative;
    width: 50px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background: #3498db;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.label-text {
    font-size: 10px;
    color: #333;
    font-weight: bold;
}

#loadingOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
  }

  /* Prevent scrolling */
  body.loading {
    overflow: hidden;
  }

  /* 🎚️ Custom loading bar container */
  .loading-bar {
    width: 70%;
    max-width: 500px;
    height: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
  }

  /* ⚡ Animated gradient bar */
  .loading-bar::before {
    content: "";
    position: absolute;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, #00bfff, #33ff77, #00bfff);
    animation: loading-slide 1.2s infinite ease-in-out;
  }

  @keyframes loading-slide {
    0% { left: -40%; }
    50% { left: 100%; }
    100% { left: -40%; }
  }

  /* Optional text below the bar */
  .loading-text {
    color: white;
    font-family: Arial, sans-serif;
    font-size: 1.1rem;
    margin-top: 20px;
    text-align: center;
    letter-spacing: 1px;
  }