/* 2026: what acroskilltree.com/2019 adds to the original AST2020_Style.css: the map's zoom (map-zoom.js) and room for
   the boxes on phone screens. Everything else looks as it did. */

/* the map: scaled as one piece; dragging it moves it, so its words are not selected */
#mapLayer {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}
#mapSize {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  pointer-events: none;
}
.mapGrabbing, .mapGrabbing * {
  cursor: grabbing !important;
}

/* the zoom buttons, in the colours of the original; the pose box (z-index 50) and the menus cover them */
.mapZoom {
  position: fixed;
  right: 16px;
  bottom: 78px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mapZoom button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 4px;
  background-color: #493843;
  color: #ece6e6;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px #331e36;
}
.mapZoom button:hover {
  background-color: #5b4653;
}
.mapZoom button:active {
  transform: translateY(2px);
  box-shadow: 0 2px #331e36;
}
.mapZoom button:disabled {
  opacity: 0.45;
  cursor: default;
}
.mapZoom button:focus-visible {
  outline: 2px solid #ca895f;
  outline-offset: 2px;
}

/* narrow screens: the original's menu (a full-screen list behind the three-line button) and its lists (Trees, Options,
   Profile) open and close with a tap (map-zoom.js) instead of on hover, which never ends on a touch screen */
@media screen and (max-width: 768px) {
  .menu:hover > ol {
    display: none;
  }
  .menu:hover:after {
    -webkit-box-shadow: 0 10px #ece6e6, 0 -10px #ece6e6;
            box-shadow: 0 10px #ece6e6, 0 -10px #ece6e6;
  }
  .menuOpen .menu > ol {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
  }
  .menuOpen .menu:after {
    -webkit-box-shadow: none;
            box-shadow: none;
  }
  .menu-item:hover > .sub-menu {
    display: none;
  }
  .menuOpen .menu-item.subOpen > .sub-menu {
    display: block;
  }
}

/* phone screens: the tutorial and the option windows fit the width */
@media screen and (max-width: 600px) {
  .tutorialDiv {
    width: auto;
    height: auto;
    left: 8px !important;
    right: 8px;
    padding: 70px 0 56px;
  }
  .tutorialDiv--1, .tutorialDiv--7 {
    -webkit-transform: translateY(-50%);
            transform: translateY(-50%);
  }
  .tutorialDiv__title {
    height: 56px;
    font-size: 22px;
  }
  .tutorialDiv__text {
    position: static;
    width: auto;
    margin: 0 5%;
    font-size: 16px;
  }
  .tutorialDiv__buttonNext {
    bottom: 16px;
  }
  .optionsPopup {
    width: calc(100vw - 16px);
    max-width: 400px;
  }
  .mapZoom {
    right: 10px;
    bottom: 72px;
  }
  /* the footer's links wrap instead of running into the copyright line */
  .footer__content {
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;
  }
  .footer__content a {
    padding: 0 7px;
    font-size: 12px;
  }
  .footer__content p {
    position: static;
    width: 100%;
    height: auto;
    padding: 2px 0 0;
    font-size: 11px;
  }
}
