.modal {
  width: min(480px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  overflow-y: auto;
  color: #fff;
  background: #0a2a2d;
  border: 1px solid rgba(215, 225, 90, 0.5);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.modal[open] {
  animation: modal-in 0.25s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.modal__body,
.modal__success {
  padding: 36px 24px 28px;
}

.modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
}

.modal__close::before,
.modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 2px;
  background: #fff;
}

.modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal__close:hover::before,
.modal__close:hover::after {
  background: var(--c-accent);
}

.modal__title {
  padding-right: 24px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.25;
}

.modal__car {
  margin-top: 6px;
  font-weight: 500;
  color: var(--c-accent);
}

.modal__lead {
  margin: 10px 0 20px;
  font-size: 15px;
  font-weight: 300;
  opacity: 0.85;
}

.form {
  display: grid;
  gap: 16px;
}

.form__field {
  display: grid;
  gap: 6px;
}

.form__label {
  font-size: 14px;
  font-weight: 500;
}

.form__input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  font: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
}

.form__input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.form__input:focus {
  border-color: var(--c-accent);
  outline: 0;
}

.form__input.is-invalid {
  border-color: #ff7a7a;
}

.form__error {
  min-height: 0;
  font-size: 13px;
  color: #ff9a9a;
}

.form__check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.4;
  cursor: pointer;
}

.form__checkbox {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--c-accent);
}

.form__checkbox.is-invalid {
  outline: 2px solid #ff7a7a;
  outline-offset: 2px;
}

.form__check-text a {
  text-decoration: underline;
}

.form__check-text a:hover {
  color: var(--c-accent);
}

.form__submit {
  margin-top: 4px;
}

.form__submit:disabled {
  opacity: 0.65;
  cursor: default;
}

.form__error--common {
  text-align: center;
}

.form__error--common:empty {
  display: none;
}

.modal--doc {
  width: min(760px, calc(100% - 32px));
  height: min(720px, calc(100% - 32px));
  overflow: hidden;
}

.modal--doc[open] {
  display: flex;
  flex-direction: column;
}

.modal__doc {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  padding: 36px 24px 28px;
}

.modal__doc-title {
  flex: none;
  padding-right: 32px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.modal__doc-body {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 16px;
  padding-right: 8px;
  overflow-y: auto;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
  scrollbar-width: thin;
}

.modal__doc-body p,
.modal__doc-body ul,
.modal__doc-body ol {
  margin: 0 0 10px;
}

.modal__doc-body ul,
.modal__doc-body ol {
  padding-left: 20px;
}

.modal__doc-body ul {
  list-style: disc;
}

.modal__doc-body ol {
  list-style: decimal;
}

.modal__doc-body li {
  margin-bottom: 4px;
}

.modal__doc-body li p {
  margin-bottom: 4px;
}

.modal__doc-body strong {
  font-weight: 600;
}

@media (min-width: 768px) {
  .modal__doc {
    padding: 40px 36px 32px;
  }

  .modal__doc-title {
    font-size: 24px;
  }

  .modal__doc-body {
    font-size: 14px;
  }
}
