/* Enterprise map layout and controls. */
@import url("./tencent-map-surface.css");

#root .gr-enterprise-map-reference {
  --gr-map-paper: #fbfcfe;
  --gr-map-ink: #192542;
  --gr-map-secondary: #50607a;
  --gr-map-brand: #2458b5;
  --gr-map-border: rgb(25 49 93 / 13%);
  --gr-map-tint: #e9f0ff;
  --gr-map-shadow: 0 3px 14px rgb(31 46 78 / 12%);
  --gr-map-glass: rgb(251 252 254 / 96%);
  --gr-map-side: 14px;
  --gr-map-bottom: env(safe-area-inset-bottom, 0px);
  --gr-map-card-space: 0px;
  position: relative;
  display: grid;
  width: 100%;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  min-height: max(300px, 20rem);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  isolation: isolate;
  overflow: hidden;
  padding: 0;
  background: var(--gr-map-paper);
  color: var(--gr-map-ink);
}

#root .gr-enterprise-map-reference *,
#root .gr-enterprise-map-reference *::before,
#root .gr-enterprise-map-reference *::after {
  box-sizing: border-box;
}

#root .gr-enterprise-map-reference[data-view="map"] {
  --gr-map-card-space: 64px;
  background: #f3f1e9;
}

#root .gr-enterprise-map-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  grid-area: 1 / 1 / -1 / -1;
}

#root .gr-enterprise-map-canvas > :is(.gr-amap-surface, .gr-tencent-map) {
  height: 100%;
}

#root .gr-enterprise-map-canvas :is(.gr-tencent-map-host, .gr-amap-canvas) {
  bottom: var(--gr-map-card-space);
  height: auto;
}

#root .gr-enterprise-map-canvas :is(.gr-amap-controls, .gr-tencent-map-controls) {
  position: absolute;
  z-index: 7;
  inset: auto max(var(--gr-map-side), env(safe-area-inset-right, 0px))
    calc(var(--gr-map-card-space) + 12px) auto;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: end;
}

#root .gr-enterprise-map-canvas .gr-amap-zoom,
#root .gr-enterprise-map-canvas .gr-amap-recenter {
  position: static;
  display: flex;
  min-height: 44px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--gr-map-border);
  border-radius: 999px;
  background: var(--gr-map-glass);
  box-shadow: var(--gr-map-shadow);
  color: var(--gr-map-ink);
}

#root .gr-enterprise-map-canvas .gr-amap-recenter {
  width: 44px;
}

#root .gr-enterprise-map-canvas .gr-amap-zoom button + button {
  border-top: 0;
  border-inline-start: 1px solid var(--gr-map-border);
}

#root .gr-enterprise-map-canvas .gr-featured-credit {
  inset-block-end: calc(var(--gr-map-card-space) + 8px);
}

#root .gr-enterprise-map-canvas .gr-featured-basemap.is-directory-map .gr-featured-map-scale {
  inset-block-end: calc(var(--gr-map-card-space) + 30px);
}

#root .gr-amap-embed,
#root .gr-amap-embed-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

#root .gr-enterprise-map-tools {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 0;
  align-self: start;
  gap: 8px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px)
    max(var(--gr-map-side), env(safe-area-inset-right, 0px)) 8px
    max(var(--gr-map-side), env(safe-area-inset-left, 0px));
  pointer-events: none;
}

#root .gr-enterprise-map-tools > :is(form, button, a) {
  pointer-events: auto;
}

#root .gr-enterprise-map-reference[data-view="map"] .gr-enterprise-map-tools {
  gap: 9px;
  background: linear-gradient(rgb(255 253 248 / 62%), rgb(255 253 248 / 0%));
}

#root .gr-enterprise-map-reference[data-view="map"] .gr-enterprise-map-header {
  grid-template-columns: minmax(44px, 1fr) auto minmax(44px, 1fr);
}

#root .gr-enterprise-map-reference[data-view="map"] .gr-enterprise-map-header > button {
  padding: 0;
  background: transparent;
}

