/* REC0DET — Upgrade in the shared top bar, centred beside RC balance.
 * Reuses #hubUpgradeBtn and the existing verified subscription-tier dialog.
 * Header row 1 (Back/Logout, Team, logo, flag) remains untouched.
 */
html body.recodet-pro #app .topbar.topbarTwoRow {
  position:relative;
}
html body.recodet-pro #app .topbar.topbarTwoRow #hubUpgradeBtn.recodetHeaderUpgrade {
  box-sizing:border-box!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  position:absolute!important;
  left:50%!important;
  bottom:8px!important;
  transform:translateX(-50%)!important;
  width:clamp(150px,19vw,208px)!important;
  min-width:0!important;
  max-width:none!important;
  height:46px!important;
  min-height:46px!important;
  margin:0!important;
  padding:5px 13px!important;
  border:1px solid rgba(255,219,115,.9)!important;
  border-radius:14px!important;
  background:radial-gradient(circle at 25% 20%,rgba(255,233,159,.24),transparent 35%),linear-gradient(105deg,#211504,#48300a 50%,#1b1103)!important;
  box-shadow:inset 0 1px 0 rgba(255,246,191,.32),0 0 17px rgba(239,183,52,.18)!important;
  color:#ffe6a0!important;
  font:900 16px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  letter-spacing:.045em!important;
  white-space:nowrap!important;
  cursor:pointer!important;
  z-index:10!important;
  overflow:hidden!important;
  -webkit-tap-highlight-color:transparent;
}
html body.recodet-pro #app .topbar.topbarTwoRow #hubUpgradeBtn.recodetHeaderUpgrade::before {
  content:"";
  position:absolute;
  inset:0;
  width:45%;
  background:linear-gradient(90deg,transparent,rgba(255,248,186,.12),transparent);
  pointer-events:none;
}
html body.recodet-pro #app .topbar.topbarTwoRow #hubUpgradeBtn .recodetUpgradeMedallion {
  display:grid!important;
  place-items:center!important;
  flex:0 0 27px!important;
  width:27px!important;
  height:27px!important;
  border:1px solid rgba(255,223,142,.7)!important;
  border-radius:50%!important;
  background:radial-gradient(circle at 32% 28%,#fff1ae,#e4b349 48%,#7d5010 95%)!important;
  color:#362104!important;
}
html body.recodet-pro #app .topbar.topbarTwoRow #hubUpgradeBtn .recodetUpgradeMedallion svg {
  display:block!important;
  width:17px!important;
  height:17px!important;
  pointer-events:none!important;
}
html body.recodet-pro #app .topbar.topbarTwoRow #hubUpgradeBtn .recodetUpgradeText {
  position:relative;
  font:inherit!important;
  min-width:0!important;
}
html body.recodet-pro #app .topbar.topbarTwoRow #hubUpgradeBtn:focus-visible {
  outline:2px solid #ffecb3!important;
  outline-offset:2px!important;
}
html body.recodet-pro #app .topbar.topbarTwoRow #hubUpgradeBtn:active {
  filter:brightness(1.12);
}
html body.recodet-pro #app .topbar.topbarTwoRow:not(.recodetHeaderActive) #hubUpgradeBtn.recodetHeaderUpgrade,
html body.recodet-pro #app .topbar.topbarTwoRow #hubUpgradeBtn.recodetHeaderUpgrade[hidden] {
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}
/* With the same Upgrade and Logout buttons moved into the top bar, avoid an
 * empty account-action row taking space above the main hub catalogue. */
#viewMain .hubSignoutRow[aria-label="Account actions"]:not(:has(> button)) {
  display:none!important;
}

@media (max-width:760px) {
  /* Four second-row hit areas: RC | centred Upgrade | Chat | Notifications.
   * Keep the existing 118px header height and every row-one control. */
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #coinPill {
    grid-column:1 / 5!important;
    grid-row:2!important;
    grid-template-columns:28px minmax(0,1fr)!important;
    gap:5px!important;
    padding:3px 5px!important;
  }
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #coinPill .coinIcon {
    width:28px!important;
    min-width:28px!important;
    height:28px!important;
    min-height:28px!important;
  }
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #coinPill .coinIcon svg {
    width:18px!important;
    height:18px!important;
  }
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #coinPill .coinValueWrap {
    min-width:0!important;
    overflow:hidden!important;
  }
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #coinPill .coinValueWrap::before {
    font-size:6px!important;
    letter-spacing:.04em!important;
  }
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #coinPill .coinAmt {
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    font-size:clamp(12px,3.6vw,16px)!important;
  }
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #coinPill .coinOpenArrow {
    display:none!important;
  }
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #hubUpgradeBtn.recodetHeaderUpgrade {
    grid-column:5 / 9!important;
    grid-row:2!important;
    position:relative!important;
    left:auto!important;
    top:auto!important;
    bottom:auto!important;
    right:auto!important;
    inset:auto!important;
    transform:none!important;
    justify-self:stretch!important;
    align-self:center!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:46px!important;
    min-height:46px!important;
    padding:4px 6px!important;
    gap:5px!important;
    font-size:clamp(12px,3.35vw,15px)!important;
    letter-spacing:0!important;
    z-index:10!important;
  }
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #hubUpgradeBtn .recodetUpgradeMedallion {
    flex-basis:22px!important;
    width:22px!important;
    height:22px!important;
  }
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #hubUpgradeBtn .recodetUpgradeMedallion svg {
    width:14px!important;
    height:14px!important;
  }
}
@media (max-width:390px) {
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #hubUpgradeBtn .recodetUpgradeMedallion {
    display:none!important;
  }
  html body.recodet-pro #app .topbar.topbarTwoRow.v78MobileShell #hubUpgradeBtn.recodetHeaderUpgrade {
    padding-inline:3px!important;
    font-size:14px!important;
  }
}

/* V2: keep the label visible. An older floating-button override hid this text. */
html body.recodet-pro #app .topbar.topbarTwoRow.recodetHeaderActive #hubUpgradeBtn.recodetHeaderUpgrade .recodetUpgradeText {
  display:inline-block!important;
  visibility:visible!important;
  opacity:1!important;
  color:#ffe6a0!important;
  text-transform:uppercase!important;
}
html body.recodet-pro #app .topbar.topbarTwoRow.recodetHeaderActive #hubUpgradeBtn.recodetHeaderUpgrade {
  visibility:visible!important;
  pointer-events:auto!important;
}
