/*
  The modal shell: backdrop, panel, close button, and what it says when the
  fragment could not be loaded.

  SHELL ONLY. Everything inside a modal is styled by whoever wrote that
  fragment — these three classes were living in the billing stylesheet, named
  after the one screen that used them, which is how a second dialog would have
  ended up with a second backdrop.

  Colours come from tokens.css like everything else.
*/

.su-modal-backdrop {
  align-items: center;
  background: rgb(0 0 0 / 45%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 60;
}

.su-modal {
  background: var(--su-surface);
  border-radius: var(--su-radius-lg, 1rem);
  box-shadow: 0 20px 60px rgb(0 0 0 / 25%);
  max-height: min(34rem, 88vh);
  max-width: 32rem;
  overflow-y: auto;
  padding: 1.5rem;
  position: relative;
  width: 100%;
}

.su-modal__close {
  background: none;
  border: 0;
  color: var(--su-text-3);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: .25rem .4rem;
  position: absolute;
  right: .75rem;
  top: .75rem;
}

.su-modal__close:hover { color: var(--su-text); }

.su-modal__failed {
  color: var(--su-text-2);
  font-size: .9375rem;
  line-height: 1.5;
  margin: .5rem 1.5rem 0 0;
}