#root .gr-enterprise-map-header {
  position: relative;
  z-index: 2;
  display: grid;
  min-width: 0;
  min-height: 48px;
  grid-template-columns: 44px minmax(0, 1fr) minmax(62px, max-content);
  align-items: center;
  text-align: center;
}

#root .gr-enterprise-map-header h1 {
  margin: 0;
  color: var(--gr-map-ink);
  font-size: 1.125rem;
  font-weight: 740;
  line-height: 1.3;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 5px var(--gr-map-paper), 0 -1px 5px var(--gr-map-paper);
  pointer-events: none;
}

#root .gr-enterprise-map-header > :is(button, a) {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  justify-self: start;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gr-map-ink);
  text-decoration: none;
  cursor: pointer;
  pointer-events: auto;
}

#root .gr-enterprise-map-header > :last-child:is(button, a) {
  justify-self: end;
  min-width: 54px;
  padding-inline: 8px;
  background: var(--gr-map-glass);
  color: var(--gr-map-brand);
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
}

#root .gr-enterprise-map-reference > .gr-enterprise-map-header {
  padding: env(safe-area-inset-top, 0px) var(--gr-map-side) 0;
}

#root .gr-enterprise-map-search {
  display: flex;
  min-width: 0;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding-inline: 11px 4px;
  border: 1px solid var(--gr-map-border);
  border-radius: 12px;
  background: var(--gr-map-glass);
  box-shadow: var(--gr-map-shadow);
  color: var(--gr-map-secondary);
  pointer-events: auto;
}

#root .gr-enterprise-map-search > img {
  flex: none;
}

#root .gr-enterprise-map-search input {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gr-map-ink);
  font-size: 1rem;
}

#root .gr-enterprise-map-search input::placeholder { color: var(--gr-map-secondary); }
#root .gr-enterprise-map-search input::-webkit-search-cancel-button { display: none; }

#root .gr-enterprise-map-search button {
  display: grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  padding: 0 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--gr-map-brand);
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
}

#root .gr-enterprise-map-search button[type="submit"] {
  position: relative;
  padding-inline: 10px;
}

#root .gr-enterprise-map-search button[type="submit"]::before {
  position: absolute;
  inset: 13px auto 13px 0;
  border-inline-start: 1px solid var(--gr-map-border);
  content: "";
}

#root .gr-enterprise-map-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

#root .gr-enterprise-map-circles {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  align-items: center;
  padding: 2px;
  border: 1px solid var(--gr-map-border);
  border-radius: 22px;
  background: var(--gr-map-glass);
  box-shadow: var(--gr-map-shadow);
  pointer-events: auto;
}

#root .gr-enterprise-map-circles button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--gr-map-secondary);
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
}

#root .gr-enterprise-map-circles button[aria-pressed="true"] {
  background: var(--gr-map-brand);
  color: var(--gr-map-paper);
}

#root .gr-enterprise-map-filter {
  display: inline-flex;
  flex: none;
  min-height: 44px;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  border: 1px solid var(--gr-map-border);
  border-radius: 999px;
  background: var(--gr-map-glass);
  box-shadow: var(--gr-map-shadow);
  color: var(--gr-map-brand);
  font-size: 0.8125rem;
  font-weight: 650;
  pointer-events: auto;
}

#root .gr-enterprise-map-selection {
  position: absolute;
  z-index: 3;
  inset: auto max(var(--gr-map-side), env(safe-area-inset-right, 0px))
    calc(var(--gr-map-bottom) + 8px) max(var(--gr-map-side), env(safe-area-inset-left, 0px));
  display: grid;
  min-width: 0;
  min-height: 70px;
  max-height: min(38dvh, 16rem);
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: start;
  padding: 8px 3px 5px 10px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--gr-map-border);
  border-radius: 15px;
  background: var(--gr-map-paper);
  box-shadow: var(--gr-map-shadow);
}

#root .gr-enterprise-map-selection-data {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#root .gr-enterprise-map-selection-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2px 8px;
}

#root .gr-enterprise-map-selection-actions a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 3px;
  margin-inline-start: auto;
  padding-inline: 6px;
  border-radius: 7px;
  color: var(--gr-map-brand);
  font-size: .8125rem;
  font-weight: 650;
  text-decoration: none;
}

