/* MJ Community v0.1.0 — минимальный профиль без вмешательства в существующую тему. */
.mj-community-floating-avatar{
  position:fixed;
  top:16px;
  right:max(14px,calc((100vw - var(--max,720px))/2 + 14px));
  z-index:950;
  width:48px;
  height:48px;
  display:block;
  border-radius:50%;
  overflow:hidden;
  border:2px solid rgba(255,255,255,.82);
  background:rgba(20,18,14,.92);
  box-shadow:0 5px 22px rgba(0,0,0,.38),0 0 0 1px rgba(200,151,42,.32);
  transition:transform .15s ease,box-shadow .15s ease;
}
.mj-community-floating-avatar:hover{transform:translateY(-1px);box-shadow:0 7px 26px rgba(0,0,0,.44),0 0 0 1px rgba(200,151,42,.56)}
.mj-community-floating-avatar:active{transform:scale(.96)}
.mj-community-floating-avatar-img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important;margin:0!important}

.mj-community-profile{gap:14px}
.mj-community-profile-hero{display:flex;align-items:center;gap:18px;padding:22px}
.mj-community-profile-avatar{width:104px;height:104px;flex:0 0 104px;border-radius:50%;overflow:hidden;border:2px solid rgba(255,255,255,.78);box-shadow:0 0 0 3px rgba(200,151,42,.2)}
.mj-community-profile-avatar-img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:50%!important;margin:0!important;display:block!important}
.mj-community-profile-headcopy{min-width:0}
.mj-community-profile-headcopy h1{margin:0 0 7px!important;font-size:23px!important;line-height:1.2!important;color:var(--white,#fff)!important}
.mj-community-profile-name{font-size:18px;font-weight:700;color:var(--gold-light,#f0c96b);overflow-wrap:anywhere}
.mj-community-profile-registered{margin-top:6px;font-size:13px;color:rgba(255,255,255,.58)}

.mj-community-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.mj-community-summary-item{padding:15px 10px;text-align:center;min-width:0}
.mj-community-summary-item strong{display:block;font-size:26px;line-height:1;color:var(--gold-light,#f0c96b);margin-bottom:6px}
.mj-community-summary-item span{display:block;font-size:12px;color:rgba(255,255,255,.68);overflow-wrap:anywhere}

.mj-community-section{padding:20px}
.mj-community-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}
.mj-community-section-head h2{margin:0!important;font-size:18px!important;color:var(--white,#fff)!important}
.mj-community-section-head>span{min-width:28px;height:28px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;padding:0 8px;background:rgba(255,255,255,.08);color:rgba(255,255,255,.62);font-size:12px;font-weight:700;box-sizing:border-box}
.mj-community-list{display:flex;flex-direction:column;gap:0}
.mj-community-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 0;border-top:1px solid rgba(255,255,255,.09)}
.mj-community-row:first-child{border-top:0;padding-top:4px}
.mj-community-row:last-child{padding-bottom:2px}
.mj-community-row-main{min-width:0;flex:1}
.mj-community-row-title{display:inline-block;color:var(--white,#fff)!important;text-decoration:none!important;font-size:15px;font-weight:650;line-height:1.35;overflow-wrap:anywhere}
a.mj-community-row-title:hover{color:var(--gold-light,#f0c96b)!important}
.mj-community-row-meta{margin-top:5px;color:rgba(255,255,255,.54);font-size:12px;line-height:1.4}
.mj-community-status{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;max-width:145px;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:700;line-height:1.15;text-align:center;background:rgba(255,255,255,.08);color:rgba(255,255,255,.7)}
.mj-community-status.is-going,.mj-community-status.is-active{background:rgba(200,151,42,.16);color:var(--gold-light,#f0c96b);border:1px solid rgba(200,151,42,.25)}
.mj-community-status.is-past,.mj-community-status.is-ended{background:rgba(255,255,255,.07);color:rgba(255,255,255,.58)}
.mj-community-status.is-winner{background:rgba(200,151,42,.22);color:#ffe8a1;border:1px solid rgba(240,201,107,.38);box-shadow:0 0 16px rgba(200,151,42,.08)}
.mj-community-empty{margin:0!important;color:rgba(255,255,255,.56)!important;font-size:14px!important;line-height:1.55!important}

.mj-community-cities{display:flex;flex-wrap:wrap;gap:8px}
.mj-community-city-chip{display:inline-flex;align-items:center;gap:7px;padding:9px 11px;border-radius:999px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.1);color:rgba(255,255,255,.84)!important;text-decoration:none!important;font-size:13px;font-weight:600}
.mj-community-city-chip span{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:rgba(200,151,42,.16);color:var(--gold-light,#f0c96b);font-size:11px;box-sizing:border-box}
.mj-community-city-chip:hover{border-color:rgba(200,151,42,.35);color:var(--gold-light,#f0c96b)!important}

@media(max-width:600px){
  .mj-community-floating-avatar{top:12px;right:12px;width:44px;height:44px}
  .mj-community-profile-hero{gap:14px;padding:18px}
  .mj-community-profile-avatar{width:82px;height:82px;flex-basis:82px}
  .mj-community-profile-headcopy h1{font-size:20px!important}
  .mj-community-profile-name{font-size:16px}
  .mj-community-summary{gap:7px}
  .mj-community-summary-item{padding:13px 5px}
  .mj-community-summary-item strong{font-size:23px}
  .mj-community-summary-item span{font-size:10px}
  .mj-community-section{padding:17px}
  .mj-community-row{align-items:flex-start;flex-direction:column;gap:8px}
  .mj-community-status{align-self:flex-start;max-width:none}
}

/* v0.1.1: профиль — постраничная подгрузка по 10 записей, в стиле кнопки главной страницы. */
.mj-community-section .mc-load-more{display:block;margin:14px auto 0;padding:10px 18px;border:1px solid rgba(255,255,255,.2);border-radius:10px;background:rgba(255,255,255,.08);color:#fff;font:inherit;font-weight:650;cursor:pointer}
.mj-community-section .mc-load-more:hover{background:rgba(255,255,255,.14)}
.mj-community-section .mc-load-more:disabled{opacity:.62;cursor:default}
.mj-community-section .mc-load-more[hidden]{display:none!important}

/* v0.1.3: гостевая кнопка входа в позиции аватарки. */
.mj-community-guest-login-wrap{
  position:fixed;
  top:16px;
  right:max(14px,calc((100vw - var(--max,720px))/2 + 14px));
  z-index:950;
  width:48px;
  height:48px;
}
.mj-community-floating-login{
  position:relative;
  z-index:2;
  width:48px;
  height:48px;
  box-sizing:border-box;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:rgba(20,18,14,.96);
  border:2px solid rgba(224,183,84,.9);
  box-shadow:0 5px 22px rgba(0,0,0,.42),0 0 0 1px rgba(200,151,42,.22) inset;
  color:var(--gold-light,#f0c96b)!important;
  text-decoration:none!important;
  text-align:center;
  font-size:10px;
  line-height:1;
  font-weight:750;
  letter-spacing:.01em;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,color .15s ease;
}
.mj-community-floating-login span{
  display:block;
  max-width:42px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.mj-community-floating-login:hover{
  transform:translateY(-1px);
  border-color:rgba(240,201,107,1);
  color:#ffe39a!important;
  box-shadow:0 7px 26px rgba(0,0,0,.48),0 0 0 1px rgba(240,201,107,.3) inset,0 0 15px rgba(200,151,42,.16);
}
.mj-community-floating-login:active{transform:scale(.96)}

.mj-community-login-tooltip{
  position:absolute;
  top:50%;
  right:calc(100% + 10px);
  transform:translate(7px,-50%);
  width:max-content;
  max-width:min(250px,calc(100vw - 92px));
  box-sizing:border-box;
  padding:9px 12px;
  border-radius:10px;
  border:1px solid rgba(224,183,84,.34);
  background:rgba(20,18,14,.96);
  box-shadow:0 6px 24px rgba(0,0,0,.38);
  color:rgba(255,255,255,.92);
  font-size:12px;
  font-weight:600;
  line-height:1.3;
  text-align:left;
  white-space:normal;
  pointer-events:none;
  opacity:0;
  visibility:hidden;
  transition:opacity .22s ease,transform .22s ease,visibility 0s linear .22s;
}
.mj-community-login-tooltip::after{
  content:"";
  position:absolute;
  top:50%;
  right:-5px;
  width:9px;
  height:9px;
  margin-top:-5px;
  background:rgba(20,18,14,.96);
  border-top:1px solid rgba(224,183,84,.34);
  border-right:1px solid rgba(224,183,84,.34);
  transform:rotate(45deg);
}
.mj-community-login-tooltip.is-visible{
  opacity:1;
  visibility:visible;
  transform:translate(0,-50%);
  transition:opacity .22s ease,transform .22s ease,visibility 0s;
}

@media(max-width:600px){
  .mj-community-guest-login-wrap{top:12px;right:12px;width:44px;height:44px}
  .mj-community-floating-login{width:44px;height:44px;font-size:9px}
  .mj-community-floating-login span{max-width:38px}
  .mj-community-login-tooltip{
    right:calc(100% + 8px);
    max-width:min(210px,calc(100vw - 76px));
    padding:8px 10px;
    font-size:11px;
  }
}

@media(prefers-reduced-motion:reduce){
  .mj-community-floating-login,.mj-community-login-tooltip{transition:none!important}
}
