/* POB profile certificates V2 — compact verification marks with anchored glass tooltips. */
.pm-player-profile,
.pm-player-hero,
.pm-player-identity {
  position: relative !important;
  z-index: 10 !important;
  overflow: visible !important;
}

.pm-player-profile,
.pm-player-hero,
.pm-player-identity h1 {
  overflow: visible !important;
}

.pm-player-identity h1 {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  column-gap: 8px;
  row-gap: 5px;
  position: relative;
}

.pm-profile-certificates {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 1px;
  vertical-align: middle;
  overflow: visible;
}

.pm-profile-certificate-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  overflow: visible;
  z-index: 2;
}

.pm-profile-certificate-wrap:hover,
.pm-profile-certificate-wrap:focus-within,
.pm-profile-certificate-wrap.is-open {
  z-index: 1000;
}

.pm-profile-certificate {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--pm-cert-color) 70%, rgba(255,255,255,.3));
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--pm-cert-color) 92%, #fff 8%), var(--pm-cert-color));
  box-shadow: 0 1px 5px color-mix(in srgb, var(--pm-cert-color) 28%, transparent), inset 0 1px 0 rgba(255,255,255,.34);
  cursor: help;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.pm-profile-certificate:hover,
.pm-profile-certificate:focus-visible,
.pm-profile-certificate-wrap.is-open .pm-profile-certificate {
  transform: translateY(-1px) scale(1.08);
  filter: brightness(1.12);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--pm-cert-color) 18%, transparent),
              0 3px 11px color-mix(in srgb, var(--pm-cert-color) 38%, transparent),
              inset 0 1px 0 rgba(255,255,255,.4);
  outline: none;
}

.pm-profile-certificate svg {
  display: block;
  width: 12px;
  height: 12px;
  color: #fff;
  overflow: visible;
}

/* The two verification marks use the familiar scalloped verification seal. */
.pm-profile-certificate--verified_blue,
.pm-profile-certificate--verified_gold {
  color: var(--pm-cert-color);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.pm-profile-certificate--verified_blue svg,
.pm-profile-certificate--verified_gold svg {
  width: 19px;
  height: 19px;
  filter: drop-shadow(0 1px 3px color-mix(in srgb, var(--pm-cert-color) 35%, transparent));
}

.pm-profile-certificate--verified_blue:hover,
.pm-profile-certificate--verified_gold:hover,
.pm-profile-certificate--verified_blue:focus-visible,
.pm-profile-certificate--verified_gold:focus-visible {
  box-shadow: none;
  filter: brightness(1.14) drop-shadow(0 2px 5px color-mix(in srgb, var(--pm-cert-color) 55%, transparent));
}

.pm-profile-certificate--youtube_creator,
.pm-profile-certificate--twitch_creator,
.pm-profile-certificate--staff_shield {
  border-radius: 6px;
}

.pm-profile-certificate__custom-icon {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: #fff;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

/* Compact glass tooltip: opens above the badge, never dims or blurs the page. */
.pm-profile-certificate-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 9px);
  z-index: 1200;
  display: block;
  width: max-content;
  min-width: 145px;
  max-width: min(230px, calc(100vw - 28px));
  padding: 9px 11px 10px;
  border: 1px solid color-mix(in srgb, var(--pm-cert-color, #4adea0) 38%, rgba(151,178,194,.45));
  border-radius: 11px;
  color: #eaf2f7;
  background: linear-gradient(145deg, rgba(19,32,39,.96), rgba(5,12,18,.97));
  box-shadow: 0 12px 32px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.075);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  backdrop-filter: blur(16px) saturate(145%);
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 5px) scale(.98);
  transform-origin: 50% 100%;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.pm-profile-certificate-tooltip::after {
  content: "";
  position: absolute;
  left: calc(50% - 5px);
  bottom: -5px;
  width: 9px;
  height: 9px;
  border-right: 1px solid color-mix(in srgb, var(--pm-cert-color, #4adea0) 38%, rgba(151,178,194,.45));
  border-bottom: 1px solid color-mix(in srgb, var(--pm-cert-color, #4adea0) 38%, rgba(151,178,194,.45));
  background: #0a151b;
  transform: rotate(45deg);
}

.pm-profile-certificate-tooltip strong {
  display: block;
  margin: 0 0 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.3;
}

.pm-profile-certificate-tooltip > span {
  display: block;
  color: rgba(220,232,239,.78);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
}

.pm-profile-certificate-wrap:hover .pm-profile-certificate-tooltip,
.pm-profile-certificate-wrap:focus-within .pm-profile-certificate-tooltip,
.pm-profile-certificate-wrap.is-open .pm-profile-certificate-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0) scale(1);
}

@media (max-width: 560px) {
  .pm-profile-certificates { gap: 3px; }
  .pm-profile-certificate-wrap,
  .pm-profile-certificate { width: 17px; height: 17px; min-width: 17px; min-height: 17px; }
  .pm-profile-certificate--verified_blue svg,
  .pm-profile-certificate--verified_gold svg { width: 18px; height: 18px; }
  .pm-profile-certificate-tooltip { max-width: min(210px, calc(100vw - 24px)); }
}

@media (prefers-reduced-motion: reduce) {
  .pm-profile-certificate,
  .pm-profile-certificate-tooltip { transition: none; }
}
