/* Cashback Pro V36.8.43 — theme-matched, fully rounded account name chip.
   The outer .user-pill is the visible frame; the inner trigger stays transparent
   so it cannot create a second, square-looking rectangle inside the pill. */

/* Match the Light-mode capsule geometry in every theme without changing sizing. */
html body header.app-header .header-controls > .user-pill {
  border-radius: 9999px !important;
  background-clip: padding-box !important;
  -webkit-backdrop-filter: blur(16px) saturate(135%) !important;
  backdrop-filter: blur(16px) saturate(135%) !important;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease !important;
}

/* Default dark: retain the navy/indigo header palette, but use the same full pill. */
html body.default-dark-mode header.app-header .header-controls > .user-pill,
html body.theme-default:not(.default-light-mode) header.app-header .header-controls > .user-pill {
  color: #edf4ff !important;
  background: linear-gradient(135deg, rgba(35, 53, 91, .96), rgba(28, 34, 67, .96)) !important;
  border: 1px solid rgba(139, 166, 211, .36) !important;
  box-shadow: 0 3px 12px rgba(4, 12, 31, .20), inset 0 1px 0 rgba(255, 255, 255, .10) !important;
}

/* Halloween: purple night glass with a restrained seasonal violet edge. */
html body.theme-halloween header.app-header .header-controls > .user-pill,
html body.halloween-active header.app-header .header-controls > .user-pill {
  color: #fbf2ff !important;
  background: linear-gradient(135deg, rgba(65, 38, 88, .96), rgba(35, 23, 57, .97)) !important;
  border: 1px solid rgba(201, 151, 255, .48) !important;
  box-shadow: 0 3px 14px rgba(24, 8, 39, .24), inset 0 1px 0 rgba(255, 255, 255, .11) !important;
}

/* Winter: icy blue glass. */
html body.theme-winter header.app-header .header-controls > .user-pill {
  color: #effaff !important;
  background: linear-gradient(135deg, rgba(29, 78, 119, .95), rgba(18, 48, 86, .97)) !important;
  border: 1px solid rgba(141, 228, 255, .48) !important;
  box-shadow: 0 3px 14px rgba(3, 18, 42, .22), inset 0 1px 0 rgba(255, 255, 255, .12) !important;
}

/* Ocean: deep teal glass. */
html body.theme-ocean header.app-header .header-controls > .user-pill {
  color: #eafffd !important;
  background: linear-gradient(135deg, rgba(7, 91, 101, .95), rgba(5, 43, 68, .97)) !important;
  border: 1px solid rgba(85, 244, 229, .43) !important;
  box-shadow: 0 3px 14px rgba(0, 24, 35, .22), inset 0 1px 0 rgba(255, 255, 255, .11) !important;
}

/* Uploaded/custom themes: blend their scene accent into the dark glass base. */
html body[class*="theme-"]:not(.theme-default):not(.theme-halloween):not(.theme-winter):not(.theme-ocean) header.app-header .header-controls > .user-pill {
  color: var(--text-main, #eef4ff) !important;
  background: color-mix(in srgb, var(--scene-accent, #8b82df) 18%, rgba(19, 31, 52, .96)) !important;
  border: 1px solid color-mix(in srgb, var(--scene-accent, #8b82df) 48%, rgba(160, 180, 210, .42)) !important;
  box-shadow: 0 3px 14px rgba(3, 12, 30, .22), inset 0 1px 0 rgba(255, 255, 255, .10) !important;
}

/* The label button itself must not paint its own rectangular surface. */
html body header.app-header .header-controls > .user-pill #user-name-display,
html body header.app-header .header-controls > .user-pill #user-name-display:hover,
html body header.app-header .header-controls > .user-pill #user-name-display:active,
html body header.app-header .header-controls > .user-pill #user-name-display:focus,
html body header.app-header .header-controls > .user-pill #user-name-display:focus-visible {
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 9999px !important;
  box-shadow: none !important;
  outline: 0 !important;
}

/* Preserve a visible keyboard focus indicator, while avoiding sticky touch focus. */
@media (hover: none), (pointer: coarse) {
  html body header.app-header .header-controls > .user-pill #user-name-display:focus:not(:focus-visible) {
    outline: 0 !important;
    box-shadow: none !important;
  }
}
html body header.app-header .header-controls > .user-pill #user-name-display:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--scene-accent, #93b8ef) 76%, white) !important;
  outline-offset: 2px !important;
}
