/* YRDAO Medals —— 社区列表 / 帖子列表作者勋章样式
 * 包裹式注入：不动原有 .user-info 布局，只在末尾挂一个勋章条。
 */

.user-info {
  position: relative;
}

/* 头像那个 UserInfo 实例不展示勋章，只在昵称后展示 */
.user-info.admin-avatar > .yr-medal-list {
  display: none !important;
}

.yr-medal-list {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  line-height: 0;
  vertical-align: middle;
}

.yr-medal-list:empty {
  display: none;
}

.yr-medal {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  border-radius: 3px;
  cursor: help;
  transition: transform 0.12s ease;
}

.yr-medal:hover,
.yr-medal:focus-visible {
  transform: scale(1.15);
  outline: none;
}

.yr-medal-text {
  display: inline-flex;
  align-items: center;
  height: 16px;
  padding: 0 5px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.9);
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 500;
  white-space: nowrap;
}

/* ---------------------------------------------------- hover 勋章简介浮层 */
.yr-medal-tip {
  position: fixed;
  z-index: 2147483000;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  box-sizing: border-box;
  width: 240px;
  max-width: calc(100vw - 16px);
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.96);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  letter-spacing: normal;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  animation: yr-medal-tip-in 0.12s ease-out;
}

@keyframes yr-medal-tip-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.yr-medal-tip-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}

.yr-medal-tip-body {
  min-width: 0;
  flex: 1;
}

.yr-medal-tip-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 3px;
  word-break: break-word;
}

.yr-medal-tip-desc {
  color: rgba(248, 250, 252, 0.78);
  word-break: break-word;
}

.yr-medal-tip-desc.is-muted {
  color: rgba(248, 250, 252, 0.42);
}

.yr-medal-tip-hint {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(245, 158, 11, 0.95);
}
