
/* Version switch: floating on login, normal scrollable footer item in room. */
.xc-version-switch { border: 0; border-radius: 0; background: rgba(2,4,54,.86); color: #9fc4ef; font: 11px Arial,sans-serif; cursor: pointer; }
body > .xc-version-switch { position: fixed; right: 8px; bottom: 6px; z-index: 2147483000; padding: 3px 6px; margin: 0; line-height: 16px; opacity: .82; }
.xc-footer-menu .xc-version-switch { border: 0 !important; background: transparent; font: inherit; color: inherit; }

@media (max-width: 700px) { .xsf-footer-item { min-height: 28px; display: inline-flex; align-items: center; } }

/*
 Architecture V2 restoration: authoritative component geometry. Responsive/state rules are kept in original cascade order.
 */

/*
 * XCHAT FOOTER OWNER V5
 *
 * Footer internal geometry and presentation in all classic layouts.
 * Tablet: footer content is placed in its own top grid track.
 * Room grid placement is owned by bottom-layout.css.
 */

.xc-footer-menu #xchatStableFooter .xsf-footer-item {
  line-height: normal !important;
}


/*
 * XCHAT_TABLET_FOOTER_TRACK_CENTER_V3
 *
 * Classic XChat footer:
 * compact single row, vertically centered links.
 * No offsets or transforms.
 */

/*
 * XCHAT_DESKTOP_CLASSIC_FOOTER_FINAL_V1
 * Center footer links vertically within the bottom strip.
 * Desktop only. No transforms or positional offsets.
 */

.xc-footer-menu {
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.xc-footer-menu label {
  display: flex;
  align-items: center;
  gap: 3px;
}

.xc-footer-menu input {
  width: 13px;
  height: 13px;
}

.xc-footer-menu::before,
.xc-footer-menu::after {
  display: none !important;
}

.xc-footer-menu > #xchatStableFooter.xsf-footer-links {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 12px !important;
  width: max-content;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.xc-footer-menu #xchatStableFooter .xsf-footer-item {
  display: inline-flex !important;
  align-items: center !important;
  flex: 0 0 auto !important;
  white-space: nowrap;
  margin: 0 !important;
  padding: 0 !important;
  height: auto !important;
  min-height: 0 !important;
}

.xc-footer-menu #xchatStableFooter label.xsf-footer-item {
  gap: 3px;
}

.xc-footer-menu #xchatStableFooter input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0 3px 0 0;
}

@media (min-width: 701px) and (max-width: 1024px) {

  .xc-footer-menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    margin: 0 !important;

    box-sizing: border-box !important;
  }

  .xc-footer-menu > #xchatStableFooter.xsf-footer-links {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
  }

  .xc-footer-menu #xchatStableFooter .xsf-footer-item {
    display: inline-flex !important;
    align-items: center !important;
    align-self: center !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
  }
}

@media (min-width: 1025px) {

  .xc-footer-menu > #xchatStableFooter.xsf-footer-links {
    align-self: center !important;
    margin-block: auto !important;
  }

  .xc-footer-menu #xchatStableFooter .xsf-footer-item {
    align-self: center !important;
    height: auto !important;
    min-height: 0 !important;
  }
}

@media (max-width: 1024px) {

  .xc-footer-menu {

    position: static !important;
    inset: auto !important;
    transform: none !important;
    height: auto !important;

    margin: 0 !important;
  }
}

@media (max-width: 700px) {

  .xc-footer-menu {
    min-height: 30px !important;

    padding:
      3px
      6px
      max(3px, env(safe-area-inset-bottom))
      !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    white-space: nowrap;

    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .xc-footer-menu::-webkit-scrollbar {
    display: none;
  }

  .xc-footer-menu
  #xchatStableFooter.xsf-footer-links {
    display: flex !important;

    align-items: center !important;

    flex-wrap: nowrap !important;

    justify-content: flex-start !important;

    width: max-content !important;
    min-width: 100% !important;

    gap: 8px !important;
  }

  .xc-footer-menu
  .xsf-footer-item {
    display: inline-flex !important;

    align-items: center !important;

    flex: 0 0 auto !important;

    min-height: 22px !important;
  }
}

