/* A single cache-safe header widget for guests and signed-in readers. */
.rg-personal-header {
  --rgh-purple: #943eaa;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  z-index: 40;
}
.rg-personal-header__control { position: relative; display: flex; align-items: center; }
.rg-personal-header__button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  color: #fff;
  font: inherit;
  cursor: pointer;
  vertical-align: middle;
}
.rg-personal-header__button:hover, .rg-personal-header__button[aria-expanded="true"] {
  background: rgba(255,255,255,.16);
}
.rg-personal-header__button:focus-visible,
.rg-personal-header__panel :is(a,button):focus-visible {
  outline: 2px solid #d6a2e6;
  outline-offset: 3px;
}
.rg-personal-header__bell-icon, .rg-personal-header__user-icon {
  display: block;
  width: 21px;
  height: 21px;
  background: currentColor;
  -webkit-mask: url('../icons/notify-bell.svg') center / contain no-repeat;
  mask: url('../icons/notify-bell.svg') center / contain no-repeat;
}
.rg-personal-header__user-icon {
  -webkit-mask-image: url('../icons/header-person.svg');
  mask-image: url('../icons/header-person.svg');
}
.rg-personal-header__account-glyph { display: inline-flex; align-items: center; justify-content: center; }
.rg-personal-header__avatar,.rg-personal-header__initial {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  aspect-ratio: 1;
  flex: 0 0 27px;
}
.rg-personal-header__avatar { display: block; object-fit: cover; }
.rg-personal-header__initial {
  background: linear-gradient(135deg,#f5dcfa,#d8b8ec);
  color: #793891;
  font-size: 15px;
  font-weight: 800;
}
.rg-personal-header__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  height: 18px;
  min-width: 18px;
  padding: 0 4px;
  border-radius: 10px;
  background: #a444b8;
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  font-weight: 800;
}
.rg-personal-header__badge[hidden],.rg-personal-header__panel[hidden],
.rg-personal-header__identity[hidden],.rg-personal-header__panel-total[hidden] { display: none !important; }
.rg-personal-header__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(350px,calc(100vw - 24px));
  padding: 14px;
  border: 1px solid #eadfed;
  border-radius: 15px;
  background: #fff;
  color: #292431;
  box-shadow: 0 15px 40px rgba(25,15,33,.18);
  z-index: 10000;
}
.rg-personal-header__panel--bell { right: -45px; }
.rg-personal-header__panel--account { width: min(275px,calc(100vw - 24px)); }
.rg-personal-header__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 7px 12px;
  margin-bottom: 6px;
  font-size: 14px;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #f0e7f2;
}
.rg-personal-header__identity .rg-personal-header__avatar,
.rg-personal-header__identity .rg-personal-header__initial { width: 32px; height: 32px; flex-basis: 32px; }
.rg-personal-header__links { display: grid; gap: 3px; }
.rg-personal-header__links a {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  text-decoration: none;
  color: #302a36;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.rg-personal-header__links a:hover { color: #8c389e; background: #f7edf8; }
.rg-personal-header__links .rg-personal-header__my-link { color: #8c389e; font-weight: 750; }
.rg-personal-header__panel-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.rg-personal-header__panel-heading strong { color: #292431; font-size: 16px; }
.rg-personal-header__panel-total {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  min-width: 24px;
  line-height: 1;
  border-radius: 50%;
  background: #f3e6f7;
  color: #8a3ba1;
  padding: 0;
  font-size: 12px;
  font-weight: 750;
}
.rg-personal-header__panel-total.is-multi { width: auto; border-radius: 999px; padding-inline: 7px; }
.rg-personal-header__counts { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.rg-personal-header__counts span {
  border-radius: 8px;
  background: #f8f3fa;
  padding: 5px 8px;
  font-size: 11px;
  color: #76677b;
}
.rg-personal-header__items {
  display: grid;
  gap: 6px;
  max-height: 350px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #ddc6e7 transparent;
}
.rg-personal-header__items::-webkit-scrollbar { width: 5px; }
.rg-personal-header__items::-webkit-scrollbar-track { background: transparent; }
.rg-personal-header__items::-webkit-scrollbar-thumb {
  background: #ddc6e7;
  border-radius: 99px;
}
.rg-personal-header__items::-webkit-scrollbar-thumb:hover { background: #b995cd; }
.rg-personal-header__items::-webkit-scrollbar-button { display: none; }
.rg-personal-header__status { margin: 12px 2px; color: #786e7c; font-size: 13px; }
.rg-personal-header__preview-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #f0eaf2;
}
.rg-personal-header__preview-item.is-unread { background: #fdf7ff; border-color: #ebd2f1; }
.rg-personal-header__preview-icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f3e6f8;
  color: #9344a5;
}
.rg-personal-header__preview-icon::before {
  content: '';
  width: 17px;
  height: 17px;
  background: currentColor;
  -webkit-mask: url('../icons/notify-bell.svg') center / contain no-repeat;
  mask: url('../icons/notify-bell.svg') center / contain no-repeat;
}
.rg-personal-header__preview-icon--achievement::before { -webkit-mask-image: url('../icons/notify-trophy.svg'); mask-image: url('../icons/notify-trophy.svg'); }
.rg-personal-header__preview-icon--comment::before { -webkit-mask-image: url('../icons/notify-message.svg'); mask-image: url('../icons/notify-message.svg'); }
.rg-personal-header__preview-icon--rank::before { -webkit-mask-image: url('../icons/notify-crown.svg'); mask-image: url('../icons/notify-crown.svg'); }
.rg-personal-header__preview-icon--schedule::before { -webkit-mask-image: url('../icons/notify-scroll.svg'); mask-image: url('../icons/notify-scroll.svg'); }
.rg-personal-header__preview-icon--promocode::before { -webkit-mask-image: url('../icons/notify-gift.svg'); mask-image: url('../icons/notify-gift.svg'); }
.rg-personal-header__preview-icon--event::before { -webkit-mask-image: url('../icons/notify-calendar.svg'); mask-image: url('../icons/notify-calendar.svg'); }
.rg-personal-header__preview-icon--personal { color: #7654ac; background: #ece5fa; }
.rg-personal-header__preview-icon--event { color: #4d9477; background: #e8f5ed; }
.rg-personal-header__preview-icon--promocode { color: #b77e32; background: #fff1dc; }
.rg-personal-header__preview-content { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rg-personal-header__preview-meta { display: block; font-size: 11px; color: #8c8191; margin-bottom: 3px; }
.rg-personal-header__preview-title {
  display: block;
  font-size: 13px;
  color: #302638;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}
.rg-personal-header__preview-title[href]:hover { color: #9337a8; text-decoration: underline; }
.rg-personal-header__preview-read {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: -3px -3px 0 0;
  border: 1px solid #ead6ef;
  border-radius: 9px;
  background: #fff;
  color: #9351aa;
  font: inherit;
  cursor: pointer;
}
.rg-personal-header__preview-read::before {
  content: '✓';
  display: block;
  font-size: 16px;
  line-height: 1;
  font-weight: 800;
}
.rg-personal-header__preview-read:hover { background: #f4e7f9; color: #793791; }
.rg-personal-header__preview-read:disabled { opacity: .5; cursor: wait; }
.rg-personal-header__preview-read[hidden] { display: none; }
.rg-personal-header__status--error { color: #ad3d55; }

.rg-personal-header__all-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f7eafb;
  color: #8d3ba1;
  text-decoration: none;
  font-size: 13px;
  font-weight: 750;
}
.rg-personal-header__all-link:hover { background: #edddf4; color: #732b89; }
@media (max-width:767px) {
  /* Fixed dropdowns stay inside the viewport even if search is to our right. */
  .rg-personal-header__panel {
    position: fixed;
    top: var(--rgh-mobile-top, 64px);
    right: 10px;
    max-height: calc(100dvh - var(--rgh-mobile-top, 64px) - 10px);
    overflow-y: auto;
  }
  .rg-personal-header__panel--bell { right: 10px; }
  .rg-personal-header { gap: 5px; }
  .rg-personal-header__button { width: 36px; height: 36px; }
  .rg-personal-header__items { scrollbar-width: none; padding-right: 0; }
  .rg-personal-header__items::-webkit-scrollbar { display: none; width: 0; }
  .rg-personal-header__preview-read { min-width: 34px; min-height: 34px; flex-basis: 34px; }
  .rg-personal-header__panel { width: min(350px,calc(100vw - 16px)); }
  .rg-personal-header__panel--account { width: min(275px,calc(100vw - 16px)); }
}
