.drawer-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);
  }
}

.drawer-content {
  display: flex;
  position: fixed;
  z-index: 50;
  flex-direction: column;
  height: auto;
  background-color: var(--color-background);

  & > div:first-child {
    display: none;
    flex-shrink: 0;
    width: 100px;
    height: calc(var(--spacing) * 2);
    margin-block-start: calc(var(--spacing) * 4);
    margin-inline: auto;
    border-radius: var(--radius-rounded);
    background-color: var(--color-muted);
  }

  .drawer-header {
    display: flex;
    gap: var(--spacing);
    flex-direction: column;
    padding: calc(var(--spacing) * 4);
  }

  /* Direction */
  &[data-vaul-drawer-direction="top"] {
    max-height: 80vh;
    inset-inline: 0;
    inset-block-start: 0;
    margin-block-end: calc(var(--spacing) * 24);
    border-block-end: 1px solid var(--color-border);
    border-end-end-radius: var(--radius-lg);
    border-end-start-radius: var(--radius-lg);

    .drawer-header {
      text-align: center;
    }
  }

  &[data-vaul-drawer-direction="bottom"] {
    max-height: 80vh;
    inset-inline: 0;
    inset-block-end: 0;
    margin-block-start: calc(var(--spacing) * 24);
    border-block-start: 1px solid var(--color-border);
    border-start-end-radius: var(--radius-lg);
    border-start-start-radius: var(--radius-lg);

    & > div:first-child {
      display: block;
    }

    .drawer-header {
      text-align: center;
    }
  }

  &[data-vaul-drawer-direction="right"] {
    width: 75%;
    inset-block: 0;
    inset-inline-end: 0;
    border-inline-start: 1px solid var(--color-border);
  }

  &[data-vaul-drawer-direction="left"] {
    width: 75%;
    inset-block: 0;
    inset-inline-start: 0;
    border-inline-end: 1px solid var(--color-border);
  }

  .drawer-footer {
    display: flex;
    flex-direction: column;
    margin-block-start: auto;
    padding: calc(var(--spacing) * 2);
    gap: calc(var(--spacing) * 2);
  }

  .drawer-title {
    color: var(--color-foreground);
    font-weight: var(--font-weight-semibold);
  }

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

@media (width >= 768px) {
  .drawer-content {
    .drawer-header {
      text-align: start;
      gap: calc(var(--spacing) * 1.5);
    }
  }
}

@media (width >= 640px) {
  .drawer-content {
    &[data-vaul-drawer-direction="right"],
    &[data-vaul-drawer-direction="left"] {
      max-width: 24rem;
    }
  }
}
