/* =====================================================================
   SUPPORT MENU
   From Uiverse.io by Zain-Muhammad.

   Kept to the original's shape and behaviour — the bordered tab with its
   headset, the icon's spin on hover, the menu that rises into place with its
   arrow — and recoloured from its near-black and cyan into the site's navy
   and Champagne, so it belongs to the page it sits on.

   Two changes that are not about colour:

   · Every rule is scoped under .tooltip-wrapper. The original's class names
     (.nav-link, .tooltip) are among the most common on the web, so unscoped
     they would reach anything else that happens to use them.

   · The original fills every icon with `fill: #fff`, which suits solid glyphs.
     These icons are drawn in strokes, and a white fill turned them into
     blobs, so they are stroked instead.

   It also opens on keyboard focus and on a tap, not only on hover, so it can
   be used without a mouse.
   ===================================================================== */
.tooltip-wrapper {
  --clr-btn: #2e4755;
  --clr-dropdown: #2e4755;
  --clr-nav-hover: #2e4755;
  --clr-dropdown-hov: #2e4755;
  --clr-dropdown-link-hov: #2e4755;
  --clr-light: #ffffff;
  --clr-edge: #BD830D;
}
.tooltip-wrapper .nav-link {
  position: relative;
}
.tooltip-wrapper > .tooltip-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin: 0;
  padding: 0;
}
.tooltip-wrapper .tooltip-container,
.tooltip-wrapper .tooltip-menu-with-icon {
  list-style: none;
  margin: 0;
}
.tooltip-wrapper .nav-link > .tooltip-tab {
  color: var(--clr-light);
  background: var(--clr-btn);
  padding: 0.8rem 1rem;
  letter-spacing: 1px;
  font-family: inherit;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  column-gap: 12px;
  justify-content: space-between;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid var(--clr-edge);
  transition: 0.3s ease-in-out;
}
.tooltip-wrapper .nav-link > .tooltip-tab:hover svg {
  transform: rotate(360deg);
  transition: 0.3s ease-in-out;
}
.tooltip-wrapper .tooltip-links {
  text-decoration: none;
}
/* Stroked, not filled: see the note at the top. */
.tooltip-wrapper .nav-link svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
}
.tooltip-wrapper .tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 60;
  min-width: 12rem;
  max-width: 15rem;
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: 0.5s;
  padding: 15px 0px 0px 0px;
}
.tooltip-wrapper .tooltip::after {
  content: "";
  width: 15px;
  height: 15px;
  background: var(--clr-edge);
  top: 0px;
  left: 6%;
  position: absolute;
  display: inline-block;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  transform: rotate(360deg);
  z-index: -1;
  box-shadow: 0px 6px 30px var(--clr-btn);
}
.tooltip-wrapper .tooltip .tooltip-menu-with-icon {
  padding: 10px 0px;
  background-color: var(--clr-dropdown);
  border: 1px solid var(--clr-edge);
  position: relative;
}
.tooltip-wrapper .tooltip-link {
  position: relative;
}
.tooltip-wrapper .tooltip-link:not(:nth-last-child(2)) {
  border-bottom: 1px solid var(--clr-dropdown);
}
.tooltip-wrapper .tooltip-link > a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  column-gap: 10px;
  background-color: var(--clr-dropdown);
  color: var(--clr-light);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  transition: 0.3s;
}
.tooltip-wrapper .tooltip-link > a:hover,
.tooltip-wrapper .tooltip-link > a:focus-visible {
  color: var(--clr-edge);
  outline: none;
}
.tooltip-wrapper .tooltip-menu-with-icon svg {
  height: 20px;
  margin-left: 0px;
}
.tooltip-wrapper .nav-link:hover > .tooltip-tab {
  transform: scale(1.1);
}
/* Open on hover, as the original does — and also on keyboard focus and on a
   tap (.is-open), so it works without a mouse. */
.tooltip-wrapper .nav-link:hover > .tooltip,
.tooltip-wrapper .nav-link:focus-within > .tooltip,
.tooltip-wrapper .nav-link.is-open > .tooltip,
.tooltip-wrapper .tooltip-link:hover > .tooltip {
  transform: translate(0, 0);
  opacity: 1;
  pointer-events: auto;
  -webkit-transform: translate(0, 0);
  -moz-transform: translate(0, 0);
  -ms-transform: translate(0, 0);
  -o-transform: translate(0, 0);
}
.tooltip-wrapper .nav-link:hover > .tooltip-tab {
  transform: scale(1);
  background-color: var(--clr-nav-hover);
}
.tooltip-wrapper .nav-link > .tooltip-tab:focus-visible {
  outline: 2px solid var(--clr-edge);
  outline-offset: 3px;
}

/* For a button near the right of the screen: the menu opens from its right
   edge and the arrow moves with it, so neither runs off the page. */
.tooltip-wrapper--end .tooltip {
  left: auto;
  right: 0;
}
.tooltip-wrapper--end .tooltip::after {
  left: auto;
  right: 6%;
}

@media (prefers-reduced-motion: reduce) {
  .tooltip-wrapper .tooltip,
  .tooltip-wrapper .nav-link > .tooltip-tab,
  .tooltip-wrapper .nav-link > .tooltip-tab:hover svg { transition: none; }
}
