/* Gold-plate tip pills for the topbar HUD. Same slate + bevel as the counters. */

.tip-pill {
  position: fixed;
  z-index: 5200;
  max-width: min(240px, calc(100vw - 24px));
  padding: 8px 12px 9px;
  border: 2px solid transparent;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #32284a 0%, #1a1428 100%) padding-box,
    linear-gradient(180deg, #ffe39a, #d29a35 42%, #8a5a16) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -3px 6px rgba(0, 0, 0, 0.45),
    0 8px 22px rgba(0, 0, 0, 0.55),
    0 0 16px rgba(255, 180, 60, 0.18);
  color: #f5f0ff;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.96);
  transition:
    opacity 0.16s ease,
    transform 0.18s cubic-bezier(0.34, 1.35, 0.64, 1),
    visibility 0.16s ease;
}

.tip-pill.is-on {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.tip-pill.is-above {
  transform: translateY(-6px) scale(0.96);
}

.tip-pill.is-above.is-on {
  transform: translateY(0) scale(1);
}

.tip-pill-title {
  display: block;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  line-height: 1.05;
  color: #ffd54a;
  text-shadow: 0 2px 0 #4a2c00;
  text-transform: uppercase;
}

.tip-pill-body {
  display: block;
  margin: 3px 0 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  color: rgba(245, 240, 255, 0.88);
}

.tip-pill-body:empty {
  display: none;
}

.tip-pill::after {
  content: '';
  position: absolute;
  left: var(--tip-arrow-x, 50%);
  width: 12px;
  height: 12px;
  background:
    linear-gradient(135deg, #d29a35 0%, #8a5a16 100%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%) rotate(45deg);
}

.tip-pill:not(.is-above)::after {
  top: -5px;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  background: linear-gradient(135deg, #ffe39a 10%, #d29a35 70%);
}

.tip-pill.is-above::after {
  bottom: -5px;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  background: linear-gradient(135deg, #8a5a16 20%, #d29a35 90%);
}

@media (prefers-reduced-motion: reduce) {
  .tip-pill {
    transition: opacity 0.12s ease, visibility 0.12s ease;
    transform: none;
  }

  .tip-pill.is-on,
  .tip-pill.is-above,
  .tip-pill.is-above.is-on {
    transform: none;
  }
}

@media (hover: none) {
  .tip-pill {
    display: none;
  }
}
