@use 'sass:string';
@use '../base/token';
@use '../abstract';

$pc-rolling-banner-height: 48px;
$pc-header-height: 72px;

.cds-service-map {
  @include abstract.fixed($top: $pc-header-height, $left: 0);

  display: none;
  width: 100%;
  z-index: 1000;
  background-color: var(--base-white);
  box-shadow: var(--shadow-lg);
  border-block-start: 1px solid rgba(16, 24, 40, 0.051);

  &__header {
    order: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    background: var(--base-white);
    width: 100%;
    height: 84px;
    border-top: 1px solid var(--gray-100);
    background-color: var(--gray-50);
  }

  &__home-link {
    padding-left: 16px;
    padding-right: 16px;
    background-color: transparent;

    .cds-btn__label {
      order: 2;
      line-height: 1;
    }
  }

  &__list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 32px 24px;
    padding: 32px 56px;
  }

  &__menu-title {
    font-size: abstract.rem(token.$font-size-1);
    color: var(--secondary-gray-blue-450);
    font-weight: abstract.font-weight-to-number(token.$font-weights-commerce-sans-2);
    line-height: var(--line-height-9);

    a {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: var(--font-size-1);
    }

    svg {
      transform: translateY(1px);
    }
  }

  &__menu-content:first-of-type {
    margin-block-start: 12px;
  }

  .cds-nav-menu-item {
    border-radius: 8px;
  }

  .cds-nav-menu-item__link-text {
    margin-block-end: 0;
    font-size: token.$font-size-1;
  }

  @include abstract.media-bp-down('ex') {
    display: none;
  }

  &__wrap {
    position: absolute;
    width: 100%;
    background-color: #fff;
    box-shadow: var(--shadow-lg);
  }
}

body.service-map-on .cds-service-map {
  display: grid;
}
