/*
 * Copyright (c) 2026, Salesforce, Inc.,
 * All rights reserved.
 * For full license text, see the LICENSE.txt file
 */

/**
 * @summary Map container
 */
.slds-map_container {
  flex: 3 1 auto;
}

/**
 * @summary 3rd party map element found inside of the map container
 */
.slds-map {
  position: relative;
  min-width: 23.75rem;
  width: 100%;
  max-height: 100%;
}

.slds-map::before {
  content: '';
  display: block;
  height: 0;
  width: 100%;
  padding-block-start: 56.25%;
}

.slds-map iframe {
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  inset-inline-end: 0;
  height: 100%;
  width: 100%;
  border: 0;
}

/**
 * @summary Modifier that informs the parent grid container the coordinates panel is active
 */
.slds-has-coordinates {
  display: flex;
  flex-wrap: wrap;
  overflow: auto;
  max-height: 41.25rem;
  background: var(--slds-g-color-surface-container-1);
}
.slds-has-coordinates .slds-map::before {
  padding-block-start: 75%;
}

/**
 * @summary Element inside the coordinates panel that contains the title of the panel
 */
.slds-coordinates {
  overflow: auto;
  flex: 1 1 auto;
}

/**
 * @summary Element inside the coordinates panel that contains the title of the panel
 */
.slds-coordinates__header {
  padding: var(--slds-g-spacing-4);
}

/**
 * @summary Title inside the coordinates panel
 */
.slds-coordinates__title {
  font-size: var(--slds-g-font-scale-2);
  font-weight: var(--slds-g-font-weight-6);
}

/**
 * @summary Actionable items inside of the coordinates list
 */
.slds-coordinates__item-action {
  padding-inline: var(--slds-g-spacing-4);
  padding-block: var(--slds-g-spacing-2);
  width: 100%;

  &.slds-media {
    align-items: center;
  }

  .slds-text-link {
    display: block;
  }

  &:hover,
  &:focus {
    background-color: var(--slds-s-menu-item-color-background-active);
    outline: 0;

    .slds-text-link {
      text-decoration: underline;
    }
  }

  &:focus-visible {
    box-shadow: var(--slds-g-shadow-insetinverse-focus-1);
    outline: 0;
  }

  &:active {
    background-color: var(--slds-s-menu-item-color-background-active);
  }

  &[aria-pressed='true'] {
    background-color: var(--slds-s-menu-item-color-background-active);
  }
}
