/* =========================================================
   Buried Keep — core_avatar.css
   Shared avatar button + avatar popover styling

   Load order (preferred):
   global-1.css -> core_header.css -> core_menu.css (optional) ->
   core_avatar.css -> core_settings.css -> core_<page>.css -> plugins

   This file is the canonical source of avatar sizing/styling.
   ========================================================= */

/* Avatar circle button (in header, right side) */
.bk-avatar-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;

  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.28);
  background: rgba(255,255,255,0.18);

  cursor: pointer;
  padding: 0;
  user-select: none;

  position: relative;
  overflow: hidden;
}

.bk-avatar-btn:hover{
  background: rgba(255,255,255,0.28);
}

.bk-avatar-btn:active{
  transform: translateY(0.5px);
}

.bk-avatar-btn.bk-hidden{
  display: none;
}

/* Letter fallback */
.bk-avatar-letter{
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.92;
}

/* Image (covers the circle) */
.bk-avatar-img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

/* Avatar popover menu */
.bk-avatar-popover{
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 9999;

  min-width: 180px;
  padding: 6px;

  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.22);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.bk-avatar-popover.open{
  display: block;
}

.bk-avatar-item{
  width: 100%;
  text-align: left;

  border: 0;
  background: transparent;

  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;

  font-weight: 800;
}

.bk-avatar-item:hover{
  background: rgba(0,0,0,0.06);
}

/* Ensure header's right container positions the popover correctly */
.bk-user-wrap{
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
