/* Lane g-docs: the brochure's map pages and their images, parcel links, and Copy buttons on a listing page. */

/* The brochure's map pages, under its row in Documents and lined up with its name: a short label, then one link per
   map, each opening the PDF at its page. */
body .gl-g-pagebox { display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; margin: 2px 0 0 56px; }
body .gl-g-pages-head { margin: 0; font-size: 14px; line-height: 1.4; color: var(--gl-muted); }
body .gl-g-pages { display: flex; flex-wrap: wrap; gap: 0 20px; margin: 0; padding: 0; list-style: none; }
body .gl-g-pages li { margin: 0; padding: 0; }
body .gl-g-page {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--gl-navy);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap;
}
@media (hover: hover) { body .gl-g-page:hover { color: var(--gl-navy-hover); text-decoration-thickness: 2px; } }
/* Phones and tablets can't open a PDF at a page, so they get the map pages as a sentence instead. g-docs.js does the
   same where the browser has no PDF viewer. */
body .gl-docs .gl-g-pages-text { display: none; margin: 4px 0 0; color: var(--gl-ink); font-size: 15px; line-height: 1.5; }
@media (pointer: coarse) {
  body .gl-docs :is(.gl-g-pages, .gl-g-pages-head) { display: none; }
  body .gl-docs .gl-g-pages-text { display: block; }
}
body .gl-docs.gl-g-no-pages :is(.gl-g-pages, .gl-g-pages-head) { display: none; }
body .gl-docs.gl-g-no-pages .gl-g-pages-text { display: block; }

/* Parcel numbers. In the list under the legal description, each link is a wash chip 44 px tall, with an icon that
   says it opens another site. A number linked inside a line that staff typed stays in the line, with the same height
   of tap area. */
body .gl-g-parcel {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  vertical-align: middle;
  color: var(--gl-navy);
  font-variant-numeric: tabular-nums lining-nums;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap;
}
body .gl-g-parcel .gl-i { width: 16px; height: 16px; }
@media (hover: hover) { body .gl-g-parcel:hover { color: var(--gl-navy-hover); } }
body .gl-parcel-list .gl-g-parcel {
  gap: 8px;
  padding: 0 12px;
  border-radius: var(--gl-radius);
  background: var(--gl-wash);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color var(--gl-fast);
}
@media (hover: hover) {
  body .gl-parcel-list .gl-g-parcel:hover { background: #e7eaf1; }
  body .gl-parcel-list .gl-g-parcel:hover > span:first-child { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
}
/* On a phone the chips share rows of equal columns: two to a row from 360 px, with the number at 14 px and a smaller
   icon. */
@media (max-width: 699px) {
  body .gl-parcel-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
  body .gl-parcel-list .gl-g-parcel { display: flex; justify-content: space-between; gap: 4px; padding: 0 8px; font-size: 14px; }
  body .gl-parcel-list .gl-g-parcel .gl-i { width: 12px; height: 12px; }
}

/* Copy buttons: small text buttons with an icon. "Copied" takes the label's place in the same cell, so the button
   doesn't change width. d-listings.php prints them hidden, and g-docs.js shows them. */
body .gl-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: var(--gl-radius);
  background: none;
  box-shadow: none;
  color: var(--gl-navy);
  font-family: var(--gl-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--gl-fast);
}
body .gl-copy[hidden] { display: none; }
@media (hover: hover) { body .gl-copy:hover { background: rgba(24, 42, 97, .07); } }
body .gl-copy .gl-i { width: 18px; height: 18px; }
body .gl-copy-words { display: inline-grid; }
body .gl-copy-words > span { grid-area: 1 / 1; text-align: left; }
body .gl-copy-done, body .gl-copied .gl-copy-label { visibility: hidden; }
body .gl-copied .gl-copy-done { visibility: visible; }
/* A Copy button under a value that staff typed, in line with the value's first letter. */
body .gl-g-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 2px 0 0 -12px; line-height: 1.4; }
.gl-g-copy-area { position: fixed; top: 0; left: 0; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; }

/* The brochure's maps at the end of Location: one thumbnail per map page with its label under it, four to a row, two
   on a phone. A page shows whole in a thin frame on the wash, as the gallery shows a map, so a landscape page isn't
   cropped. The frame has the shape of a letter page, the shape of nearly every brochure page. */
