/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s ease-out all;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(0.25rem);
}

.modal-content {
  position: relative;
  background: var(--bg-color);
  border-radius: 0.5em;
  box-shadow: 0 0.5em 2em rgba(0, 0, 0, 0.2);
  padding: 1em;
  width: auto;
  min-width: 20em;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5em;
  color: var(--mid-color);
  cursor: pointer;
  padding: 1.5em;
  width: 2em;
  height: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25em;
  transition: 0.2s ease-out all;
}

.modal-close:hover {
  background: var(--bg-highlight-color);
  color: var(--fg-color);
}

.link-preview {
  margin: 0 0 1em 0;
  padding: 0.75em;
  background: var(--bg-highlight-color);
  border-radius: 0.25em;
  font-size: 0.875em;
}

.link-preview strong {
  color: var(--fg-color);
  overflow-wrap: break-word;
}

.modal {
  .field {
    margin: 1em 0 1.5em;
  }

  input[type=submit] {
    margin-bottom: 0.5em;
  }

  label {
    font-size: 0.875em;
    margin: 0 0 0.25em;
  }

  select {
    display: block;
    width: 100%;
    font-size: inherit;
    font-family: inherit;
  }

  .form-actions {
    margin-bottom: 0.5em;
  }
}
