.navbar {
  height: 100vh;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  overflow-y: auto;
  overflow-x: hidden;

  /* Default variant */
  &[data-variant="default"] {
    @mixin light {
      background-color: white;
      border-right: rem(1px) solid var(--mantine-color-gray-2);
      color: var(--mantine-color-black);

      .linkHeader, .linkLabel {
        color: var(--mantine-color-gray-7);
      }
    }

    @mixin dark {
      background-color: var(--mantine-color-dark-7);
      border-right: rem(1px) solid var(--mantine-color-dark-4);
      color: var(--mantine-color-white);

      .linkHeader, .linkLabel {
        color: var(--mantine-color-white);
      }
    }
  }

  /* Colored variant */
  &[data-variant="colored"] {
    background-color: var(--mantine-primary-color-7);
    color: white;

    .linkHeader, .linkLabel, .logo {
      color: white !important;
    }
  }

  /* Gradient variant */
  &[data-variant="gradient"] {
    @mixin light {
      background: linear-gradient(
        180deg,
        var(--mantine-primary-color-filled) 0%,
        var(--mantine-primary-color-5) 100%
      );
      color: white;

      .linkHeader, .linkLabel, .logo {
        color: white !important;
      }
    }

    @mixin dark {
      background: linear-gradient(
        180deg,
        var(--mantine-color-dark-6) 0%,
        var(--mantine-color-dark-8) 100%
      );
    }
  }

  /* Position variations */
  &[data-position="right"] {
    &[data-variant="default"] {
      border-right: none;
      border-left: rem(1px) solid light-dark(
        var(--mantine-color-gray-2),
        var(--mantine-color-dark-4)
      );
    }
  }

  /* State variations */
  &[data-sidebar-state="mini"] {
    padding: var(--mantine-spacing-xs);

    .header {
      padding: var(--mantine-spacing-xs);
      margin-bottom: var(--mantine-spacing-md);
    }

    .linkLabel, .chevron, .sectionTitle {
      display: none;
    }

    .link {
      padding: var(--mantine-spacing-xs);
      justify-content: center;

      .icon {
        margin: 0;
      }
    }

    .footer {
      padding: var(--mantine-spacing-xs);
    }
  }

  @media (max-width: 767px) {
    position: fixed;
    z-index: 102;
    height: 100vh;
    width: 100% !important;
    max-width: rem(320px);
  }
}

.header {
  padding: var(--mantine-spacing-sm) var(--mantine-spacing-md);
  border-bottom: rem(1px) solid light-dark(
    var(--mantine-primary-color-4),
    var(--mantine-primary-color-5)
  );
}

.links {
  flex: 1;
  margin-left: calc(var(--mantine-spacing-md) * -1);
  margin-right: calc(var(--mantine-spacing-md) * -1);
  overflow-y: auto;
  overflow-x: hidden;
}

.linksInner {
  padding: var(--mantine-spacing-xl) var(--mantine-spacing-md);
}

.linkHeader {
  font-weight: 500;
  text-transform: uppercase;
  font-size: rem(11px);
  letter-spacing: 0.5px;
  opacity: 0.7;
  margin-bottom: var(--mantine-spacing-sm);
  padding-left: var(--mantine-spacing-md);
}

.link {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: var(--mantine-font-size-sm);
  padding: var(--mantine-spacing-xs) var(--mantine-spacing-md);
  border-radius: var(--mantine-radius-sm);
  font-weight: 500;
  transition: all 0.2s ease;

  &:hover {
    background-color: light-dark(
      rgba(0, 0, 0, 0.05),
      rgba(255, 255, 255, 0.05)
    );
  }

  &[data-active] {
    background-color: light-dark(
      rgba(0, 0, 0, 0.1),
      rgba(255, 255, 255, 0.1)
    );
  }
}

.icon {
  margin-right: var(--mantine-spacing-sm);
}

.chevron {
  margin-left: auto;
  transition: transform 0.2s ease;

  &[data-rotate] {
    transform: rotate(90deg);
  }
}

.footer {
  padding: var(--mantine-spacing-sm) var(--mantine-spacing-md);
  border-top: rem(1px) solid light-dark(
    var(--mantine-primary-color-4),
    var(--mantine-primary-color-5)
  );
}
