.dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 50;
  min-width: 320px;
  width: 100%;
  max-width: 48rem;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  background-color: var(--color-yellow-100);
  border-width: 1px;
  border-color: var(--color-gray-300);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  border-radius: 0.5rem;

  transition: opacity 0.15s ease-out, transform 0.15s ease-out;

  &::backdrop {
    background-color: var(--color-blue-50);
    opacity: var(--backdrop-opacity, 0.6);
    transition: opacity 0.15s ease-out;
  }
}

.dialog--max-w-xl {
  max-width: 36rem;
}

.dialog--max-w-xs {
  max-width: 20rem;
}

.dialog--sheet {
  position: fixed;
  inset: auto;
  top: auto;
  bottom: 0;
  left: 0;
  transform: translateY(0);
  margin: 0;
  width: 100%;
  min-width: auto;
  max-width: none !important;
  max-height: 100vh;
  padding-top: 0.25rem;
  padding-bottom: 1.5rem;
  background-color: var(--color-white);
  border: none;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  opacity: 1;
  overflow: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dialog--sheet::backdrop {
  background-color: var(--color-blue-50);
  opacity: var(--backdrop-opacity, 0);
  transition: opacity 0.2s ease;
}

.dialog__grabber {
  width: 40px;
  height: 4px;
  background-color: var(--color-gray-300);
  border-radius: 2px;
  margin: 12px auto;
}

.dialog--sheet .overflow-y-auto {
  overscroll-behavior: contain;
}

@starting-style {
  .dialog--sheet {
    opacity: 0;
    transform: translateY(100%);
  }

  .dialog--sheet::backdrop {
    opacity: 0;
  }
}
