.sidebar--main-container {
  position: fixed;
  right: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background-color: white;
  border-left: solid 1px var(--border-subtle);
  padding: 2rem;
  transition: width 0.3s ease-in-out;
  z-index: 2;

  &[data-hidden="true"] {
    width: var(--sidebar-closed-width);
    padding: 0;

    .sidebar--title-container,
    .sidebar--content-container {
      display: none;
    }
  }

  &[data-opening="true"] {
    width: var(--sidebar-width);
  }

  @media screen and (max-width: 768px) {
    height: calc(100dvh - var(--mobile-navbar-height) - env(safe-area-inset-bottom));
    z-index: 10000;
    overflow-y: auto;
  }
}

.sidebar--title-text-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
}

.sidebar--title-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
}

.sidebar--title-text {
  font-size: var(--rem-17);
  font-variation-settings: "wght" var(--text-semibold);
  color: var(--text-heading);
}

.sidebar--title-text-secondary {
  font-size: var(--rem-14);
  color: var(--text-information);
}

.sidebar--close-button {
  width: 2.5rem;
  height: 2.5rem;
  position: absolute;
  top: .5rem;
  left: -2.5rem;
  padding: 0.25rem;
  background-color: white;
  border-radius: var(--radius-md);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-left: solid 1px var(--neutral-100);
  border-top: solid 1px var(--neutral-100);
  border-bottom: solid 1px var(--neutral-100);
  border-right: none;
  cursor: pointer;
}

.sidebar--section-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: -0.25rem;

  h3 {
    font-size: var(--rem-15);
    font-variation-settings: "wght" var(--text-medium);
    color: var(--text-heading);
  }
}

.sidebar--divider {
  width: 100%;
  height: 1px;
  background-color: var(--border-secondary);
  margin: 1.5rem 0;
}

.sidebar--toggle-button {
  min-width: 2rem;
  width: 2rem;
  height: 2rem;
  background-color: transparent;
  border-radius: var(--radius-sm);
  border: solid 1px var(--border-secondary);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;

  &[data-sidebar-open="true"] {
    background-color: var(--surface-disabled);
  }

  * {
    pointer-events: none;
  }
}

.sidebar--mobile-close-button {
  display: none;

  @media screen and (max-width: 768px) {
    display: block;
    position: absolute;
    right: 1rem;
    top: 1rem;
  }
}

.sidebar--header-title {
  font-size: var(--rem-17);
  line-height: var(--rem-24);
  height: var(--rem-24);
  letter-spacing: 0;
  font-variation-settings: 'wght' var(--text-semibold);

  span {
    color: var(--text-subheading);
    font-size: var(--rem-14);
    font-variation-settings: 'wght' var(--text-regular);
    height: var(--rem-24);
  }
}

.sidebar--header-dob-line {
  font-size: var(--rem-13);
  color: var(--text-body);
  line-height: var(--rem-21);
  height: var(--rem-21);
  letter-spacing: 0;

  .sidebar--header-age {
    color: var(--text-subheading);
    line-height: var(--rem-21);
    height: var(--rem-21);
  }
}

.sidebar--header-row-item-text {
  font-size: var(--rem-13);
  color: var(--text-body);
  line-height: var(--rem-21);
  letter-spacing: 0;
  text-decoration: none;
}

a.sidebar--header-row-item-text {
  color: var(--text-action-neutral);

  &:hover {
    color: var(--text-action-neutral-hover);
  }
}

.sidebar--header-appt-type-badge {
  border-radius: var(--radius-xs);
  padding: .125rem .25rem;
  font-size: var(--rem-12);
  line-height: var(--rem-14);
  font-variation-settings: 'wght' var(--text-medium);
  letter-spacing: 0;
  background-color: var(--surface-subtle);
  color: var(--text-additional);
}