/* Additions to the old theme's CSS (main.css stays unchanged). */

/* Keep the footer at the bottom on pages shorter than the viewport. The header is
   position: fixed, so only the content wrapper and the footer are in the flow.
   The contact page is left out: it sizes its own map and puts a top margin on body,
   which min-height would add to. */
body:not(.template-kontakt) {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.wrap {
  flex: 1 0 auto;
}

/* 404: place the message a third of the way down the space between header and
   footer. The spacers' flex ratio sets the position (1:1 would centre it). */
.error404 .wrap {
  display: flex;
  flex-direction: column;
}

.error404 .wrap::before,
.error404 .wrap::after {
  content: '';
}

.error404 .wrap::before {
  flex: 1;
}

.error404 .wrap::after {
  flex: 2;
}

/* Fonts (chosen by the owner 2026-11-02, proposal 4 "Varm"): Fraunces for headings,
   Nunito Sans for everything else. Replaces din-2014 from Typekit, which main.css
   sets on a long list of elements; the same list is repeated here so this wins. */
object, iframe, p, blockquote, pre, a, body,
input, button, select, textarea {
  font-family: 'Nunito Sans Variable', Arial, sans-serif;
}

/* main.css gives headings weights from 400 to 700 in class-scoped rules
   (.booking h2, .page-content h1 …); Fraunces is meant to be light, so the
   weight is forced for every heading. Case and sizes are left as they were. */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Fraunces Variable', Georgia, serif;
  font-weight: 300 !important;
  letter-spacing: -0.01em;
}

/* Contact map as a static image (fjosakademiet-website#6). main.css sizes
   .acf-map; the image is shown at its natural scale, never scaled, and cropped
   around the pin. --pin-x is where the pin sits: in the middle, as the old
   map's marker did, except on medium screens, where the contact box (its left
   edge is at 100% - 485px) would cover it; there the pin moves left to stay
   clear of the box. */
.template-kontakt .static-map {
  --pin-x: 50%;
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
}

@media (min-width: 768px) {
  .template-kontakt .static-map {
    --pin-x: min(50%, calc(100% - 560px));
  }
}

/* The image's centre is the pin; its size is contact-map.json's width/height. */
.static-map__image {
  position: absolute;
  left: calc(var(--pin-x) - 1800px);
  top: calc(50% - 900px);
  width: 3600px;
  height: 1800px;
  max-width: none;
}

/* Anchored by the tip of the pin, like a Google Maps marker. */
.static-map__pin {
  position: absolute;
  left: var(--pin-x);
  top: 50%;
  transform: translate(-50%, -100%);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  line-height: 0;
}

.static-map__pin > img {
  display: block;
}

.static-map__pin:focus-visible {
  outline: 2px solid #003a4c;
  outline-offset: 4px;
  border-radius: 4px;
}

/* The old InfoBubble: shown on hover above the pin, with a small arrow. */
.static-map__bubble {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 15px);
  transform: translateX(-50%);
  min-width: 250px;
  max-width: 400px;
  border-radius: 15px;
  background: #e0f2f2;
  white-space: nowrap;
  font-weight: 400;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.static-map__bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -15px;
  border: 15px solid transparent;
  border-bottom: 0;
  border-top-color: #e0f2f2;
}

.static-map__pin:hover .static-map__bubble,
.static-map__pin:focus-visible .static-map__bubble {
  opacity: 1;
  visibility: visible;
}

/* Where the Google logo sat. */
.static-map__actions {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.static-map__link {
  padding: 4px 12px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  line-height: inherit;
  border-radius: 19px;
  background: #ffffff;
  color: #003a4c;
  font-size: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.static-map__link:hover,
.static-map__link:focus-visible {
  background: #003a4c;
  color: #ffffff;
}

.static-map__credit {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 1px 6px;
  background: rgba(255, 255, 255, 0.7);
  color: #616161;
  font-size: 11px;
}

/* On phones the two buttons fill the bottom edge, so the credit goes on top. */
@media (max-width: 575.98px) {
  .static-map__credit {
    top: 0;
    bottom: auto;
  }
}

.static-map__credit a {
  text-decoration: underline;
}

/* "Åpne i Google Maps" in the directions modal: the theme's .btn, smaller so it
   fits the modal on phones. */
.template-kontakt #mapModal .btn {
  max-width: 100%;
  padding: 4px 28px;
  font-size: 20px;
}

@media (max-width: 767.98px) {
  .template-kontakt #mapModal .btn {
    padding: 4px 18px;
    font-size: 17px;
  }
}
