:root {
  --pbx-talents-left: 16px;
  --pbx-talents-top: 50%;
}

[data-pbx-floating-talents] {
  position: relative;
  width: 0;
  height: 0;
  overflow: visible;
}

.pbx-talents-wrap {
  position: relative;
  min-height: 0;
  width: 0;
}

.pbx-talents-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: fixed;
  left: var(--pbx-talents-left);
  top: var(--pbx-talents-top);
  transform: translateY(-50%);
  z-index: 12000;
  overflow: visible;
}

.pbx-talents-plus {
  display: none !important;
}

.pbx-talents-plus small {
  display: none !important;
}

.pbx-talents-badge-wrap {
  position: relative;
  display: block;
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.pbx-talents-badge-wrap::after {
  content: attr(data-name);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  padding: 6px 10px;
  border-radius: 8px;
  background: #111827;
  color: #fff;
  font-family: Inter, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 12002;
}

.pbx-talents-badge-wrap:hover::after,
.pbx-talents-badge-wrap:focus-within::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) translateX(0);
  transition-delay: 0s;
}

.pbx-talents-badge-wrap:nth-child(1) .pbx-talents-badge {
  border-color: #22d3ee;
  animation-delay: 0s;
}

.pbx-talents-badge-wrap:nth-child(2) .pbx-talents-badge {
  border-color: #DC2626;
  animation-delay: 0.45s;
}

.pbx-talents-badge-wrap:nth-child(3) .pbx-talents-badge {
  border-color: #DC2626;
  animation-delay: 0.9s;
}

.pbx-talents-badge {
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  object-fit: cover;
  background: #1e293b;
  border: 2px solid #1f2a44;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.28);
  animation: pbx-talents-float 4.2s ease-in-out infinite;
  transition: opacity 0.35s ease, border-color 0.35s ease;
}

.pbx-talents-badge.is-swapping {
  opacity: 0;
}

@keyframes pbx-talents-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.pbx-talents-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: #DC2626;
  font-weight: 700;
  margin-top: 4px;
}

.pbx-talents-popup {
  display: none !important;
  position: fixed;
  left: calc(var(--pbx-talents-left) + 60px);
  top: var(--pbx-talents-top);
  width: 292px;
  background: #060c1b;
  border: 1px solid rgba(220, 38, 38, 0.26);
  border-radius: 18px;
  padding: 10px 10px 12px;
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.52);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(calc(-50% + 6px)) scale(0.985);
  z-index: 12001;
}

.pbx-talents-popup::before {
  content: "";
  position: absolute;
  top: 0;
  left: -22px;
  width: 24px;
  height: 100%;
}

.pbx-talents-rail:hover + .pbx-talents-popup,
.pbx-talents-popup:hover {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.pbx-talents-head h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.pbx-talents-head h3::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background: #dc2626;
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.65);
  flex-shrink: 0;
}

.pbx-talents-head p {
  margin: 3px 0 0;
  color: #ff4d5e;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.pbx-talents-close {
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  border: 1px solid rgba(220, 38, 38, 0.35);
  background: transparent;
  color: #DC2626;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pbx-talents-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px 4px;
  margin-top: 8px;
}

.pbx-talents-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
}

.pbx-talents-card {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 4px 2px 6px;
  transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  cursor: pointer;
  text-align: center;
}

.pbx-talents-card-link:hover .pbx-talents-card,
.pbx-talents-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px var(--ring-glow), 0 0 14px var(--ring-glow);
}

.pbx-talents-avatar-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  margin: 0 auto;
}

.pbx-talents-avatar-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
  background: #243046;
  border: 2px solid var(--ring-color);
  box-shadow: 0 0 8px var(--ring-glow);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.pbx-talents-card-link:hover .pbx-talents-avatar-wrap img,
.pbx-talents-card:hover .pbx-talents-avatar-wrap img {
  box-shadow: 0 0 14px var(--ring-glow-strong);
  transform: scale(1.04);
}

.pbx-talents-dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 7px;
  height: 7px;
  border-radius: 9999px;
  background: var(--dot-color);
  border: 1.5px solid #060c1b;
  box-shadow: 0 0 5px var(--dot-color);
}

.pbx-talents-card h4 {
  margin: 5px 0 0;
  color: #f8fafc;
  font-size: 10px;
  line-height: 1.15;
  font-weight: 700;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.pbx-talents-card p {
  margin: 2px 0 0;
  color: #9ca3af;
  font-size: 7.5px;
  line-height: 1.2;
  text-align: center;
  padding: 0 1px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 0;
}

.pbx-talents-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  background: #dc2626;
  border-radius: 9999px;
  margin-top: 10px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.01em;
}

@media (max-width: 767px) {
  [data-pbx-floating-talents] {
    display: none !important;
  }
}
