/**
 * @file
 * Jumpbar (PSD-8) — Figma 27814:4734 desktop, 29828:136080 mobile.
 *
 * Horizontal inset comes from the parent Container (FND-2 gutter).
 */

.layout-container {

  .jumpbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 20px 0;
  }

  .jumpbar__label {
    margin: 0;
    flex: 0 0 auto;
    font-family: var(--font-agenda);
    font-size: var(--fs-22);
    font-weight: var(--font-weight-normal);
    font-feature-settings: "liga" 0;
    line-height: normal;
    color: var(--color-charcoal);
    white-space: nowrap;
  }

  .jumpbar__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .jumpbar__link,
  .jumpbar__select-trigger,
  .jumpbar__select-option {
    font-family: var(--font-agenda);
    font-size: var(--fs-20);
    font-feature-settings: "liga" 0;
    line-height: normal;
  }

  .jumpbar__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 16px;
    border: var(--stroke-1) solid var(--color-dark-coral);
    border-radius: var(--radius-2xl);
    background: var(--color-white);
    color: var(--color-dark-coral);
    font-weight: var(--font-weight-bold);
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
      background-color var(--transition-fast),
      color var(--transition-fast),
      border-color var(--transition-fast);
  }

  .jumpbar__link:hover {
    background: var(--color-dark-coral);
    border-color: var(--color-dark-coral);
    color: var(--color-white);
  }

  .jumpbar__select-wrap {
    display: none;
    position: relative;
    flex: 0 0 211px;
    width: 211px;
    max-width: 100%;
    border: var(--stroke-1) solid var(--color-dark-coral);
    border-radius: var(--radius-2xl);
    background: var(--color-white);
  }

  .jumpbar__select-trigger {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 40px 8px 16px;
    border: 0;
    border-radius: var(--radius-2xl);
    background: transparent;
    color: var(--color-dark-coral);
    font-weight: var(--font-weight-bold);
    text-align: left;
    cursor: pointer;
  }

  .jumpbar__select-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .jumpbar__select-menu {
    margin: 0;
    padding: 0 0 8px;
    list-style: none;
  }

  .jumpbar__select-option {
    padding: 8px 40px 8px 16px;
    color: var(--color-charcoal);
    font-weight: var(--font-weight-normal);
    cursor: pointer;
  }

  .jumpbar__select-option[aria-selected="true"] {
    color: var(--color-dark-coral);
    font-weight: var(--font-weight-bold);
  }

  .jumpbar__select-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    color: var(--color-dark-coral);
    pointer-events: none;
    transition: transform var(--transition-fast);
  }

  .jumpbar__link:focus-visible,
  .jumpbar__select-trigger:focus-visible,
  .jumpbar__select-option:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-outer);
    outline-offset: var(--focus-ring-width);
    box-shadow: 0 0 0 var(--focus-ring-width) var(--focus-ring-inner);
  }

  .jumpbar__select-trigger:focus-visible,
  .jumpbar__select-option:focus-visible {
    outline-offset: calc(-1 * var(--focus-ring-width));
  }

  .jumpbar__select-wrap--open .jumpbar__select-trigger {
    display: none;
  }

  .jumpbar__select-wrap--open .jumpbar__select-icon {
    z-index: 2;
    transform: rotate(180deg);
  }

  @media (max-width: 767px) {

    .jumpbar {
      flex-wrap: nowrap;
      justify-content: flex-start;
    }

    .jumpbar__links {
      display: none;
    }

    .jumpbar__select-wrap {
      display: block;
      flex: 1 1 211px;
      width: auto;
      min-width: 0;
    }

    /* Open menu overlays page content (Figma 29828:136085). */
    .jumpbar__select-wrap--open {
      z-index: 10;
      min-height: 40px;
      border-color: transparent;
      background: transparent;
    }

    .jumpbar__select-wrap--open .jumpbar__select-menu {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1;
      background: var(--color-white);
      border: var(--stroke-1) solid var(--color-dark-coral);
      border-radius: var(--radius-2xl);
    }
  }

  @media (prefers-reduced-motion: reduce) {

    .jumpbar__link,
    .jumpbar__select-icon {
      transition: none;
    }
  }

}

/* scrollIntoView offset for sticky header */
.layout-container .container[id] {
  scroll-margin-top: var(--header-height, 80px);
}

@media (max-width: 767px) {

  .layout-container .container[id] {
    scroll-margin-top: var(--header-height-mobile, 90px);
  }
}

@media (min-width: 768px) {
  .jumpbar {
    align-items: center;
  }
}
