/* Page layout refinements that must win over older legacy rules. */

/* The document owns vertical scrolling. Each attribute-table host is the
 * horizontal viewport, while its grid remains the wide content inside it. */
.attr-dock__body,
.attr-tabpanel {
  min-width: 0;
  max-width: 100%;
}

.attrtable {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto !important;
  overflow-y: visible !important;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  touch-action: pan-x pan-y;
}

.attrtable-grid {
  width: max-content !important;
  min-width: 100%;
  max-height: none !important;
  overflow: visible !important;
}

/* Layers is a menu trigger, not a selected mode. Its closed, open and focused
 * states use the same shell as the neighbouring Basemap and Apps buttons. */
.map-toolbar #mapLayerListBtn,
.map-toolbar #mapLayerListBtn.is-active,
.map-toolbar #mapLayerListBtn[aria-expanded="true"],
.map-toolbar #mapLayerListBtn:focus,
.map-toolbar #mapLayerListBtn:focus-visible {
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.14) !important;
  box-shadow: none !important;
  outline: none !important;
}

.map-toolbar #mapLayerListBtn:hover,
.map-toolbar #mapLayerListBtn.is-active:hover,
.map-toolbar #mapLayerListBtn[aria-expanded="true"]:hover {
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(255,255,255,.18) !important;
  box-shadow: none !important;
}

@media (max-width: 700px) {
  header {
    padding: 14px 12px 8px !important;
  }

  header img {
    width: min(176px, 47vw) !important;
  }

  header .tagline {
    margin-top: 4px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
  }

  .social-links.top-right {
    top: 12px !important;
    right: 12px !important;
    gap: 8px !important;
  }

  .social-links.top-right a,
  .social-links.top-right a img {
    width: 22px !important;
    height: 22px !important;
  }

  .tg-zen-quote {
    padding: 7px 10px !important;
    gap: 4px 7px !important;
  }

  .tg-zen-quote__text {
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  .tg-zen-quote__controls {
    margin-top: 1px !important;
  }

  #map {
    width: calc(100vw - 20px) !important;
    height: 62vh !important;
    margin-top: 0 !important;
    border-radius: 6px !important;
  }
}