#root .gr-enterprise-map-distance {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--gr-map-secondary);
  font-size: 0.75rem;
}

#root .gr-enterprise-map-selection :is(button, a):focus-visible,
#root .gr-enterprise-map-canvas :is(button, a):focus-visible {
  outline: 2px solid var(--gr-map-brand);
  outline-offset: -2px;
}

#root .gr-enterprise-map-selection > button {
  position: sticky;
  top: 0;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--gr-map-secondary);
}

#root .gr-enterprise-map-notice {
  position: absolute;
  z-index: 2;
  inset: auto max(var(--gr-map-side), env(safe-area-inset-right, 0px))
    calc(var(--gr-map-bottom) + 7px) max(var(--gr-map-side), env(safe-area-inset-left, 0px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 4px 6px 4px 12px;
  border: 1px solid var(--gr-map-border);
  border-radius: 14px;
  background: var(--gr-map-glass);
  box-shadow: var(--gr-map-shadow);
  color: var(--gr-map-secondary);
  font-size: 0.75rem;
  line-height: 1.45;
}

#root .gr-enterprise-map-status {
  display: grid;
  gap: 1px;
}

#root .gr-enterprise-map-status strong {
  color: var(--gr-map-ink);
  font-size: 0.8125rem;
  font-weight: 700;
}

#root .gr-enterprise-map-notice button {
  min-height: 44px;
  padding-inline: 10px;
  border: 0;
  border-radius: 9px;
  background: var(--gr-map-tint);
  color: var(--gr-map-brand);
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
}

#root .gr-enterprise-map-reference:not([data-view="map"]) .gr-enterprise-map-tools {
  padding-block-end: 12px;
}

#root .gr-enterprise-map-results {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: auto;
  overscroll-behavior: contain;
}

#root .gr-enterprise-map-results .gr-map-tools {
  padding-block: 4px 10px;
}

#root .gr-enterprise-map-results .gr-map-roster {
  flex: 1 1 auto;
}

#root .gr-enterprise-map-results .gr-map-roster-rows {
  border-radius: 9px;
}

#root .gr-enterprise-map-results .gr-map-business-icon {
  background: var(--gr-map-tint);
  color: var(--gr-map-brand);
}

#root .gr-enterprise-map-sheet {
  max-height: min(68%, 430px);
  padding: 8px 0 max(9px, var(--gr-map-bottom));
  overflow: auto;
  border: 0;
  border-radius: 16px 16px 0 0;
  background: var(--gr-map-paper);
  color: var(--gr-map-ink);
  text-align: center;
}

#root dialog.gr-enterprise-map-sheet {
  position: fixed;
  inset: auto 0 0;
  width: min(100%, var(--gr-pro-shell-width, 430px));
  max-width: none;
  margin: 0 auto;
}

#root dialog.gr-enterprise-map-sheet::backdrop { background: rgb(21 24 20 / 46%); }

#root .gr-enterprise-map-sheet:not(dialog) {
  position: absolute;
  z-index: 9;
  inset: auto 0 0;
  box-shadow: 0 0 0 100vmax rgb(21 24 20 / 46%);
}

#root .gr-enterprise-map-sheet h2 {
  margin: 4px 12px 8px;
  font-size: 0.9375rem;
  font-weight: 700;
}

#root .gr-enterprise-map-sheet-handle {
  display: block;
  width: 34px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #d9dcd6;
}

#root .gr-enterprise-map-sheet button {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 12px;
  border: 0;
  border-block-start: 1px solid var(--gr-map-border);
  background: transparent;
  color: var(--gr-map-ink);
  font-size: 0.9375rem;
}

#root .gr-enterprise-map-sheet button:is([aria-checked="true"], [aria-pressed="true"]) {
  background: var(--gr-map-tint);
  color: var(--gr-map-brand);
  font-weight: 650;
}

@media (max-width: 350px) {
  #root .gr-enterprise-map-reference { --gr-map-side: 10px; }
  #root .gr-enterprise-map-search { gap: 4px; }
  #root .gr-enterprise-map-circles button { padding-inline: 7px; }
}
