/*
 * The site menu, for the public site (NavWidget): the header's links.
 *
 * One markup at every width (NavMarkup): a <nav> holding a checkbox, its label
 * and the list. From 768px the checkbox and its label are not rendered and the
 * list is a row — 15px, ink-2, ink on hover, 24px apart, the look the header's
 * icon list had — so on a wide screen the header is unchanged to the eye.
 *
 * At Elementor's mobile breakpoint, 767px and down (the number the Timer page's
 * columns are set against), the label is the hamburger: three bars drawn from
 * one span and its two pseudo-elements, in a 44px hit area that reaches 12px
 * into the header's padding so the bars line up with its content, crossing into
 * an X while the checkbox is checked. The list is hidden until then and opens as
 * a panel under the header, the window's width, on the paper colour with the
 * header's rule below it, one link per line, each at least 44px tall.
 *
 * No script: the plugin carries one, the timer demo's. The checkbox is the
 * state and the keyboard's way in. It is visually hidden with a clip, never
 * `display: none`, so Tab reaches it and Space opens and closes the menu; its
 * focus ring is drawn on the hamburger. What a script would add and this does
 * not: Escape to close, a tap outside to close, and `aria-expanded` — a screen
 * reader hears the checkbox instead ("Menu, checkbox, checked").
 *
 * The panel hangs from the nav, not from the header. Elementor positions every
 * widget's wrapper (`position: relative`, which the editor's handles need), and
 * every rule here is scoped to .pk-nav, so the panel is told where the header's
 * edges are: --pk-nav-panel-drop, the header's bottom padding and border (19px),
 * and --pk-nav-panel-inset, its side padding (16px) — the seeded header's, and
 * both controls on the widget. It is 100vw wide and anchored on the right, so a
 * classic scrollbar's width, where a window has one, falls off the left edge
 * rather than making the page scroll sideways.
 *
 * Colours and the gap are custom properties the widget's controls write; the
 * face is the Typography control's, written onto the links. The site's paper
 * and rule tokens are read, never set. Under reduced motion nothing moves.
 */
.pk-nav {
  position: relative;
  display: flex;
  align-items: center;
}

.pk-nav .pk-nav__toggle,
.pk-nav .pk-nav__burger {
  display: none;
}

.pk-nav .pk-nav__list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--pk-nav-gap, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pk-nav .pk-nav__list li {
  margin: 0;
  padding: 0;
}

/* `display: block` so the row is the links' own line height, not the list
   item's strut at the body's size. */
.pk-nav .pk-nav__list a {
  display: block;
  font-size: 15px;
  line-height: 1.5;
  color: var(--pk-nav-color, #6b6b66);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s;
}

.pk-nav .pk-nav__list a:hover,
.pk-nav .pk-nav__list a:focus-visible {
  color: var(--pk-nav-hover, #1d1d1b);
}

.pk-nav .pk-nav__list a:focus-visible {
  outline: 2px solid var(--pk-nav-hover, #1d1d1b);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (max-width: 767px) {
  .pk-nav .pk-nav__toggle {
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .pk-nav .pk-nav__burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0 -12px 0 0;
    border-radius: 8px;
    color: var(--pk-nav-hover, #1d1d1b);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .pk-nav .pk-nav__burger span,
  .pk-nav .pk-nav__burger span::before,
  .pk-nav .pk-nav__burger span::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 1px;
    background-color: currentColor;
    transition:
      transform 0.2s ease,
      background-color 0.2s ease;
  }

  .pk-nav .pk-nav__burger span {
    position: relative;
  }

  .pk-nav .pk-nav__burger span::before,
  .pk-nav .pk-nav__burger span::after {
    content: '';
    position: absolute;
    left: 0;
  }

  .pk-nav .pk-nav__burger span::before {
    top: -6px;
  }

  .pk-nav .pk-nav__burger span::after {
    top: 6px;
  }

  .pk-nav .pk-nav__toggle:checked + .pk-nav__burger span {
    background-color: transparent;
  }

  .pk-nav .pk-nav__toggle:checked + .pk-nav__burger span::before {
    transform: translateY(6px) rotate(45deg);
  }

  .pk-nav .pk-nav__toggle:checked + .pk-nav__burger span::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  .pk-nav .pk-nav__toggle:focus-visible + .pk-nav__burger {
    outline: 2px solid var(--pk-nav-hover, #1d1d1b);
    outline-offset: 0;
  }

  .pk-nav .pk-nav__list {
    display: none;
  }

  .pk-nav .pk-nav__toggle:checked ~ .pk-nav__list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: calc(100% + var(--pk-nav-panel-drop, 19px));
    right: calc(-1 * var(--pk-nav-panel-inset, 16px));
    z-index: 10;
    width: 100vw;
    padding: 8px 0;
    background-color: var(--pk-site-paper, #fbfbf9);
    border-bottom: 1px solid var(--pk-site-rule, #e4e4df);
  }

  .pk-nav .pk-nav__list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--pk-nav-panel-inset, 16px);
  }

  .pk-nav .pk-nav__list a:focus-visible {
    outline-offset: -2px;
  }
}

/* Forced colours reset backgrounds, which would take the bars with them. */
@media (forced-colors: active) {
  .pk-nav .pk-nav__burger span,
  .pk-nav .pk-nav__burger span::before,
  .pk-nav .pk-nav__burger span::after {
    forced-color-adjust: none;
    background-color: CanvasText;
  }

  .pk-nav .pk-nav__toggle:checked + .pk-nav__burger span {
    background-color: transparent;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pk-nav .pk-nav__list a,
  .pk-nav .pk-nav__burger span,
  .pk-nav .pk-nav__burger span::before,
  .pk-nav .pk-nav__burger span::after {
    transition: none;
  }
}
