Skip to content

The Open Standard for Generative UI

1.7 KB
Raw Blame
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--openui-overlay);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modal-overlay-in 0.15s ease;
}

@keyframes modal-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-container {
  background: var(--openui-foreground);
  border: 1px solid var(--openui-border-interactive);
  border-radius: 16px;
  box-shadow: var(--openui-shadow-2xl);
  width: min(1400px, 95vw);
  height: 95vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-container-in 0.2s ease;
}

@keyframes modal-container-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-container-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--openui-highlight-subtle);
  border-bottom: 1px solid var(--openui-border-default);
  flex-shrink: 0;
}

.modal-container-body {
  flex: 1;
  overflow: auto;
}

/* ─── Mobile ─────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .modal-container {
    width: 100vw;
    height: 95dvh;
    border-radius: 16px 16px 0 0;
    animation: modal-container-mobile-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

@keyframes modal-container-mobile-in {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}