.modal {
  width: 100%;
  height: 100%;

  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: -webkit-linear-gradient(top, rgba(51, 36, 0, 0.6), rgba(0, 0, 0, 0.6));
  backdrop-filter: blur(12px);

  opacity: 0;
  transition: all 0.25s ease-in-out;
}

.modal.active {
  opacity: 1;
}

.modal__container {
  width: calc(100% - 256px);
  height: calc(100% - 256px);

  background-color: #dddddd;
  border-radius: 16px;
  overflow: hidden;

  display: grid;
  grid-template-rows: auto 1fr;
  box-shadow: rgba(0, 0, 0, 0.56) 0px 22px 70px 4px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  padding: 16px 24px;
  border-bottom: 1px solid #bebebe;
}

.modal-header__title {
  font-size: 24px;
  font-weight: 400;
  color: #000;

  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-header__close {
  width: 100%;
  height: 100%;
  max-width: 48px;

  border-radius: 8px;
  padding: 6px;

  cursor: pointer;
  background: none;
  flex-shrink: 0;

  transition: all 0.15s ease-in-out;
}

.modal-header__close:hover {
  background-color: #dddddd;
}

.modal-header__close:active {
  transform: scale(0.95);
}

.modal-header__close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-content {
  color: #000;
  padding: 36px 24px 16px 24px;
  overflow: auto;
}

.modal-content * {
  margin: 0;
  padding: 0;
}

.modal-content h1 {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.modal-content h2 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
}

.modal-content h3 {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.modal-content h4 {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 0.8rem;
  margin-bottom: 0.5rem;
}

.modal-content p {
  font-size: 16px;
  font-weight: 400;
  margin-bottom: 1rem;
}

.modal-content ul {
  margin-top: 0;
  margin-bottom: 1rem;
  margin-block-start: 1em;
  margin-block-end: 1em;
  padding-inline-start: 40px;
}

.modal-content li {
  margin-bottom: 1rem;
  list-style-type: disc;
}

@media (max-width: 768px) {
  .modal__container {
    width: calc(100% - 128px);
    height: calc(100% - 128px);
  }
}

@media (max-width: 576px) {
  .modal__container {
    width: calc(100% - 32px);
    height: calc(100% - 32px);
  }

  .modal-header__title {
    font-size: 18px;
  }

  .modal-header__close {
    max-width: 36px;

    padding: 4px;
  }
}
