/* Модалка юридических документов (копия правил из main.css) для страницы входа и регистрации */
.un_legalModal[hidden] {
  display: none !important;
}

.un_legalModal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.un_legalModal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.un_legalModal-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 62rem);
  max-height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 2rem;
  border-radius: 0.45rem;
  border: 0.05rem solid rgba(226, 178, 57, 0.18);
  background: linear-gradient(180deg, rgba(24, 24, 24, 0.98), rgba(14, 14, 14, 0.98));
  box-shadow: 0 1.25rem 4rem rgba(0, 0, 0, 0.48), inset 0 0.05rem 0 rgba(255, 255, 255, 0.04);
}

.un_legalModal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  border: 0;
  padding: 0;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.un_legalModal-close:hover {
  color: #fff;
}

.un_legalModal-dialog h2 {
  margin: 0 2rem 1rem 0;
  color: #f4ead2;
  font-size: 1.85rem;
  line-height: 1.12;
  font-weight: 700;
}

.un_legalModal-content {
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 0.6rem;
  color: rgba(224, 219, 207, 0.82);
  font-size: 1rem;
  line-height: 1.74;
  word-break: break-word;
}

.un_legalModal-content section,
.un_legalModal-content div,
.un_legalModal-content p,
.un_legalModal-content ul,
.un_legalModal-content li,
.un_legalModal-content h1,
.un_legalModal-content h2 {
  max-width: 100% !important;
}

.un_legalModal-content section {
  margin: 0 auto;
  padding: 0 !important;
  color: inherit !important;
  background: transparent !important;
}

.un_legalModal-content h1 {
  margin: 1.4rem 0 0.7rem;
  color: #f0dec0;
  background: none;
  -webkit-text-fill-color: currentColor;
  filter: none;
  font-size: 1.18rem !important;
  line-height: 1.25;
  text-align: left !important;
}

.un_legalModal-content h1:first-child,
.un_legalModal-content h2:first-child {
  margin-top: 0;
}

.un_legalModal-content h3,
.un_legalModal-content h4 {
  margin: 1.35rem 0 0.72rem;
  color: #e3b45b !important;
  background: none;
  -webkit-text-fill-color: currentColor;
  filter: none;
  text-align: left !important;
  text-wrap: balance;
}

.un_legalModal-content h3 {
  font-size: 1.34rem !important;
  line-height: 1.26;
  font-weight: 700;
}

.un_legalModal-content h4 {
  font-size: 1.12rem !important;
  line-height: 1.42;
  font-weight: 700;
}

.un_legalModal-content p {
  margin: 0 0 0.95rem;
  color: rgba(232, 225, 212, 0.88) !important;
  font-size: 1rem !important;
  line-height: 1.74 !important;
  font-weight: 400;
  text-align: left !important;
}

.un_legalModal-content strong {
  color: #f3e6c2;
  font-weight: 700;
}

.un_legalModal-content .un_legalModal-tocItem,
.un_legalModal-content .un_legalModal-listItem {
  padding-left: 0;
  margin-left: 0;
}

.un_legalModal-content .un_legalModal-tocItem {
  color: rgba(236, 228, 208, 0.82) !important;
  font-size: 1.02rem !important;
  line-height: 1.55 !important;
  font-weight: 700 !important;
}

.un_legalModal-content .un_legalModal-listItem {
  color: rgba(232, 225, 212, 0.88) !important;
  font-weight: 600 !important;
}

.un_legalModal-content hr {
  display: none;
}

.un_legalModal-content a {
  color: #d6a64d !important;
  text-decoration: none;
  border-bottom: 0.05rem solid rgba(214, 166, 77, 0.35);
}

.un_legalModal-content a:hover {
  color: #f3d18b !important;
  border-bottom-color: rgba(243, 209, 139, 0.65);
}


.un_legalModal-content::-webkit-scrollbar {
  width: 0.45rem;
}

.un_legalModal-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(226, 178, 57, 0.32);
}

html.un-legal-modal-open,
body.un-legal-modal-open {
  overflow: hidden !important;
}
