/*
 * FreeRoam layout
 *
 * Keeps the map full-screen and the original single compass control clear on mobile and desktop.
 */

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #d8dfcd;
}

body,
button {
  font-family: Arial, Helvetica, sans-serif;
}

.app_shell {
  position: fixed;
  inset: 0;
  background: #d8dfcd;
}

.map_canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.map_canvas:active {
  cursor: grabbing;
}

.map_canvas:focus-visible,
.compass_button:focus-visible,
.map_attribution:focus-visible {
  outline: 3px solid #165dff;
  outline-offset: 3px;
}

.menu {
  position: absolute;
  bottom: max(32px, calc(env(safe-area-inset-bottom) + 16px));
  left: 50%;
  min-width: 220px;
  padding: 13px 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(32, 32, 32, 0.52);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  color: white;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.distance {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.compass_button {
  min-height: 42px;
  margin-top: 9px;
  padding: 0 17px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #161616;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
}

.compass_button:active {
  transform: translateY(1px);
}

.map_attribution {
  position: absolute;
  right: 5px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.76);
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.62rem;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 480px) {
  .menu {
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
    width: min(290px, calc(100% - 28px));
  }
}

@media (display-mode: standalone) {
  html,
  body,
  .app_shell {
    height: 100vh;
  }
}
