.ui_modal[hidden] {
  display: none;
}

.ui_modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
}

.ui_modal_backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(3, 7, 12, .76);
  cursor: default;
}

.ui_modal_dialog {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  text-align: left;
}

.ui_modal_close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  padding: 0;
}

.ui_modal_close_icon {
  display: block;
  width: 12px;
  height: 12px;
  background-color: currentColor;
  -webkit-mask: url("../../tournaments/assets/icons/close.svg") center / contain no-repeat;
  mask: url("../../tournaments/assets/icons/close.svg") center / contain no-repeat;
}

.ui_modal_links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 2px;
  font-size: 13px;
}

.ui_modal_form {
  gap: 14px;
}

.ui_modal_field,
.ui_modal_form > label:not(.career_join_acceptance) {
  display: grid;
  gap: 5px;
}

.ui_modal_form .ui_label,
.ui_modal_form label > span:first-child {
  color: var(--ui_color_text_muted);
  font-size: 13px;
  font-weight: 500;
}

.ui_modal_form > .ui_button,
.ui_modal_actions .ui_button {
  min-height: 40px;
}

.ui_modal_actions {
  display: flex;
  gap: 10px;
}

.ui_modal_form > .ui_modal_actions {
  grid-column: 1 / -1;
}

.ui_modal_actions .ui_button {
  flex: 1;
}

.ui_modal_dialog [data_auth_panel] > .ui_button {
  min-height: 40px;
  margin-top: 20px;
}

body.ui_modal_open {
  overflow: hidden;
}

@media (max-width: 899px) {
  .ui_modal {
    padding: 10px;
  }

  body .ui_modal .ui_modal_dialog {
    width: 100%;
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: none;
  }
}
