/* DME Profile — Usercard Popover
 * Dunkle Palette passend zum bestehenden DME-Design.
 * Karte: position:absolute, hoher z-index, Card-Look #0f161b / #22292f.
 */

.dmep-uc {
  position: absolute;
  z-index: 100000;
  width: 300px;
  max-width: calc(100vw - 24px);
  background: #0f161b;
  border: 1px solid #2a3540;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.65), 0 2px 8px rgba(0,0,0,.4);
  font-family: inherit;
  font-size: 13px;
  color: #c8d6e0;
  overflow: hidden;
  animation: dmep-uc-in .15s ease;
}

@keyframes dmep-uc-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Schliessen-Button ---- */
.dmep-uc-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  background: none;
  border: none;
  color: #6a8092;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color .15s, background .15s;
}
.dmep-uc-close:hover { color: #c8d6e0; background: rgba(255,255,255,.07); }

/* ---- Lade- / Fehlerzustand ---- */
.dmep-uc-loading,
.dmep-uc-error {
  padding: 18px 20px;
  color: #6a8092;
  font-size: 13px;
}

/* ---- Header (Avatar + Info) ---- */
.dmep-uc-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid #1e2c35;
}

/* ---- Avatar ---- */
.dmep-uc-avawrap {
  position: relative;
  flex-shrink: 0;
}
.dmep-uc-ava {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #22292f;
}
.dmep-uc-ava-ph {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #22292f;
  color: #4caf7d;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
}
.dmep-uc-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a4a55;
  border: 2px solid #0f161b;
}
.dmep-uc-dot.on { background: #4caf7d; }

/* Badge (serverseitig gerendert, z.B. ein kleines Icon) */
.dmep-uc-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  font-size: 0;
  line-height: 0;
}
.dmep-uc-badge img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #0f161b;
  display: block;
}

/* ---- Info-Bereich ---- */
.dmep-uc-info {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}
.dmep-uc-name {
  font-size: 15px;
  font-weight: 700;
  color: #e8f0f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  padding-right: 28px; /* Platz fuer Close-Button */
}

/* ---- Rollen-Badge ---- */
.dmep-uc-role-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #22292f;
  color: #c8d6e0;
  margin-bottom: 5px;
  white-space: nowrap;
}
.dmep-uc-glossy {
  background-clip: padding-box;
}

/* ---- Tags (Online/Fraktion/Level) ---- */
.dmep-uc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}
.dmep-uc-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 8px;
  background: #1a2530;
  color: #7a9aac;
  white-space: nowrap;
}
.dmep-uc-tag.on  { background: rgba(76,175,125,.15); color: #4caf7d; }
.dmep-uc-tag.off { background: rgba(120,140,155,.1);  color: #6a8092; }
.dmep-uc-tag.lvl { background: rgba(255,180,0,.1);   color: #f5c518; }

/* ---- Statistiken ---- */
.dmep-uc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 10px 16px 12px;
  border-bottom: 1px solid #1e2c35;
}
.dmep-uc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  border-right: 1px solid #1e2c35;
}
.dmep-uc-stat:last-child { border-right: none; }
.dmep-uc-sv {
  font-size: 16px;
  font-weight: 700;
  color: #e8f0f5;
  line-height: 1.2;
}
.dmep-uc-sk {
  font-size: 10px;
  color: #6a8092;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dmep-uc-nodata {
  padding: 10px 16px;
  color: #4a6070;
  font-size: 12px;
  text-align: center;
  border-bottom: 1px solid #1e2c35;
}

/* ---- Footer (Profil-Button) ---- */
.dmep-uc-foot {
  padding: 10px 16px;
}
.dmep-uc-btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 8px 12px;
  background: #4caf7d;
  color: #0b0e13;
  font-size: 13px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
.dmep-uc-btn:hover {
  background: #5dc98e;
  transform: translateY(-1px);
}
.dmep-uc-btn:active { transform: none; }

/* ---- Back-Link (Read-only Profil-Seite) ---- */
.dmep-back-bar {
  padding: 8px 0 4px;
}
.dmep-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #6a8092;
  text-decoration: none;
  transition: color .15s;
}
.dmep-back-link:hover { color: #4caf7d; }
.dmep-back-link svg { flex-shrink: 0; }
