/*
 * diaspora.ro — Global Avatar Hexagonal v2.0
 * Avatar hexagonal cu glow effect la postări, comentarii, chat, pretutindeni.
 * Zero — specificitate prin selector body .cls (0,1,x).
 */

/* ── VARIABILE HEX ── */
:root {
  --hex-clip: polygon(50% 0%, 93.3% 25%, 93.3% 75%, 50% 100%, 6.7% 75%, 6.7% 25%);
}

/* ── AVATARE HEXAGONALE GLOBALE ── */
body .mh-ava, body .mh-user-ava, body .msg-av, body .user-avatar, body .avatar,
body .avatar-img, body .forum-avatar, body .chat-avatar, body .hub-avatar,
body .post-avatar, body .comment-avatar, body .user-pic,
body [class*="ava"]:not([class*="avail"]):not([class*="avantaj"]),
body [class*="avatar"], body [class*="profil-img"], body [class*="user-img"] {
  border-radius: 0;
  clip-path: var(--hex-clip);
  overflow: hidden;
}

/* Imagini din interior */
body .mh-ava img, body .mh-user-ava img, body .msg-av img, body .user-avatar img,
body .avatar img, body [class*="ava"] img, body [class*="avatar"] img {
  clip-path: none;
  border-radius: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── AVATAR CHAT/HUB (42px) ── */
body .mh-ava {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  clip-path: var(--hex-clip);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  font-weight: 700;
  font-size: 1rem;
  color: white;
  box-shadow: 0 0 0 2px rgba(181,123,255,.2), 0 0 12px rgba(124,58,237,.25);
  transition: box-shadow .2s, filter .15s;
}
body .mh-ava:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 0 2px rgba(181,123,255,.4), 0 0 18px rgba(124,58,237,.5);
}

/* ── MESAJE DM ── */
body .msg-av,
body .msg-av.u {
  clip-path: var(--hex-clip);
  border-radius: 0;
  overflow: hidden;
}

/* ── HEADER AVATAR ── */
#hdr-user-avatar {
  clip-path: var(--hex-clip);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(181,123,255,.2), 0 0 10px rgba(124,58,237,.2);
}
#hdr-user-avatar img {
  clip-path: none;
  border-radius: 0;
  object-fit: cover;
}

/* ── CLASA UTILITAR HEXAGON ── */
body .dpr-hex {
  clip-path: var(--hex-clip);
  border-radius: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  font-weight: 700;
  color: #fff;
}
body .dpr-hex img {
  clip-path: none;
  border-radius: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── GLOW RING animat ── */
.dpr-hex-ring { position: relative; display: inline-flex; }
.dpr-hex-ring::before {
  content: '';
  position: absolute;
  inset: -3px;
  clip-path: var(--hex-clip);
  background: linear-gradient(135deg, #b57bff, #f472b6, #ffd060, #b57bff);
  background-size: 300% 300%;
  animation: hexGlow 3s linear infinite;
  z-index: -1;
  opacity: .7;
}
@keyframes hexGlow {
  0%   { background-position: 0% 50%;   filter: hue-rotate(0deg); }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%;   filter: hue-rotate(360deg); }
}

/* ── AUTH STATE HELPERS ── */
body .dpr-hide-when-logged-in  { display: none; }
body .dpr-show-when-logged-in  { display: flex; }
body .dpr-show-when-logged-in.inline { display: inline-flex; }

/* ── FEED / NOTIFICARI ── */
body .notif-avatar, body .story-avatar, body .feed-avatar {
  clip-path: var(--hex-clip);
  border-radius: 0;
  overflow: hidden;
}

/* ── HOVER GLOW GLOBAL ── */
body .mh-ava:hover, body .post-avatar:hover, body .comment-avatar:hover,
body .hub-avatar:hover, body .user-avatar:hover {
  filter: brightness(1.08);
}