body .gl-g-maps { margin: 40px 0 0; }
body .gl-lp .gl-g-maps .gl-g-maps-head { margin: 0 0 16px !important; padding: 0 0 10px; border-bottom: 1px solid var(--gl-rule); }
body .gl-g-maps .gl-g-maps-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; margin: 0; padding: 0; list-style: none; }
body .gl-g-maps .gl-g-map { margin: 0; padding: 0; list-style: none; }
body .gl-g-maps .gl-g-map-link { display: flex; flex-direction: column; gap: 8px; color: var(--gl-navy); text-decoration: none; }
body .gl-g-map-frame {
  position: relative;
  display: block;
  aspect-ratio: 17 / 22;
  overflow: hidden;
  border: 1px solid var(--gl-rule);
  border-radius: var(--gl-radius);
  background: var(--gl-wash);
  transition: border-color var(--gl-fast);
}
body .gl-g-map-frame img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; }
/* Until g-docs.js gives a thumbnail its address, the frame shows only the wash, not the alt text. */
body .gl-g-map-frame img:not([src]) { visibility: hidden; }
body .gl-g-map-label {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
@media (hover: hover) {
  body .gl-g-map-link:hover .gl-g-map-frame { border-color: var(--gl-navy); }
  body .gl-g-map-link:hover .gl-g-map-label { text-decoration-thickness: 2px; }
}
body .gl-g-maps .gl-g-map-link:focus-visible { outline: 2px solid var(--gl-navy); outline-offset: 4px; border-radius: var(--gl-radius); }
@media (max-width: 699px) {
  body .gl-g-maps { margin-top: 32px; }
  body .gl-g-maps .gl-g-maps-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
}

/* The map viewer covers the page on the photo viewer's deep navy: Zoom and Close at the top, the map, then its caption,
   the brochure link, and Previous and Next. The page behind it doesn't scroll while it's open. */
html.gl-g-viewing, html.gl-g-viewing body { overflow: hidden; }
body .gl-g-viewer {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overscroll-behavior: contain;
  background: var(--gl-navy-deep);
  color: #fff;
  font-family: var(--gl-sans);
}
body .gl-g-viewer[hidden], body .gl-g-viewer [hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) {
  body .gl-g-viewer { animation: gl-g-fade 160ms cubic-bezier(.23, 1, .32, 1); }
}
@keyframes gl-g-fade { from { opacity: 0; } }
body .gl-g-viewer-top {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left));
}
body .gl-g-viewer-stage { position: relative; overflow: hidden; }
body .gl-g-viewer .gl-g-viewer-img {
  position: absolute;
  top: 0;
  left: 16px;
  width: calc(100% - 32px);
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: contain;
  cursor: zoom-in;
}
/* Zoomed, the map shows at its full size (set by g-docs.js) and the stage scrolls both ways. */
body .gl-g-viewer.gl-g-zoomed .gl-g-viewer-stage { overflow: auto; overscroll-behavior: contain; }
body .gl-g-viewer.gl-g-zoomed .gl-g-viewer-img { position: static; display: block; height: auto; margin: 0 auto; cursor: zoom-out; }
body .gl-g-viewer-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 24px;
  padding: 10px max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
body .gl-g-viewer-text { flex: 1 1 300px; min-width: 0; }
body .gl-g-viewer .gl-g-viewer-cap { margin: 0; color: #fff; font-size: 17px; font-weight: 600; line-height: 1.35; }
body .gl-g-viewer .gl-g-viewer-pdf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
body .gl-g-viewer .gl-g-viewer-size { margin-left: 4px; color: rgba(255, 255, 255, .82); font-weight: 400; white-space: nowrap; }
body .gl-g-viewer-nav { display: flex; align-items: center; gap: 8px; }
body .gl-g-viewer .gl-g-viewer-count {
  min-width: 4.5em;
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums lining-nums;
  text-align: center;
}
body .gl-g-viewer .gl-g-viewer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: var(--gl-radius);
  background: none;
  box-shadow: none;
  color: #fff;
  font-family: var(--gl-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  transition: background-color var(--gl-fast);
}
body .gl-g-viewer .gl-g-viewer-top .gl-g-viewer-btn { border-color: transparent; }
body .gl-g-viewer .gl-i { width: 20px; height: 20px; }
@media (hover: hover) {
  body .gl-g-viewer .gl-g-viewer-btn:hover { background: rgba(255, 255, 255, .12); }
  body .gl-g-viewer .gl-g-viewer-pdf:hover { text-decoration-thickness: 2px; }
}
body .gl-g-viewer :focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
/* On a phone, Previous and Next take their own row at the bottom, in reach of a thumb. */
@media (max-width: 699px) {
  body .gl-g-viewer-nav { flex: 1 1 100%; justify-content: space-between; }
  body .gl-g-viewer .gl-g-viewer-cap { font-size: 16px; }
}
/* Under 360 px, Previous, the count, and Next fit one row with tighter padding. */
@media (max-width: 359px) {
  body .gl-g-viewer-nav { gap: 6px; }
  body .gl-g-viewer .gl-g-viewer-nav .gl-g-viewer-btn { gap: 4px; padding: 0 8px; }
  body .gl-g-viewer .gl-g-viewer-count { min-width: 0; }
}

@media print {
  .gl-g-maps, .gl-g-viewer { display: none !important; }
  .gl-g-tools, .gl-copy, .gl-g-pagebox { display: none !important; }
  body .gl-g-parcel { min-height: 0; line-height: inherit; color: inherit; text-decoration: none; }
}
