﻿* {
  box-sizing: border-box;
}

.code-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 2px 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: help;
  touch-action: manipulation;
}

.code-chip:hover {
  color: #2364aa;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.code-chip:focus-visible {
  outline: 3px solid #8bc3ff;
  outline-offset: 2px;
}

.tooltip {
  position: fixed;
  z-index: 10;
  max-width: min(460px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #17202a;
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  font-size: 14px;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tooltip::after {
  content: "";
  position: absolute;
  left: 20px;
  width: 14px;
  height: 14px;
  background: #17202a;
  transform: rotate(45deg);
}

.tooltip[data-position="top"]::after {
  bottom: -7px;
}

.tooltip[data-position="bottom"]::after {
  top: -7px;
}

.tooltip-title {
  margin-bottom: 6px;
  font-weight: 700;
}

.tooltip-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tooltip-list span {
  color: #b9d6f2;
  font-weight: 700;
}

@media (max-width: 560px) {

  .code-chip {
    width: 100%;
    min-height: 32px;
    padding: 4px 0;
    cursor: pointer;
  }

  .tooltip {
    width: calc(100vw - 24px);
    max-width: none;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .examples {
    grid-template-columns: 1fr;
  }
}
