/* DLE 14 AJAX profile popup: native jQuery UI frame, shared WRM 2.0 UI Kit tokens. */
.dle-popup-userprofile.wrm2-profile-dialog.ui-dialog{position:fixed!important;top:50%!important;left:50%!important;transform:translate(-50%,-50%);display:flex;flex-direction:column;box-sizing:border-box;width:min(550px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px);height:auto!important;max-height:calc(100dvh - 24px)!important;margin:0;padding:0;border:1px solid var(--wrm2-line-strong);border-radius:0;background:var(--wrm2-canvas2);color:var(--wrm2-text);box-shadow:0 24px 80px #000c;overflow:hidden;z-index:10020!important}
.dle-popup-userprofile .wrm2-modal-head.ui-dialog-titlebar{position:relative;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;flex:0 0 auto;gap:5px;min-height:79px;margin:0;padding:16px 58px 16px 20px;border:0;border-bottom:1px solid var(--wrm2-line);border-radius:0;background:var(--wrm2-canvas2);color:var(--wrm2-text);cursor:default}
.dle-popup-userprofile .wrm2-modal-kicker{color:var(--wrm2-mint);font:900 10px/1.3 var(--wrm2-font);letter-spacing:.13em}
.dle-popup-userprofile .ui-dialog-title{display:block;float:none;width:auto;max-width:100%;margin:0;color:var(--wrm2-text);font:900 clamp(17px,2.3vw,23px)/1.2 var(--wrm2-display);overflow-wrap:anywhere}
#dleprofilepopup.wrm2-profile-popup-content.ui-dialog-content{box-sizing:border-box;flex:1 1 auto;min-width:0;width:100%!important;max-height:calc(100dvh - 124px)!important;height:auto!important;padding:20px!important;border:0;background:var(--wrm2-canvas2);color:var(--wrm2-text);overflow:auto;font:500 12px/1.5 var(--wrm2-font)}
.wrm2-profile-popup{min-width:0;display:grid;gap:16px}
/* Main actions live in the template, directly below the player identity: no dependency on jQuery UI buttonpane. */
.wrm2-profile-popup__actions{display:flex;align-items:stretch;flex-wrap:wrap;gap:9px;margin:0;padding:0}
.wrm2-profile-popup__actions .wrm2-profile-popup__action{flex:1 1 130px;min-width:0;min-height:42px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;padding:10px 12px;border-radius:0;text-decoration:none;text-align:center;font:900 11px/1.25 var(--wrm2-font);letter-spacing:.05em;white-space:normal;cursor:pointer}
.wrm2-profile-popup__actions .wrm2-profile-popup__action[hidden]{display:none!important}
.wrm2-profile-popup__actions .wrm2-profile-popup__action--admin{background:var(--wrm2-panel2);color:var(--wrm2-text)!important}
/* Hide duplicate native View/PM actions after transferring the optional native admin edit button. */
.dle-popup-userprofile.wrm2-profile-dialog--ready .ui-dialog-buttonpane{display:none!important}
.wrm2-profile-popup__hero{display:flex;align-items:center;gap:16px;min-width:0}
.wrm2-profile-popup__portrait{position:relative;flex:0 0 82px;width:82px;height:82px;min-width:0}
.wrm2-profile-popup__avatar{box-sizing:border-box;width:100%;height:100%;padding:3px;border:2px solid var(--wrm2-user-avatar-color,var(--wrm2-mint));border-radius:50%;background:var(--wrm2-panel)}
.wrm2-profile-popup__avatar img{display:block;width:100%;height:100%;object-fit:cover;border-radius:50%}
/* Popup portrait is 82px, while comment avatars are 48px: size the shared badge to the portrait.
   This badge is a SIBLING of the avatar and is positioned independently of it. */
.wrm2-profile-popup__portrait>.wrm2-pro-badge{right:-6px;bottom:-6px;width:34px;height:34px}
.wrm2-profile-popup__portrait>.wrm2-pro-badge img{width:27px;height:27px}
.wrm2-profile-popup__identity{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
.wrm2-profile-popup__name{max-width:100%;color:var(--wrm2-text);font:900 21px/1.2 var(--wrm2-display);overflow-wrap:anywhere}
.wrm2-profile-popup__group{font:800 11px/1.4 var(--wrm2-font);color:var(--wrm2-mint)}
.wrm2-profile-popup__tags{display:flex;align-items:center;flex-wrap:wrap;gap:6px;min-width:0}
.wrm2-profile-popup__presence.wrm2-nav-pill{display:inline-flex;align-items:center;gap:5px;min-height:23px;padding:3px 8px;font:900 9px/1.25 var(--wrm2-font);letter-spacing:.05em;white-space:nowrap}
.wrm2-profile-popup__presence--online{color:var(--wrm2-mint);border-color:#1cfb8c55;background:#1cfb8c10}
.wrm2-profile-popup__presence--offline{color:var(--wrm2-muted);border-color:var(--wrm2-line-strong);background:var(--wrm2-panel)}
.wrm2-profile-popup__status-dot{display:block;flex:0 0 6px;width:6px;height:6px;border-radius:50%;background:currentColor}
.wrm2-profile-popup__rank{display:inline-flex;align-items:center;min-height:23px;padding:3px 8px;border:1px solid var(--wrm2-line-strong);background:var(--wrm2-panel);color:var(--wrm2-text);font:800 9px/1.25 var(--wrm2-font);letter-spacing:.03em;white-space:nowrap}
.wrm2-profile-popup__rank--role{color:var(--wrm2-muted)}
.wrm2-profile-popup__bio{padding:12px;border:1px solid var(--wrm2-line);background:var(--wrm2-panel);color:var(--wrm2-muted);overflow-wrap:anywhere}
.wrm2-profile-popup__facts{display:grid;gap:10px;margin:0;padding:15px 0;border-top:1px solid var(--wrm2-line);border-bottom:1px solid var(--wrm2-line)}
.wrm2-profile-popup__facts>div{display:grid;grid-template-columns:minmax(95px,35%) minmax(0,1fr);gap:10px;align-items:baseline}
.wrm2-profile-popup__facts dt{color:var(--wrm2-muted);font:800 10px/1.4 var(--wrm2-font);letter-spacing:.04em}
.wrm2-profile-popup__facts dd{min-width:0;margin:0;color:var(--wrm2-text);overflow-wrap:anywhere}
.wrm2-profile-popup__stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border:1px solid var(--wrm2-line);background:var(--wrm2-panel)}
.wrm2-profile-popup__stats>div{display:grid;grid-template-rows:minmax(28px,auto) auto;align-content:center;align-items:center;justify-items:center;gap:5px;min-width:0;min-height:77px;padding:13px 8px;border-right:1px solid var(--wrm2-line);text-align:center}
.wrm2-profile-popup__stats>div:last-child{border-right:0}
.wrm2-profile-popup__stats strong{font:900 21px/1.2 var(--wrm2-display);color:var(--wrm2-text)}
.wrm2-profile-popup__stats span{font:900 9px/1.3 var(--wrm2-font);letter-spacing:.06em;color:var(--wrm2-muted)}
/* DLE {rate} returns nested ratingtypeplus/minus spans with its own font size. */
.wrm2-profile-popup__stats strong :is(.ratingtypeplus,.ratingtypeplusminus,.ratingplus,.ratingminus,.ratingzero){font:inherit;font-size:inherit;letter-spacing:inherit}
.wrm2-profile-popup__stats strong .rating{display:inline-flex!important;align-items:center;justify-content:center;vertical-align:middle}
.wrm2-profile-popup__stats strong .unit-rating{margin:0;padding:0}

.dle-popup-userprofile .ui-dialog-buttonpane{box-sizing:border-box;flex:0 0 auto;width:100%;margin:0;padding:13px 20px;border:0;border-top:1px solid var(--wrm2-line);border-radius:0;background:var(--wrm2-panel)}
.dle-popup-userprofile .ui-dialog-buttonset{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:9px;float:none;width:100%}
.dle-popup-userprofile .ui-dialog-buttonpane button.wrm2-btn{float:none;box-sizing:border-box;min-height:40px;height:auto;margin:0;padding:9px 15px;border:1px solid var(--wrm2-line-strong);border-radius:0;background:var(--wrm2-panel2);color:var(--wrm2-text)!important;box-shadow:none;font:900 11px/1.3 var(--wrm2-font);letter-spacing:.05em;text-transform:uppercase;cursor:pointer}
.dle-popup-userprofile .ui-dialog-buttonpane button.wrm2-btn:hover{border-color:var(--wrm2-mint)}
.dle-popup-userprofile .ui-dialog-buttonpane button.wrm2-btn-primary{border-color:var(--wrm2-mint);background:var(--wrm2-mint);color:#06170e!important}
.dle-popup-userprofile .ui-dialog-buttonpane button.wrm2-btn-primary:hover{background:#75ffb7;color:#06170e!important}
.wrm2-profile-popup-overlay.ui-widget-overlay{position:fixed;inset:0;z-index:10019!important;opacity:1;background:#000e;backdrop-filter:blur(4px)}
@media(max-width:620px){.dle-popup-userprofile.wrm2-profile-dialog.ui-dialog{width:calc(100vw - 12px)!important;max-width:calc(100vw - 12px);max-height:calc(100dvh - 12px)!important}.dle-popup-userprofile .wrm2-modal-head.ui-dialog-titlebar{padding:13px 52px 13px 12px;min-height:70px}.dle-popup-userprofile .ui-dialog-titlebar-close.wrm2-close-button{top:13px;right:12px}#dleprofilepopup.wrm2-profile-popup-content.ui-dialog-content{max-height:calc(100dvh - 105px)!important;padding:13px!important}.dle-popup-userprofile .ui-dialog-buttonpane{padding:10px 12px}.dle-popup-userprofile .ui-dialog-buttonpane button.wrm2-btn{flex:1;min-width:0;padding:9px 7px;font-size:10px}.wrm2-profile-popup__portrait{flex-basis:68px;width:68px;height:68px}.wrm2-profile-popup__portrait>.wrm2-pro-badge{right:-5px;bottom:-5px;width:30px;height:30px}.wrm2-profile-popup__portrait>.wrm2-pro-badge img{width:24px;height:24px}.wrm2-profile-popup__name{font-size:18px}}
