/* Auth slot compartilhado — home editorial + paginas internas (Base.astro) */
.authSlot {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  min-width: 36px;
  min-height: 36px;
}

.authSlot[data-auth-pending] {
  opacity: 0;
  pointer-events: none;
}

html[data-auth-hint='signed-in'] .authSlot[data-auth-pending] {
  opacity: 1;
  pointer-events: auto;
}

html[data-auth-ready='anon'] .authSlot[data-auth-pending] {
  opacity: 1;
  pointer-events: auto;
}

html[data-auth-hint='signed-in'] .authSlot[data-auth-pending]:empty::before {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(16, 20, 36, 0.12);
  animation: auth-slot-pulse 1.1s ease-in-out infinite;
}

html[data-auth-hint='signed-in'] .home-editorial .authSlot[data-auth-pending]:empty::before {
  background: rgba(45, 41, 38, 0.1);
}

@keyframes auth-slot-pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.home-editorial .header-actions .authSlot {
  min-width: 38px;
  min-height: 38px;
}

.home-editorial .header-actions .authSlot[data-auth-pending]:empty::before {
  width: 38px;
  height: 38px;
}

.avatarWrap {
  position: relative;
}

.avatarBtn {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1.2px solid rgba(79, 195, 247, 0.53);
  border-radius: 50%;
  background: rgba(16, 20, 36, 0.9);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.avatarBtn.isPremium {
  border: 1.8px solid #ffca28;
  box-shadow: 0 0 10px rgba(255, 202, 40, 0.45);
}

.avatarImg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.avatarInitial {
  font-size: 15px;
  font-weight: 800;
  color: #f8fbff;
  line-height: 1;
}

.avatarBadge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffca28;
  border: 1.5px solid #101424;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatarMenu {
  position: fixed;
  top: 0;
  right: 0;
  min-width: 200px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #101424;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  z-index: 10002;
}

.avatarMenu[hidden] {
  display: none;
}

.avatarMenuHead {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 6px;
}

.avatarMenuHead strong {
  color: #f8fbff;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planTag {
  font-size: 12px;
  color: #aeb8ca;
  font-weight: 600;
}

.planTag.gold {
  color: #ffca28;
}

.avatarMenuItem {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #aeb8ca;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.avatarMenuItem:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #f8fbff;
}

.avatarLogout:hover {
  color: #fda4af;
}

/* Home editorial — avatar no header claro */
.home-editorial .header-actions .avatarBtn {
  background: rgba(240, 234, 216, 0.95);
  border-color: var(--border-strong, rgba(45, 41, 38, 0.28));
}

.home-editorial .header-actions .avatarInitial {
  color: var(--ink, #2d2926);
}

.home-editorial .header-actions .avatarBtn.isPremium {
  border-color: #c4a574;
  box-shadow: 0 0 10px rgba(196, 165, 116, 0.35);
}

.home-editorial .header-actions .avatarBadge {
  border-color: #e6dcc3;
}

.home-editorial .header-tools .header-actions {
  gap: 0;
}

.home-editorial .header-tools .avatarBtn {
  width: 38px;
  height: 38px;
}
