/* Map preview inside the photo details card and beside a turned-over print, plus the
   local-only Apple Maps token form. */

/* Bleeds to the card's edges: the negative margins and radius match the 16px padding
   and 20px radius of .photo-details in photo-interactions.css. */
.photo-map {
  position: relative;
  height: 210px;
  margin: -16px -16px 15px;
  overflow: hidden;
  background: #293941;
  border-radius: 19px 19px 0 0;
  color: #f4f2e7;
}
.photo-map .map-status {
  padding: 28px;
  line-height: 1.5;
  font-size: 13px;
}
.photo-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #eee;
}

/* Beside a turned-over print the map is a print of its own. photo-interactions.js places
   and sizes it; it arrives as the print finishes turning. */
.print-map {
  position: absolute;
  z-index: 40;
  box-sizing: border-box;
  padding: 6px;
  background: #fffdf7;
  border: 1px solid #e4ded4;
  box-shadow: 0 14px 34px #32282a3d;
  animation: print-map-reveal 420ms 280ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes print-map-reveal {
  from {
    opacity: 0;
    scale: 0.94;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}
.print-map .photo-map {
  height: 100%;
  margin: 0;
  border-radius: 0;
}
.print-map .map-status {
  padding: 46px 20px 20px;
}
/* Top right, clear of the map provider's logo and legal links along the bottom. */
.print-map-open {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 9px;
  background: #fffdf7;
  border-radius: 999px;
  box-shadow: 0 1px 4px #32282a40;
  color: #a50324;
  font:
    11px/1.5 Arial,
    Helvetica,
    sans-serif;
  text-decoration: none;
}
.print-map-open:hover,
.print-map-open:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .print-map {
    animation: none;
  }
}

/* Map setup */

.map-setup {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid #dcd3c8;
  border-radius: 10px;
  font-size: 13px;
}
.map-setup[hidden] {
  display: none;
}
.map-setup summary {
  cursor: pointer;
}
.map-setup form {
  margin-top: 14px;
}
.map-setup input {
  display: block;
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  font: inherit;
  border: 1px solid #b7a9a4;
  border-radius: 6px;
}
.map-setup button {
  padding: 9px 14px;
  background: #d2042d;
  color: white;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}
.map-setup a {
  color: #a50324;
}
.map-setup #clear-map-token {
  background: transparent;
  color: #a50324;
}
.map-setup p {
  margin: 8px 0;
}
