/* Store Kick account chrome (shared with MatrixV2) */

.store-user-chrome {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  min-width: 0;
}

.store-user-chrome[data-auth="pending"] {
  min-width: 2.5rem;
  min-height: 2.5rem;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.user-menu-wrap {
  position: relative;
}

.user-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.55rem 0.3rem 0.3rem;
  border-radius: 999px;
  border: 1px solid var(--border-purple-soft);
  background: rgba(155, 138, 251, 0.1);
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
  max-width: min(260px, 52vw);
  min-width: 0;
  min-height: 44px;
  transition: var(--transition);
}

.user-menu-btn:hover,
.user-menu-btn[aria-expanded="true"] {
  border-color: var(--purple);
  background: rgba(124, 92, 252, 0.18);
}

.user-menu-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.28rem;
  min-width: 0;
  line-height: 1.15;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: rgba(124, 92, 252, 0.25);
}

.nav-avatar-fallback {
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}

.nav-username {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 600;
  max-width: 100%;
}

.nav-points {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.05rem;
  padding: 0.12rem 0.45rem 0.12rem 0.35rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 231, 1, 0.4);
  background: rgba(0, 231, 1, 0.1);
  color: #d4ffe0;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
}

.nav-points-icon {
  font-size: 0.62rem;
  opacity: 0.95;
}

.user-menu-caret {
  flex-shrink: 0;
  opacity: 0.7;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  width: max-content;
  min-width: 200px;
  max-width: min(280px, calc(100vw - 1.5rem));
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-purple);
  background: rgba(14, 14, 20, 0.96);
  box-shadow: var(--panel-shadow);
  z-index: 50;
  display: grid;
  gap: 0.15rem;
}

.user-menu-dropdown a,
.user-menu-dropdown button {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  min-height: 42px;
}

.user-menu-dropdown a:hover,
.user-menu-dropdown button:hover {
  background: rgba(124, 92, 252, 0.18);
}

.user-menu-summary {
  padding: 0.55rem 0.75rem 0.7rem;
  margin-bottom: 0.2rem;
  border-bottom: 1px solid var(--border-purple-soft);
}

.user-menu-summary-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.92rem;
}

.user-menu-summary-pts {
  margin: 0.2rem 0 0;
  color: #d4ffe0;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.user-menu-summary-breakdown {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.35;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.user-menu-summary-pts .nav-points-icon,
.user-menu-summary-breakdown .nav-points-icon {
  font-size: 0.62rem;
}

/* Legacy standalone chip (profile page etc.) */
.points-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 231, 1, 0.1);
  border: 1px solid rgba(0, 231, 1, 0.35);
  color: #d4ffe0;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}
.profile-points-breakdown {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.85rem;
}
@media (max-width: 520px) {
  .profile-points-breakdown {
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* Notifications bell */
.notif-mount {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.notif-wrap {
  position: relative;
}

.notif-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border-purple-soft);
  background: rgba(155, 138, 251, 0.1);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font: inherit;
  padding: 0;
}

.notif-bell:hover,
.notif-bell[aria-expanded="true"] {
  color: #fff;
  border-color: var(--purple);
  background: rgba(124, 92, 252, 0.2);
}

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 999px;
  background: var(--danger, #ff6b8a);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  box-sizing: border-box;
  width: min(360px, calc(100% - 1.5rem));
  max-width: min(360px, calc(100dvw - 1.5rem));
  max-height: min(70vh, 480px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md, 10px);
  border: 1px solid var(--border-purple);
  background: rgba(14, 14, 20, 0.98);
  box-shadow: var(--panel-shadow);
  z-index: 1300;
  overflow: hidden;
}
.notif-panel-portal {
  position: fixed;
  z-index: 4000;
  top: 5.5rem;
  right: 12px;
}

.notif-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-purple-soft);
  flex-shrink: 0;
  min-width: 0;
}

.notif-panel-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notif-panel-head .notif-mark-all,
.notif-panel-head .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--border-purple);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.notif-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(22rem, 50vh);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0.4rem;
}

.notif-empty {
  margin: 0;
  padding: 1rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
}

.notif-guest-cta {
  display: inline-flex;
  margin: 0.5rem auto 0.75rem;
}

.notif-item {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  text-align: left;
  padding: 0.7rem 0.75rem;
  border: 0;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
}

.notif-item:hover {
  background: rgba(124, 92, 252, 0.12);
}

.notif-item.unread {
  background: rgba(124, 92, 252, 0.1);
}

.notif-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.25rem;
  min-width: 0;
}

.notif-type {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple-light, #b8a9ff);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notif-when {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.notif-title {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  overflow-wrap: anywhere;
}

.notif-body {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .notif-panel.notif-panel-portal {
    left: max(0.75rem, env(safe-area-inset-left, 0px)) !important;
    right: max(0.75rem, env(safe-area-inset-right, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    transform: none !important;
    margin-left: auto;
    margin-right: auto;
    top: 5.5rem;
    max-height: min(70dvh, calc(100dvh - 6.5rem));
  }
  .notif-panel-body {
    max-height: none;
  }
  .notif-panel-head {
    flex-wrap: wrap;
  }
}

@media (max-width: 900px) {
  .user-menu-btn {
    max-width: min(180px, 48vw);
  }
}

@media (max-width: 520px) {
  .nav-username {
    display: none;
  }
  .user-menu-meta {
    align-items: center;
  }
}
