/* MiKO Member Badges v1 */
.miko-user-badges{
  display:inline-flex;
  flex-wrap:wrap;
  align-items:center;
  gap:6px;
  max-width:100%;
  min-width:0;
  vertical-align:middle;
}
.miko-user-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  max-width:100%;
  min-height:24px;
  padding:4px 8px;
  border:1px solid transparent;
  border-radius:999px;
  white-space:nowrap;
  font-size:10px;
  line-height:1;
  font-weight:900;
  letter-spacing:0;
  box-sizing:border-box;
}
.miko-user-badge svg{
  width:14px;
  height:14px;
  flex:0 0 14px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.miko-user-badge--pro{background:#fff5d8;border-color:#f0d27b;color:#a76d00}
.miko-user-badge--student{background:#eaf3ff;border-color:#bed8ff;color:#176bd6}
.miko-user-badge--reader{background:#e9fbf5;border-color:#bdebdc;color:#137b61}
.miko-user-badge--gifter{background:#f8edff;border-color:#e2c4f5;color:#9251b8}
.miko-user-badge--verified{background:#eaf3ff;border-color:#bcd6ff;color:#116ce0}

.miko-user-badges--name{
  display:inline-flex;
  flex-wrap:nowrap;
  margin-left:5px;
  transform:translateY(-1px);
}
.miko-user-badges--name .miko-user-badge{
  width:20px;
  height:20px;
  min-height:20px;
  padding:0;
  border:0;
  background:#1477eb;
  color:#fff;
  box-shadow:0 2px 8px rgba(20,119,235,.22);
}
.miko-user-badges--name .miko-user-badge svg{width:13px;height:13px;flex-basis:13px}
.miko-user-badges--name .miko-user-badge span{display:none}

.miko-user-badges--profile{
  display:flex;
  margin-top:7px;
}
.miko-profile-identity h1{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:2px!important;
  min-width:0!important;
}
.miko-profile-identity h1 + p{margin-top:2px!important}
.miko-profile-identity>div{min-width:0!important;max-width:100%!important}
.miko-profile-identity .miko-user-badges--profile{max-width:100%!important}

.miko-user-badges--compact{
  display:flex;
  gap:4px;
  margin-top:3px;
}
.miko-user-badges--compact .miko-user-badge{
  width:18px;
  height:18px;
  min-height:18px;
  padding:0;
}
.miko-user-badges--compact .miko-user-badge span{display:none}
.miko-user-badges--compact .miko-user-badge svg{width:11px;height:11px;flex-basis:11px}

/* Writer Dashboard topbar */
.miko-wd-user .miko-wd-user-copy{min-width:0;display:block}
.miko-wd-user .miko-wd-user-name{
  display:flex;
  align-items:center;
  min-width:0;
  gap:2px;
}
.miko-wd-user .miko-wd-user-name>b{
  display:block;
  min-width:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.miko-wd-user .miko-user-badges--name{flex:0 0 auto;margin-left:3px}
.miko-wd-user .miko-user-badges--compact{margin-top:2px}
.miko-wd-user .miko-user-badges--compact .miko-user-badge{
  border-color:rgba(255,255,255,.2);
  box-shadow:none;
}
.miko-wd-user .miko-user-badges--compact .miko-user-badge--pro{background:rgba(240,185,37,.18);color:#ffd86e}
.miko-wd-user .miko-user-badges--compact .miko-user-badge--student{background:rgba(73,143,255,.16);color:#b8d7ff}
.miko-wd-user .miko-user-badges--compact .miko-user-badge--reader{background:rgba(66,200,158,.16);color:#a8efd8}
.miko-wd-user .miko-user-badges--compact .miko-user-badge--gifter{background:rgba(207,112,239,.16);color:#efc4ff}
.miko-wd-user .miko-user-badges--compact .miko-user-badge--verified{background:#1477eb;color:#fff}

/* Author cards */
.msn-reference-author .miko-user-badges--compact{
  display:inline-flex;
  margin:3px 0 0;
}

/* Avoid legacy duplicate pills once the unified helper is present. */
.miko-profile-identity .miko-verified-pill,
.miko-profile-identity .miko-pro-pill{display:none!important}

@media(max-width:760px){
  .miko-user-badge{
    min-height:22px;
    padding:4px 7px;
    font-size:9px;
  }
  .miko-profile-identity .miko-user-badges--profile{gap:5px}
}
@media(max-width:420px){
  .miko-user-badges--profile{
    width:100%;
    gap:4px;
  }
  .miko-user-badge{font-size:8.5px}
}
