.map-thumbnail {
  background: none;
  border: 1px solid var(--lightgrey);
  border-radius: 4px;
  display: block;
  margin-top: 1.5rem;
  padding: 0.5rem;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}

.map-thumbnail:hover,
.map-thumbnail:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  outline: none;
}

.map-thumbnail__caption {
  color: var(--darkgrey);
  display: block;
  font-size: 1.8rem;
  font-weight: 600;
}

.map-thumbnail__caption::after {
  content: ' \2192';
}

.map-thumbnail__image {
  display: block;
  margin: 0.75rem auto 0;
  max-height: 200px;
  opacity: 0.85;
}

.map-thumbnail:hover .map-thumbnail__image,
.map-thumbnail:focus-visible .map-thumbnail__image {
  opacity: 1;
}

.map-dialog {
  background: transparent;
  inset: 0;
  margin: auto;
  max-height: 95vh;
  max-width: 95vw;
  position: fixed;
}

.map-dialog::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.map-dialog__image {
  display: block;
  max-height: 95vh;
  max-width: 95vw;
}

.map-dialog__close {
  align-items: center;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  color: var(--darkgrey);
  display: flex;
  height: 3rem;
  justify-content: center;
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  width: 3rem;
}

.map-dialog__close-icon {
  height: 1.5rem;
  width: 1.5rem;
}

.map-dialog__close:hover,
.map-dialog__close:focus-visible {
  background: var(--whitegrey);
  outline: none;
}

/* Two-column "Hitta hit" layout: Google map + Aspö detail map side by side,
   each with its own descriptive text directly below. Overrides the default
   .main-card__content 3+3 grid so we get an even 1:1 split. */
.main-card__content--two-maps {
  text-align: left;
}

.map-column {
  display: flex;
  flex-direction: column;
}

.map-column__media {
  width: 100%;
}

.map-column__media--iframe {
  aspect-ratio: 4 / 3;
}

.map-column__media--iframe iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.map-column__text p:first-child {
  margin-top: 0;
}

/* Applied to whichever element (text or media) is stacked below a
   sibling inside a .map-column, to create the gap between them. */
.map-column__text--stacked,
.map-column__media--stacked {
  margin-top: 1.5rem;
}

/* In the two-column layout the Aspö thumbnail acts as the column's
   primary visual, so let the image fill the column width instead of
   being capped at 200px high. */
.map-column .map-thumbnail__image {
  margin-top: 0.75rem;
  max-height: none;
  width: 100%;
}

@media (min-width: 795px) {
  .main-card__content--two-maps {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 'left right';
  }

  .main-card__content--two-maps .map-column:first-child {
    grid-area: left;
  }

  .main-card__content--two-maps .map-column:last-child {
    grid-area: right;
  }
}
