.alert-dialog-overlay {
  position: fixed;
  z-index: 50;
  animation-duration: var(--default-transition-duration);
  animation-timing-function: var(--ease-out);
  background-color: rgb(0 0 0 / 50%);
  inset: 0;

  /* State */
  &[data-state="open"] {
    animation-name: var(--animate-in);
  }

  &[data-state="closed"] {
    animation-name: var(--animate-out);
  }
}

.alert-dialog-content {
  display: grid;
  position: fixed;
  z-index: 50;
  top: 50%;
  left: 50%;
  width: 100%;
  max-width: calc(100% - 2rem);
  padding: calc(var(--spacing) * 6);
  transform: translate(-50%, -50%);
  animation-duration: var(--default-transition-duration);
  animation-timing-function: var(--ease-out);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background-color: var(--color-background);
  box-shadow: var(--shadow-lg);
  gap: calc(var(--spacing) * 4);

  /* State */
  &[data-state="open"] {
    animation-name: var(--animate-alert-dialog-in);
  }

  &[data-state="closed"] {
    animation-name: var(--animate-alert-dialog-out);
  }
}

.alert-dialog-header {
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: calc(var(--spacing) * 2);
}

.alert-dialog-footer {
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing) * 2);

  & > button {
    width: 100%;
  }
}

.alert-dialog-title {
  font-size: var(--text-lg);
  line-height: var(--text-lg--line-height);
}

.alert-dialog-description {
  color: var(--color-muted-foreground);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

@media (width >= 640px) {
  .alert-dialog-content {
    max-width: 32rem;
  }

  .alert-dialog-header {
    text-align: start;
  }

  .alert-dialog-footer {
    flex-direction: row;
    justify-content: end;

    & > button {
      width: fit-content;
    }
  }
}
