/* De gids (guide.html): wat hij anders doet dan de serverpagina. Alles hangt aan body.guide,
   zodat style.css voor beide pagina's hetzelfde blijft.
   De pagina is de kaart: een korte kop, het zoekvak, en daaronder de kaart over de hele breedte. De
   knoppen en alle panelen (kaartlagen, het kaartje van het zoekvak, een gebied, de todo-lijsten, het
   live dashboard) liggen in het kader van de kaart: zo zijn ze er ook op volledig scherm. */

.guide { --wrap: 1400px; }

/* de balk heeft hier geen status: de naam duwt de rest naar rechts */
.guide .topbar-inner { gap: 12px; }
.guide .topbar-name { margin-right: auto; }

/* ---------- Kop ---------- */

.guide .hero { padding: clamp(28px, 5vw, 56px) 0 clamp(20px, 3vw, 30px); }
.guide .hero-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.guide .server-name { font-size: clamp(32px, 5.4vw, 60px); }
.guide-lead { max-width: 60ch; margin: 4px 0 0; font-size: clamp(16px, 1.8vw, 18px); line-height: 1.45; color: var(--mist); text-wrap: balance; }

/* ---------- Zoekvak: zonder kader, midden boven de kaart ---------- */

/* boven de kaart: de lijst met treffers valt eroverheen */
.guide-search { position: relative; z-index: 20; max-width: 820px; margin: 0 auto clamp(18px, 2.6vw, 26px); }
.guide .search-glass { left: 16px; }
.guide .search-input {
  height: 58px;
  padding: 0 52px 0 50px;
  background: rgba(4, 14, 14, .72);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .5), 0 10px 30px rgba(0, 0, 0, .35);
}
/* het kruisje staat in het vak */
.guide .search-clear { position: absolute; right: 8px; width: 40px; height: 40px; min-height: 40px; color: var(--brass-500); background: none; border: 0; box-shadow: none; }
.guide .search-clear:hover:not(:disabled) { color: var(--brass-200); }
/* de regel eronder duwt de kaart niet omlaag: hij staat in de ruimte tussen het vak en de kaart */
.guide .search-status { position: absolute; left: 2px; right: 2px; top: 100%; min-height: 0; margin: 4px 0 0; font-size: 15px; line-height: 1.3; text-shadow: 0 1px 2px #000; }

/* ---------- De kaart ---------- */

/* Zo hoog dat na een sprong naar het zoekvak (js/layout.js) het vak en de hele kaart in beeld staan. */
.guide .map-frame { height: max(520px, calc(100vh - var(--bar-h) - 100px)); height: max(520px, calc(100dvh - var(--bar-h) - 100px)); padding: 0; }
.guide .map-stage { position: absolute; inset: 6px; }
.guide .map-viewport { height: 100%; background: #0a1e1f; }
.guide .map-placeholder { position: absolute; z-index: 7; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: calc(100% - 36px); text-align: center; }
.guide .map-placeholder button { margin-left: 12px; font-style: normal; }

/* de knoppen liggen over de kaart; alleen de knoppen zelf vangen een klik */
.guide .map-toolbar { position: absolute; z-index: 5; top: 18px; left: 18px; right: 18px; margin: 0; pointer-events: none; }
.guide .map-toolbar > .btn { pointer-events: auto; }
.guide .map-menu { display: inline-flex; }
.guide .map-toolbar .btn[aria-expanded="true"] { color: var(--brass-200); border-color: var(--brass-300); }
.guide .map-todo-count { font: italic 400 14.5px/1 var(--font-body); letter-spacing: 0; color: var(--mist); }

/* Wat over de kaart zweeft, ziet eruit als de lijst met treffers. */
.guide .map-float {
  position: absolute;
  z-index: 6;
  background: rgba(11, 31, 31, .96);
  border: 1px solid var(--brass-500);
  border-radius: 2px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .7);
}

/* de kaartlagen: achter de knop linksboven, met de legenda erin */
.guide .map-layers { display: none; top: 70px; left: 18px; width: min(300px, calc(100% - 36px)); max-height: calc(100% - 88px); margin: 0; padding: 14px 16px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.guide .map-frame.layers-open .map-layers { display: block; }
.guide .map-layers .layers-title { margin-bottom: 10px; font-size: 14px; letter-spacing: .08em; }
.guide .map-layers .layer-group { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.guide .map-layers .layer-name { padding-top: 0; font-size: 14.5px; }
.guide .map-layers .legend { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid rgba(201, 161, 78, .18); font-size: 14.5px; }
.guide .map-layers .legend:empty { display: none; }

/* de naam van het gebied onder de muis: midden onder de knoppen; met een route erop onderaan */
.guide .map-area-name { top: 64px; right: auto; left: 50%; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transform: translate(-50%, -5px); }
.guide .map-area-name.is-on { transform: translateX(-50%); }
.guide .map-frame:has(.route-bar:not([hidden])) .map-area-name { top: auto; bottom: 12px; }

/* de route van een quest: midden onder de knoppen */
.guide .route-bar { z-index: 4; top: 70px; left: 50%; width: min(520px, calc(100% - 36px)); margin: 0; border-color: rgba(99, 245, 201, .38); transform: translateX(-50%); }

/* Linksonder: het paneel van een gebied, of het kaartje van het zoekvak. Op een telefoon legt style.css
   het paneel als een blad over de onderkant. */
@media (min-width: 641px) {
  .guide .area-panel { left: 12px; bottom: 12px; width: min(360px, calc(100% - 24px)); max-height: calc(100% - 76px); }
}

.guide .map-card { z-index: 4; left: 18px; bottom: 18px; width: min(380px, calc(100% - 36px)); max-height: calc(100% - 88px); padding: 14px 18px 16px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
/* zonder kaartje en zonder vastgezette dingen ligt er niets; met een gebied open ook niet */
.guide .map-card:not(:has(> .recipe-card:not([hidden]), > .pins:not([hidden]))) { display: none; }
.guide .map-frame:has(.area-panel:not([hidden])) .map-card { display: none; }
.guide .map-card-bar { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.guide .map-card:not(:has(> .recipe-card:not([hidden]))) .map-card-bar { display: none; }
.guide .map-card-kind { flex: 1 1 auto; min-width: 0; margin: 0; padding-top: 2px; font: 600 11.5px/1.4 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--brass-300); }
.guide .map-card-kind[data-kind="resource"] { color: #9fe08a; }
.guide .map-card-kind[data-kind="quest"] { color: var(--anima-soft); }
.guide .map-card-kind[data-kind="monster"] { color: #f0a58c; }
.guide .map-card-kind[data-kind="boss"], .guide .map-card-kind[data-kind="miniboss"] { color: #ffd27a; }
.guide .map-card-close { display: grid; flex: none; place-items: center; width: 34px; height: 34px; margin: -8px -10px 0 0; color: var(--brass-500); background: none; border: 0; border-radius: 2px; cursor: pointer; }
.guide .map-card-close:hover { color: var(--brass-200); }
.guide .map-card-close .icon { width: 18px; height: 18px; }
/* het kaartje zelf: smaller dan onder het zoekvak van de serverpagina */
.guide .map-card .recipe-card { margin: 0; padding: 0; border: 0; }
.guide .map-card .rc-head { gap: 12px; }
.guide .map-card .rc-icon { width: 48px; height: 48px; }
.guide .map-card .rc-title { font-size: 22px; line-height: 1.2; }
.guide .map-card .rc-sub { font-size: 16px; }
/* Vastzetten: alleen de punaise, zoals op een telefoon; het woord blijft voor schermlezers */
.guide .map-card .rc-pin { width: 40px; padding: 0; }
.guide .map-card .rc-pin-text { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* bij een voorwerp of grondstof: op een eigen server staat welke kist het heeft */
.guide .card-promo { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; font-size: 15.5px; font-style: italic; line-height: 1.35; color: var(--anima-soft); text-decoration: none; border-top: 1px solid rgba(201, 161, 78, .18); }
.guide .card-promo:hover { color: var(--bone); }
.guide .card-promo-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--anima); box-shadow: 0 0 8px rgba(99, 245, 201, .8); }
/* de vastgezette dingen: één rij die opzij schuift, onder het kaartje */
.guide .map-card .pins { margin-top: 0; }
.guide .map-card .recipe-card:not([hidden]) ~ .pins { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(201, 161, 78, .18); }
.guide .map-card .pin-list { display: flex; flex-wrap: nowrap; padding-bottom: 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.guide .map-card .pin { flex: none; max-width: 230px; }

/* de todo-lijsten: rechts over de kaart, achter de knop Todo; de lijsten schuiven in hun eigen vak */
.guide .todo-side { --todo-top: 0px; display: flex; flex-direction: column; top: 70px; right: 18px; bottom: 18px; width: min(340px, calc(100% - 36px)); max-height: none; padding: 16px 14px 12px; }
.guide .todo-lists { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; align-content: start; }
.guide .todo-tomap { display: none; }    /* de kaart ligt er al onder */

/* rechtsonder: het live dashboard */
.guide .map-promo {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  width: min(330px, calc(100% - 36px));
  padding: 16px 18px 18px;
  border: 1px solid transparent;
  border-image: url("assets/frame-brass.svg") 24 / 24px stretch;
  box-shadow: inset 0 0 46px rgba(0, 0, 0, .5), 0 14px 34px rgba(0, 0, 0, .6);
}
.guide .map-promo-close { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; color: var(--brass-500); background: none; border: 0; border-radius: 2px; cursor: pointer; }
.guide .map-promo-close:hover { color: var(--brass-200); }
.guide .map-promo-close .icon { width: 16px; height: 16px; }
.guide .map-promo-q { margin: 0 0 4px; padding-right: 26px; font: 600 12px/1.4 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--anima); }
.guide .map-promo-h { margin: 0 0 14px; font: 700 19px/1.25 var(--font-display); letter-spacing: .03em; color: var(--brass-200); }
.guide .map-promo-cta { min-height: 40px; padding: 9px 16px 8px; font-size: 14px; text-decoration: none; }

/* volledig scherm: het kader vult het venster; op een telefoon zonder rand */
.guide .map-frame.is-full { height: auto; }
@media (max-width: 760px), (max-height: 560px) {
  .guide .map-frame.is-full .map-stage { inset: 0; }
}

/* Smal: het dashboard wijkt voor wat linksonder ligt, en voor de route */
@media (max-width: 800px) {
  .guide .map-frame:has(#search-card:not([hidden]), #search-pins:not([hidden]), .area-panel:not([hidden]), .route-bar:not([hidden])) .map-promo { display: none; }
}

/* Op een telefoon passen de knoppen op één regel met alleen hun teken (hun naam staat in title en aria-label);
   de knop Todo houdt zijn getal. De panelen schuiven mee naar de rand. */
@media (max-width: 560px) {
  .guide .search-input { height: 52px; font-size: 18px; }
  .guide .map-toolbar { top: 12px; left: 12px; right: 12px; gap: 4px; }
  .guide .map-frame:not(.is-full) #map-whole, .guide .map-frame:not(.is-full) #map-areas { width: 40px; padding: 0; }
  .guide .map-frame:not(.is-full) #map-whole span, .guide .map-frame:not(.is-full) #map-areas span, .guide .map-frame:not(.is-full) .map-todo-text { display: none; }
  .guide .map-frame:not(.is-full) #map-todo { gap: 6px; padding-inline: 8px; }
  .guide .map-layers { top: 64px; left: 12px; width: calc(100% - 24px); max-height: calc(100% - 76px); }
  /* het kaartje laat bovenaan een stuk kaart vrij: daar komt te staan wat het op de kaart zet */
  .guide .map-card { left: 12px; bottom: 12px; width: calc(100% - 24px); max-height: min(62%, calc(100% - 76px)); padding: 12px 14px 14px; }
  .guide .todo-side { top: 64px; right: 12px; bottom: 12px; width: calc(100% - 24px); }
  .guide .map-promo { right: 12px; bottom: 12px; width: calc(100% - 24px); }
  .guide .route-bar { top: 64px; width: calc(100% - 24px); }
  .guide .map-area-name { top: 58px; }
}
/* de smalste telefoons: iets smallere knoppen, zodat ze toch op één regel passen */
@media (max-width: 380px) {
  .guide .map-frame:not(.is-full) .map-toolbar .btn-icon, .guide .map-frame:not(.is-full) #map-whole, .guide .map-frame:not(.is-full) #map-areas { width: 36px; }
}

.guide .footer a { color: inherit; text-decoration-color: rgba(134, 160, 152, .5); text-underline-offset: 2px; }
.guide .footer a:hover { color: var(--bone); }
.guide .footer-more { margin-top: 14px; }
