/* ============================================================
   FOOTER – kun innhold/layout inni footer (posisjon styres i layout.css)
   ============================================================ */

.app-footer{
  /* Solid paint layer: PlaceCard may extend underneath, but must not show through. */
  background-color: #000;
  background-image: none;
  border-top: 1px solid rgba(255,255,255,.06);

  /* litt mer “app”-følelse + safe-area */
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom, 0px));

  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* MINI placecard – ligger på SAMME linje som knappene */
.pc-mini{
  display: none;            /* vises når collapsed (JS styrer) */
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;

  background: rgba(0,0,0,.55);
  border: 1px solid rgba(255,255,255,.10);

  flex: 0 0 auto;
}

.pc-mini img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Action-raden tar resten av linja og sentrerer knappene */
.app-actions{
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* Standard knappehøyder i footer */
.app-actions button,
.app-actions .pc-action{
  height: 52px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  background: rgba(255,255,255,0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.app-actions .pc-action-text{
  padding: 0 18px;
  background: rgba(255,255,255,0.10);
}

.app-actions .pc-action-primary{
  padding: 0 18px;
  background: #147efb;
}

.app-actions #pcQuiz{
  min-width: 86px;
  height: 48px;
  padding: 0 15px;
  border-color: rgba(139, 92, 28, .38);
  background: #f7e2a3;
  color: #2f2415;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.45);
}

.app-actions #pcQuiz:hover,
.app-actions #pcQuiz:focus-visible{
  background: #efcf78;
  border-color: rgba(139, 92, 28, .55);
}

.app-actions #pcQuiz:focus-visible{
  outline: 2px solid #fff1b8;
  outline-offset: 3px;
}

.app-actions #pcQuiz:active{
  background: #e2bb5f;
}

.app-actions #pcVisit{
  min-width: 116px;
  height: 48px;
  padding: 0 15px;
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.13);
  color: #fff;
  font-size: 13px;
}

.app-actions #pcVisit:disabled{
  opacity: .72;
}

/* Ikonknapper */
#pcRoute::before           { content:"🗺️"; font-size:22px; }
#pcObserve::before         { content:"👁️"; font-size:22px; }
#pcNote::before            { content:"📝"; font-size:22px; }

#pcRoute,
#pcObserve,
#pcNote{
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  padding: 0;
  font-size: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}


/* Liten rute-meny for footerens ruteikon */
.pc-route-menu{
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  min-width: 132px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(0,0,0,.94);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 30px rgba(0,0,0,.42);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pc-route-menu::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%) rotate(45deg);
  background: rgba(0,0,0,.94);
  border-right: 1px solid rgba(255,255,255,.18);
  border-bottom: 1px solid rgba(255,255,255,.18);
}

.pc-route-menu button{
  width: 100%;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.pc-route-menu button:hover,
.pc-route-menu button:focus-visible{
  background: rgba(255,255,255,.22);
  outline: none;
}

/* Skjul bare gammel global NextUp-linje, ikke det nye footer-panelet. */
.app-nextup:not(.footer-nextup-panel){
  display: none;
}

body.hg-app.hg-phone .app-footer{
  gap: 6px;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
}

body.hg-app.hg-phone .app-actions{
  justify-content: flex-start;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

body.hg-app.hg-phone .app-actions::-webkit-scrollbar{
  display: none;
}

body.hg-app.hg-phone .app-actions button{
  height: 48px;
  padding: 0 13px;
  font-size: 14px;
  flex: 0 0 auto;
}

body.hg-app.hg-phone .app-actions #pcQuiz{
  min-width: 82px;
  height: 44px;
  padding: 0 14px;
  font-size: 13px;
}

body.hg-app.hg-phone .app-actions #pcVisit{
  min-width: 108px;
  height: 44px;
  padding: 0 12px;
  font-size: 12px;
}

body.hg-app.hg-phone #pcRoute,
body.hg-app.hg-phone #pcObserve,
body.hg-app.hg-phone #pcNote{
  /* flex-basis må også ned: basisregelen setter flex: 0 0 56px,
     og flex-basis vinner ellers over width. */
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}
