/* https://www.w3.org/WAI/WCAG21/Techniques/html/H102  */

:root {
  --primary: #635bff;
  --text: #182230;
  --muted: #667085;
  --border: #e4e7ec;
}

dialog {
  width: min(92vw, 480px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  color: var(--text);
  background: white;
  box-shadow:
    0 24px 80px rgb(16 24 40 / 25%);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    display 180ms allow-discrete,
    overlay 180ms allow-discrete;
}

dialog[open] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

dialog::backdrop {
  background: rgb(15 23 42 / 55%);
  backdrop-filter: blur(1px);
  opacity: 0;
  transition:
    opacity 180ms ease,
    display 180ms allow-discrete,
    overlay 180ms allow-discrete;
}

dialog[open]::backdrop {
  opacity: 1;
}

@starting-style {
  dialog[open] {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }

  dialog[open]::backdrop {
    opacity: 0;
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 20px 20px 10px;
  text-align: center;
}

.modal-title {
  font-size: 1.5rem;
  line-height: 1;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
}

.modal-header .modal-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.close-modal {
  width: 36px;
  height: 36px;
  padding: 0;
  color: #475467;
  background: #f2f4f7;
  font-size: 1.4rem;
  line-height: 36px;
  position: absolute;
  right: 20px;
  top: 15px;
  border: none;
  border-radius: 20px;
}

.close-modal:hover {
  background: #e4e7ec;
}

.modal-body {
  padding: 10px 20px 10px;
  line-height: 1.6;
  .modal-description {
    text-align: center;
  }
}

.modal-description {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  .description_list {
    list-style: none;
    padding: 0; 
    margin: 0;
    li a {
      display: flex;
    }
    .icon {
      display: inline-block;
      float: left;
      padding-right: 10px;
    }
    .txt {
      display: inline-block;
      line-height: 36px;
      font-weight: 500;
    }
  }
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 15px 10px;
  border-top: 1px solid var(--border);
  background: #fcfcfd;
  button {
    width: 50%;
    padding: 10px 10px;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,.3);
    line-height: 1;
    &.primary {
      background-color: #2b732b;
      color: var(--white);
      border-color: #2b732b;
    }
  }
  button.btn-standalone {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    line-height: 1.2;
    font-weight: 600;
    &.primary {
      color : #2b732b;
    }
    &.secondary {
      color: black;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  dialog,
  dialog::backdrop {
    transition: none;
  }
}