/* The dialogs also serve narrow desktop windows and embedded browsers where
   device classification is unavailable. Fit their contents to the viewport. */
#auth-menu-trigger-label {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
}

#auth-menu-trigger {
  flex: 0 0 auto;
  width: auto;
  min-width: 72px;
  padding: 0 11px;
}

body.moddio-dialog-open #moddio-menu-actions,
body.auth-dialog-open #moddio-menu-actions {
  display: none !important;
}

#leaderboard-modal .moddio-modal-header h2 {
  flex: 1 1 auto;
  min-width: 0;
  margin-right: 10px;
  font-size: 22px;
  line-height: 1.25;
}

#leaderboard-modal .moddio-close-button {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
}

#feedback-modal .moddio-feedback-form,
#feedback-modal .moddio-feedback-fields,
#feedback-modal .moddio-feedback-categories,
#feedback-modal textarea,
#feedback-modal input {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

#feedback-modal .moddio-feedback-fields,
#feedback-modal .moddio-feedback-categories {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 700px) {
  #leaderboard-modal .moddio-highscore-table {
    table-layout: fixed;
    width: 100%;
    font-size: 13px;
  }

  #leaderboard-modal .moddio-highscore-table th,
  #leaderboard-modal .moddio-highscore-table td {
    padding: 8px 6px;
  }

  #leaderboard-modal .moddio-highscore-table th:first-child {
    width: 28px;
  }

  #leaderboard-modal .moddio-highscore-table th:last-child {
    width: 84px;
  }

  #leaderboard-modal .moddio-highscore-table td:nth-child(2) {
    overflow-wrap: anywhere;
  }

  #leaderboard-modal .moddio-highscore-table td:last-child {
    white-space: nowrap;
  }

  #top-right-auth-region {
    top: 52px;
    right: 10px;
    max-width: calc(100vw - 20px);
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  #modd-shop-modal .moddio-skin-shop-body {
    grid-template-columns: minmax(0, 1fr);
  }

  #modd-shop-modal .moddio-skin-shop-sidebar {
    border-right: 0;
    border-bottom: 1px solid #30373e;
  }

  #modd-shop-modal .moddio-skin-categories {
    display: flex;
    gap: 6px;
    max-width: 100%;
    padding-bottom: 5px;
    overflow-x: auto;
  }

  #modd-shop-modal .moddio-skin-category {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  #modd-shop-modal .moddio-skin-categories > .list-group {
    flex-direction: row;
    gap: 6px;
    width: max-content;
    margin: 0;
  }

  #modd-shop-modal .moddio-skin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }

  #modd-shop-modal .moddio-skin-image {
    max-width: 100%;
  }

  #modd-shop-modal .moddio-skin-details,
  #modd-shop-modal .moddio-skin-action {
    width: 100%;
    min-width: 0;
  }

  #modd-shop-modal .moddio-skin-pagination {
    flex-wrap: wrap;
  }
}
