/* RoomScribe top action safe polish 42J
   CSS-only overrides for the visible top icon row. No app logic changes. */

/* Keep bottom-fixed navigation from covering the last bit of content. */
#rsApp {
  padding-bottom: calc(var(--rs-bottom-nav-total, 82px) + 18px) !important;
}

/* The bottom nav now owns Settings, so remove the duplicate top gear visually only. */
#rsSettingsGearBtn,
.rs-top-actions > #rsSettingsGearBtn,
.rs-settings-gear-btn {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Stable, clean top icon row. */
.rs-top-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  width: auto !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.rs-top-actions > #rsCollabProfileChip,
.rs-top-actions > #rsBillingAccountBtn,
.rs-top-actions > #rsLogoutBtn,
.rs-top-actions > #rsFullscreenBtn {
  position: relative !important;
  flex: 0 0 40px !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  gap: 0 !important;
  border-radius: 999px !important;
  box-sizing: border-box !important;
  font-size: 0 !important;
  line-height: 0 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-indent: 0 !important;
  transform: none !important;
  transition: none !important;
  animation: none !important;
  vertical-align: middle !important;
}

/* Remove old mobile pseudo labels such as Membership / Fullscreen. */
#rsBillingAccountBtn::before,
#rsBillingAccountBtn::after,
#rsFullscreenBtn::before,
#rsFullscreenBtn::after,
#rsCollabProfileChip::before,
#rsCollabProfileChip::after {
  content: "" !important;
  display: none !important;
  visibility: hidden !important;
}

/* Hide any text or profile/email spans without changing the underlying data. */
#rsBillingAccountBtn > :not(.rs-ui-icon),
#rsCollabProfileChip > :not(.rs-ui-icon),
#rsLogoutBtn .rs-top-auth-email,
#rsCollabChipText,
#rsCollabChipText.rs-icon-pass-hidden,
.rs-top-actions .rs-icon-pass-visually-hidden,
.rs-top-actions .rs-icon-pass-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.rs-top-actions > #rsCollabProfileChip > .rs-ui-icon,
.rs-top-actions > #rsBillingAccountBtn > .rs-ui-icon,
.rs-top-actions > #rsLogoutBtn .rs-ui-icon,
.rs-top-actions > #rsFullscreenBtn .rs-ui-icon {
  --rs-icon-size: 21px;
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: var(--rs-icon-size) !important;
  height: var(--rs-icon-size) !important;
  margin: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
}

/* Fullscreen icon: undo the previous absolute label rule so the icon sits inside the button. */
#rsFullscreenBtn.rs-icon-pass-fullscreen,
#rsFullscreenBtn.rs-fullscreen-icon-only,
#rsFullscreenBtn {
  position: relative !important;
  display: inline-grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: #ffffff !important;
}

#rsFullscreenBtn > .rs-fullscreen-label,
#rsFullscreenBtn > .rs-fullscreen-label.rs-icon-pass-label {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  align-items: center !important;
  justify-items: center !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
  border: 0 !important;
  font-size: 0 !important;
  line-height: 0 !important;
  transform: none !important;
}

#rsFullscreenBtn > .rs-fullscreen-label .rs-ui-icon,
#rsFullscreenBtn > .rs-fullscreen-label.rs-icon-pass-label .rs-ui-icon {
  --rs-icon-size: 21px;
  display: block !important;
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  transform: none !important;
}

@media (max-width: 760px) {
  .rs-top-actions {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    width: auto !important;
  }

  .rs-top-actions > #rsCollabProfileChip,
  .rs-top-actions > #rsBillingAccountBtn,
  .rs-top-actions > #rsLogoutBtn,
  .rs-top-actions > #rsFullscreenBtn {
    flex-basis: 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
  }

  .rs-top-actions > #rsCollabProfileChip > .rs-ui-icon,
  .rs-top-actions > #rsBillingAccountBtn > .rs-ui-icon,
  .rs-top-actions > #rsLogoutBtn .rs-ui-icon,
  .rs-top-actions > #rsFullscreenBtn .rs-ui-icon {
    --rs-icon-size: 20px;
  }
}
