.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 0.75rem;
}

.demo-modal[hidden] {
  display: none;
}

.demo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}

.demo-modal-dialog {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(98vw, 64rem);
  max-height: 92vh;
  border: 1px solid var(--demo-line);
  border-radius: var(--demo-radius-xl);
  background: var(--demo-bg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.demo-modal-close {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--demo-line);
  border-radius: 50%;
  background: color-mix(in oklab, var(--demo-surface), transparent 10%);
  color: var(--demo-text);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.demo-modal-close:hover {
  background: var(--demo-surface-2);
}

.demo-modal-frame {
  display: block;
  width: 100%;
  height: min(88vh, 48rem);
  border: 0;
  background: #fff;
}