@media (min-width: 701px) and (max-width: 1024px) {
  .xc-footer-menu {
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;

    padding: 0 6px !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;
  }
}

@media (max-width: 700px) {
  html.xc-smile-sheet-open
  .xc-footer-menu {
    display:
      none !important;
  }
}

@media (min-width: 701px) and (max-width: 1024px) {
  html.xc-phone-landscape
  .xc-footer-menu {
    min-height:
      24px !important;

    padding:
      1px
      max(
        5px,
        env(safe-area-inset-right)
      )
      max(
        1px,
        env(safe-area-inset-bottom)
      )
      max(
        5px,
        env(safe-area-inset-left)
      )
      !important;

    overflow-x:
      auto !important;

    overflow-y:
      hidden !important;

    white-space:
      nowrap !important;

    scrollbar-width:
      none;
  }


  html.xc-phone-landscape
  .xc-footer-menu
  #xchatStableFooter.xsf-footer-links {
    display:
      flex !important;

    flex-wrap:
      nowrap !important;

    align-items:
      center !important;

    width:
      max-content !important;

    min-width:
      100% !important;

    gap:
      7px !important;
  }


  html.xc-phone-landscape
  .xc-footer-menu
  .xsf-footer-item {
    flex:
      0 0 auto !important;

    min-height:
      19px !important;
  }
  html.xc-phone-landscape
  .xsf-mail-landscape {
    display:
      inline-flex !important;

    align-items:
      center !important;
  }
}

@media (max-width: 700px) {

  html.xc-mobile-keyboard-open
  .xc-footer-menu {
    display:
      none !important;
  }
}

@media (min-width: 701px) and (max-width: 1024px) {

  html.xc-phone-landscape.xc-smile-sheet-open
  .xc-footer-menu {
    display:
      none !important;
  }
}

@media (max-width: 700px) {
  .xc-room-frame > .xc-footer-menu {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 6px !important;
    box-sizing: border-box !important;
  }

  .xc-room-frame > .xc-footer-menu
  > #xchatStableFooter.xsf-footer-links {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .xc-room-frame > .xc-footer-menu
  #xchatStableFooter .xsf-footer-item {
    display: inline-flex !important;
    align-items: center !important;
    align-self: center !important;
    height: auto !important;
    min-height: 0 !important;
    margin-block: 0 !important;
  }

  html.xc-mobile-keyboard-open
  .xc-room-frame > .xc-footer-menu {
    display: none !important;
  }
  .xc-room-frame > .xc-footer-menu {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-inline: 8px !important;
    touch-action: pan-x;
  }
  .xc-room-frame > .xc-footer-menu::-webkit-scrollbar { display: none; }
  .xc-room-frame > .xc-footer-menu > #xchatStableFooter.xsf-footer-links {
    flex: 0 0 max-content !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    flex-wrap: nowrap !important;
    gap: 9px !important;
    justify-content: flex-start !important;
  }
  .xc-room-frame > .xc-footer-menu #xchatStableFooter .xsf-footer-item {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    min-height: 20px !important;
    max-width: none !important;
    text-overflow: clip !important;
  }
}

@media (min-width: 1025px) {

  .xc-footer-menu {
    height: 34px !important;
    min-height: 34px !important;
    box-sizing: border-box !important;

    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 6px 0 34px !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .xc-footer-menu > #xchatStableFooter.xsf-footer-links {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .xc-footer-menu .xsf-footer-item {
    display: inline-flex !important;
    align-items: center !important;
    align-self: center !important;
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .xc-footer-menu input[type="checkbox"] {
    margin: 0 3px 0 0 !important;
  }

  /* Desktop version link: beneath the right users column. */
  .xc-footer-menu #xchatStableFooter button.xc-version-switch {
    margin-left: auto !important;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    color: #9fc4ef;
    font: 11px Arial, sans-serif;
    line-height: 16px;
    padding: 0 !important;
    cursor: pointer;
    text-decoration: none;
  }

  /* XCHAT_SWITCH_HOVER_UNDERLINE_R4 */
  .xc-footer-menu #xchatStableFooter button.xc-version-switch:hover {
    text-decoration: underline;
  }
}

.xsf-mail-landscape {
  display: none !important;
}
