/*******************************
 Notice Modal
 ******************************/

body:has(dialog.notice-modal[open]) {
  overflow: hidden;
}

.notice-modal {
  position: fixed;
  background-color: transparent;

  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  z-index: 1;

  transition: overlay 250ms allow-discrete;
  animation: close 250ms forwards;
}

.notice-modal::backdrop {
  background-color: rgb(var(--mineral-container-inverse));
  opacity: 0.8;
}

.notice-modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;

  animation: open 250ms forwards;
}

@keyframes open {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes close {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.notice-modal-wrapper {
  background-color: rgb(var(--light-container-primary));
  max-width: min(646px, calc(100% - (2 * var(--bleed))));
}

.notice-modal-header {
  background: no-repeat url("/images/CountryModal.png");
  display: flex;
  justify-content: flex-end;
  height: 188px;
}

.notice-modal-header button {
  padding: 0.5rem;
  margin: 2rem;
  outline: none;
}

.notice-modal-header button .svg {
  width: 1.5rem;
  height: 1.5rem;
}

.notice-modal-header button:focus-visible .svg {
  outline: auto;
  outline-offset: 0.5rem;
}

.notice-modal-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 2rem;
}

.notice-modal-content button {
  align-self: flex-start;
}

.notice-modal-title {
  display: flex;
  justify-content: space-between;
}

.notice-modal-terms {
  border-width: var(--border-width);
  border-color: rgb(var(--light-border-default));
  border-radius: var(--border-radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (max-width: 38rem) {
  .notice-modal-content div:first-of-type {
    font-size: 1.7rem;
  }

  .notice-modal-wrapper {
    position: absolute;
    top: 0;
  }
}

@media (max-width: 32rem) {
  .notice-modal-wrapper {
    max-width: min(646px, calc(100% - (2 * 0.75rem)));
  }
}
