/* "made by humai." badge and info pop-up (SoV Planner). Measurements come from the
   Figma export (footer, HAI_pop). */

@font-face {
  font-family: 'Humai Inter'; /* own name: must not replace Inter in the app's --font */
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/humai/inter-latin-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Humai Inter'; /* own name: must not replace Inter in the app's --font */
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/humai/inter-latin-700.woff2') format('woff2');
}

/* No body padding-bottom: body/#root are min-height 100vh, so it would always scroll.
   `.app` already reserves 4rem at the bottom. */

.humai {
  position: fixed;
  right: 30px;
  bottom: 30px;
  z-index: 40; /* above the top bar (30), below dialogs, popovers and tooltips (50) */
  font-family: 'Humai Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  /* Less prominent: 80 % of the Figma size, anchored in the corner (30 px offsets stay). */
  transform: scale(0.8);
  transform-origin: right bottom;
}

/* footer */
.humai-trigger {
  display: block;
  width: 150.43px;
  height: 18.65px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 4px;
  opacity: 0.6;
  transition: opacity 200ms ease;
}
.humai-trigger:hover,
.humai-trigger:focus-visible,
.humai-trigger[aria-expanded='true'] {
  opacity: 1;
}
.humai-trigger img {
  display: block;
  width: 150.43px;
  height: 18.65px;
}
.humai-trigger:focus-visible {
  outline: 2px solid #003a70;
  outline-offset: 4px;
}

/* HAI_pop, opens above the badge, right-aligned */
.humai-pop {
  box-sizing: border-box;
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: 301px;
  height: 164px;
  /* white fill with the exported 1px grey gradient border */
  border: 1px solid transparent;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(0deg, #b0b0b0 0%, #d0d0d0 79.33%) border-box;
  box-shadow: 0px 1px 8.1px rgba(0, 0, 0, 0.15);
  border-radius: 15px;
  overflow: hidden;
  animation: humai-fade-in 220ms ease-out;
}
@keyframes humai-fade-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .humai-pop {
    animation-duration: 1ms;
  }
}

/* Positions are relative to the 301 x 164 frame; the border takes 1px. */
.humai-logo {
  position: absolute;
  left: calc(16.57px - 1px);
  top: calc(15.04px - 1px);
  width: 153.88px;
  height: 37.65px;
}
.humai-claim {
  position: absolute;
  left: calc(16.57px - 1px);
  top: calc(62.35px - 1px);
  width: 284.04px;
  height: 34px;
  margin: 0;
  font-size: 12px;
  line-height: 17px;
  color: #585858;
}
.humai-claim strong {
  font-weight: 700;
}
.humai-claim span {
  font-weight: 400;
  color: #5b5b5b;
}
/* Line 17 */
.humai-line {
  position: absolute;
  left: calc(50% - 283.69px / 2);
  top: calc(106.44px - 1px);
  width: 283.69px;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid #e9e9e9;
}
.humai-credits {
  position: absolute;
  left: calc(16.57px - 1px);
  top: calc(116.09px - 1px);
  width: 275px;
  height: 40px;
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  color: #585858;
}
.humai-links {
  display: flex;
  gap: 16px;
}
.humai-credits a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
  border-radius: 3px;
}
.humai-credits a:hover {
  text-decoration: underline;
}
.humai-credits a:focus-visible {
  outline: 2px solid #003a70;
  outline-offset: 2px;
}
.humai-credits img {
  width: 13px;
  height: 13px;
  margin-left: -0.5px;
}

@media print {
  .humai {
    display: none;
  }
}
