/* Forum Stage2 Mobile FIX2 + supplied ForumRos SVG.
   Additive to Mobile FIX1. No changes to forum data or destination links. */
html[data-forum-theme] #branding #logo .fr-logo-link {
  display: inline-block !important;
  width: 240px;
  max-width: 100%;
  line-height: 0;
  vertical-align: middle;
}
html[data-forum-theme] #branding #logo .fr-logo-link img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  object-fit: contain;
}
html[data-forum-theme] #branding #logo .fr-logo-dark { display: block !important; }
html[data-forum-theme] #branding #logo .fr-logo-light { display: none !important; }
html[data-forum-theme="light"] #branding #logo .fr-logo-dark { display: none !important; }
html[data-forum-theme="light"] #branding #logo .fr-logo-light { display: block !important; }
html[data-forum-theme] #branding #logo .fr-logo-link:focus-visible,
html[data-forum-theme] #primary_nav > .main_width:focus-visible {
  outline: 2px solid var(--fr-focus);
  outline-offset: 3px;
  border-radius: 6px;
}
/* The welcome text is retained in full, at its existing position. */
html[data-forum-theme] #content .fr-home-welcome {
  margin: 14px 0 !important;
  padding: 14px 16px !important;
  border: 1px solid var(--fr-border-soft);
  border-radius: 11px;
  background: var(--fr-card-soft);
  color: var(--fr-text) !important;
  font: 400 13px/1.65 system-ui,-apple-system,"Segoe UI",Arial,sans-serif;
  overflow-wrap: break-word;
  white-space: pre-line;
}
html[data-forum-theme] #content ol.breadcrumb.bottom {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px 16px;
  width: 100%;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  list-style: none;
}
html[data-forum-theme] #content ol.breadcrumb.bottom > li {
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
html[data-forum-theme] #content ol.breadcrumb.bottom > li > a { display: inline-block; line-height: 1.5; }
/* Use a CSS chevron rather than the low-contrast legacy bitmap. */
html[data-forum-theme] #footer_utilities #backtotop {
  position: static !important;
  left: auto !important;
  right: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 44px !important;
  height: 44px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  background: var(--fr-card) !important;
  border: 1px solid var(--fr-border) !important;
  color: var(--fr-text) !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
html[data-forum-theme] #footer_utilities #backtotop img { display: none !important; }
html[data-forum-theme] #footer_utilities #backtotop::before {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}
html[data-forum-theme] #footer_utilities #backtotop:hover { background: var(--fr-hover) !important; }
html[data-forum-theme] #footer_utilities #backtotop:focus-visible { outline: 2px solid var(--fr-focus) !important; outline-offset: 3px; }
@media (max-width: 760px) {
  html[data-forum-theme] #branding #logo .fr-logo-link { width: 200px; }
  html.fr-account-ready[data-forum-theme] #header_bar #user_navigation {
    height: auto !important;
    min-height: 0 !important;
    max-height: 70vh;
    max-height: min(70dvh, 440px);
    overflow-x: hidden;
    padding: 10px !important;
  }
  html.fr-account-ready[data-forum-theme] #header_bar #user_navigation ul.ipsList_inline {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  html.fr-account-ready[data-forum-theme] #header_bar #user_navigation ul.ipsList_inline > li {
    grid-column: 1 / -1 !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 0 !important; /* Neutralize legacy &nbsp; before the login link, not its label. */
    line-height: 0;
    text-shadow: none !important;
  }
  html.fr-account-ready[data-forum-theme] #header_bar #user_navigation .services { display: none !important; }
  html.fr-account-ready[data-forum-theme] #header_bar #user_navigation ul.ipsList_inline > li > a {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 11px 13px !important;
    border: 1px solid var(--fr-border-soft) !important;
    border-radius: 9px !important;
    background: var(--fr-card-soft) !important;
    color: var(--fr-text) !important;
    font: 500 13px/1.45 system-ui,-apple-system,"Segoe UI",Arial,sans-serif !important;
    text-decoration: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
  html.fr-account-ready[data-forum-theme] #header_bar #user_navigation ul.ipsList_inline > li > a:hover {
    background: var(--fr-hover) !important;
    border-color: var(--fr-border) !important;
  }
  html.fr-account-ready[data-forum-theme] #header_bar #user_navigation ul.ipsList_inline > li > a:active { background: var(--fr-card-raised) !important; }
  html.fr-account-ready[data-forum-theme] #header_bar #user_navigation ul.ipsList_inline > li > a:focus-visible { outline: 2px solid var(--fr-focus); outline-offset: -3px; }
  /* Only the menu strip scrolls horizontally; touch and keyboard remain available. */
  html[data-forum-theme] #primary_nav > .main_width {
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none;
    scroll-padding-inline: 3px;
    padding-top: 2px;
    padding-bottom: 2px;
  }
  html[data-forum-theme] #primary_nav > .main_width::-webkit-scrollbar { display: none; height: 0; }
  html[data-forum-theme] #primary_nav #community_app_menu { padding: 0 3px !important; }
  html[data-forum-theme] #primary_nav #community_app_menu > li > a:focus-visible { outline: 2px solid var(--fr-focus); outline-offset: -3px; }
  html[data-forum-theme] #content .fr-home-welcome { padding: 12px 13px !important; font-size: 12px; line-height: 1.6; }
  html[data-forum-theme] #content ol.breadcrumb.bottom { justify-content: center; gap: 8px 14px; }
  html[data-forum-theme] #content ol.breadcrumb.bottom > li > a { padding: 5px 0; }
}
