/* Twinty Premium badge */
.premium-badge {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  vertical-align: middle;
  flex-shrink: 0;
  background-image: url('../svg/premium_badge.svg?v=1');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: help;
  position: relative;
}

.premium-badge::after {
  content: 'Twinty Premium';
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  padding: 5px 8px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 50;
}

.premium-badge::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 50;
}

.premium-badge:hover::after,
.premium-badge:hover::before {
  opacity: 1;
  visibility: visible;
}

.premium-badge-post {
  width: 16px;
  height: 16px;
}

.premium-badge-profile {
  width: 20px;
  height: 20px;
}

.profile-name-with-premium {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}

.profile-name-with-premium .profile-name-text {
  flex-shrink: 1;
}

.post-username-wrapper .premium-badge,
.post-comment-username + .premium-badge,
.comment-username + .premium-badge,
.modal-comment-username + .premium-badge,
.mobile-comment-username + .premium-badge,
.chat-header-name .premium-badge,
.chat-item-name .premium-badge,
.follower-username .premium-badge,
.search-result-username .premium-badge,
.notification-user-link .premium-badge {
  flex-shrink: 0;
}

.chat-header-name .premium-badge::after,
.chat-item-name .premium-badge::after {
  white-space: nowrap;
}
